Here's an example "build.gradle" I marked up:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
multiDexEnabled true
applicationId "com.boxpik.android"
minSdkVersion 17
targetSdkVersion 19
...
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all"
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
...
In this example, I added options.compilerArgs << "-Xlint:all"
to build.gradle
.
This gave me a bunch of Lint warning in my Android Studio "Build" window:
^
C:\xyz\PoolToScoreDetailFragment.java:55: warning: [deprecation] ProgressDialog in android.app has been deprecated
private ProgressDialog pDialog;
^
C:\xyz\PoolToScoreDetailFragment.java:346: warning: [deprecation] ProgressDialog in android.app has been deprecated
pDialog = new ProgressDialog(application);