Adopt AGP 4.2.2
MODIFY
build.gradle
build.gradle
@@ -13,7 +13,7 @@ buildscript {
// relies on), we're sticking a bit older because most apps will be using a more recent version
// and they'll automatically resolve to higher version without having to necessarily resort to a
// resolution strategy.
- androidGradlePlugin: "com.android.tools.build:gradle:4.0.0",
+ androidGradlePlugin: "com.android.tools.build:gradle:4.2.2",
androidx: [
annotation: 'androidx.annotation:annotation:1.0.2',
core: 'androidx.core:core:1.0.1',

MODIFY
gradle.properties
gradle.properties
@@ -20,4 +20,5 @@ android.useAndroidX=true
#Gradle properties: https://docs.gradle.org/current/userguide/build_environment.html
org.gradle.caching=true
org.gradle.configureondemand=true
+org.gradle.jvmargs=-XX:+UseParallelGC -Dfile.encoding=UTF-8
org.gradle.parallel=true

MODIFY
leakcanary-android-core/build.gradle
leakcanary-android-core/build.gradle
@@ -29,9 +29,9 @@ def gitSha() {
android {
resourcePrefix 'leak_canary_'
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
buildConfigField "String", "LIBRARY_VERSION", "\"${rootProject.ext.VERSION_NAME}\""
buildConfigField "String", "GIT_SHA", "\"${gitSha()}\""
consumerProguardFiles 'consumer-proguard-rules.pro'
@@ -40,7 +40,7 @@ android {
lintOptions {
disable 'GoogleAppIndexingWarning'
error 'ObsoleteSdkInt'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

MODIFY
leakcanary-android-instrumentation/build.gradle
leakcanary-android-instrumentation/build.gradle
@@ -16,16 +16,16 @@ dependencies {
}
android {
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'GoogleAppIndexingWarning'
// junit references java.lang.management
ignore 'InvalidPackage'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

MODIFY
leakcanary-android-process/build.gradle
leakcanary-android-process/build.gradle
@@ -10,15 +10,15 @@ dependencies {
}
android {
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
}
lintOptions {
disable 'GoogleAppIndexingWarning'
// junit references java.lang.management
ignore 'InvalidPackage'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

MODIFY
leakcanary-android-release/build.gradle
leakcanary-android-release/build.gradle
@@ -17,7 +17,7 @@ def gitSha() {
android {
resourcePrefix 'leak_canary_'
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
minSdkVersion 16
buildConfigField "String", "LIBRARY_VERSION", "\"${rootProject.ext.VERSION_NAME}\""
@@ -27,7 +27,7 @@ android {
lintOptions {
disable 'GoogleAppIndexingWarning'
error 'ObsoleteSdkInt'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

MODIFY
leakcanary-android-sample/build.gradle
leakcanary-android-sample/build.gradle
@@ -31,7 +31,7 @@ dependencies {
}
android {
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@@ -41,7 +41,7 @@ android {
defaultConfig {
applicationId "com.example.leakcanary"
minSdkVersion 16
- targetSdkVersion versions.compileSdk
+ targetSdk versions.compileSdk
versionCode 1
versionName "1.0"

MODIFY
leakcanary-android-utils/build.gradle
leakcanary-android-utils/build.gradle
@@ -10,14 +10,14 @@ dependencies {
}
android {
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
}
lintOptions {
disable 'GoogleAppIndexingWarning'
error 'ObsoleteSdkInt'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

MODIFY
leakcanary-android/build.gradle
leakcanary-android/build.gradle
@@ -10,15 +10,15 @@ dependencies {
}
android {
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
}
lintOptions {
disable 'GoogleAppIndexingWarning'
// junit references java.lang.management
ignore 'InvalidPackage'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

MODIFY
leakcanary-object-watcher-android-androidx/build.gradle
leakcanary-object-watcher-android-androidx/build.gradle
@@ -12,15 +12,15 @@ dependencies {
}
android {
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
consumerProguardFiles 'consumer-proguard-rules.pro'
}
lintOptions {
disable 'GoogleAppIndexingWarning'
error 'ObsoleteSdkInt'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

MODIFY
leakcanary-object-watcher-android-support-fragments/build.gradle
leakcanary-object-watcher-android-support-fragments/build.gradle
@@ -12,15 +12,15 @@ dependencies {
}
android {
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
consumerProguardFiles 'consumer-proguard-rules.pro'
}
lintOptions {
disable 'GoogleAppIndexingWarning'
error 'ObsoleteSdkInt'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

MODIFY
leakcanary-object-watcher-android/build.gradle
leakcanary-object-watcher-android/build.gradle
@@ -17,16 +17,16 @@ dependencies {
android {
resourcePrefix 'leak_canary_watcher_'
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
consumerProguardFiles 'consumer-proguard-rules.pro'
}
lintOptions {
disable 'GoogleAppIndexingWarning'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
buildFeatures {

MODIFY
plumber-android/build.gradle
plumber-android/build.gradle
@@ -14,15 +14,15 @@ dependencies {
android {
resourcePrefix 'leak_canary_plumber'
- compileSdkVersion versions.compileSdk
+ compileSdk versions.compileSdk
defaultConfig {
- minSdkVersion versions.minSdk
+ minSdk versions.minSdk
consumerProguardFiles 'consumer-proguard-rules.pro'
}
lintOptions {
disable 'GoogleAppIndexingWarning'
error 'ObsoleteSdkInt'
- check 'Interoperability'
+ checkOnly 'Interoperability'
}
}

Adopt AGP 4.2.2