From a9fdf9cb4af061afcb4c958d977e725a2a634691 Mon Sep 17 00:00:00 2001 From: goooler Date: Mon, 15 Feb 2021 23:26:16 +0800 Subject: [PATCH 01/15] Update dependencies --- build.gradle.kts | 4 ++-- buildSrc/src/main/kotlin/Helpers.kt | 4 ++-- core/build.gradle.kts | 2 +- mobile/build.gradle.kts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4dba7f4a29..06354ce215 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,9 +18,9 @@ buildscript { classpath(rootProject.extra["androidPlugin"].toString()) classpath(kotlin("gradle-plugin", kotlinVersion)) classpath("com.google.android.gms:oss-licenses-plugin:0.10.2") - classpath("com.google.firebase:firebase-crashlytics-gradle:2.4.1") + classpath("com.google.firebase:firebase-crashlytics-gradle:2.5.0") classpath("com.google.gms:google-services:4.3.5") - classpath("com.vanniktech:gradle-maven-publish-plugin:0.13.0") + classpath("com.vanniktech:gradle-maven-publish-plugin:0.14.2") classpath("gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3") classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20") } diff --git a/buildSrc/src/main/kotlin/Helpers.kt b/buildSrc/src/main/kotlin/Helpers.kt index 271ee3deab..6f1cd873b2 100644 --- a/buildSrc/src/main/kotlin/Helpers.kt +++ b/buildSrc/src/main/kotlin/Helpers.kt @@ -11,7 +11,7 @@ import org.gradle.kotlin.dsl.getByName import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions import java.util.* -const val lifecycleVersion = "2.3.0-rc01" +const val lifecycleVersion = "2.3.0" private val Project.android get() = extensions.getByName("android") @@ -46,7 +46,7 @@ fun Project.setupCommon() { } dependencies { - add("testImplementation", "junit:junit:4.13.1") + add("testImplementation", "junit:junit:4.13.2") add("androidTestImplementation", "androidx.test:runner:1.3.0") add("androidTestImplementation", "androidx.test.espresso:espresso-core:3.3.0") } diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 8585fa5dba..cf6279cdbe 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -70,7 +70,7 @@ dependencies { api("androidx.appcompat:appcompat:1.2.0") api("androidx.core:core-ktx:1.5.0-beta01") - api("androidx.fragment:fragment-ktx:1.3.0-rc02") + api("androidx.fragment:fragment-ktx:1.3.0") api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion") api("androidx.preference:preference:1.1.1") diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 710807412b..7159f0b0d8 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -12,7 +12,7 @@ setupApp() android.defaultConfig.applicationId = "com.github.shadowsocks" dependencies { - val cameraxVersion = "1.0.0-rc02" + val cameraxVersion = "1.1.0-alpha01" implementation("androidx.browser:browser:1.3.0") implementation("androidx.camera:camera-camera2:$cameraxVersion") From c28dc0af253df07bb42480bc3d0b5e194c4c2da2 Mon Sep 17 00:00:00 2001 From: goooler Date: Mon, 15 Feb 2021 23:34:24 +0800 Subject: [PATCH 02/15] Update gradle.properties --- gradle.properties | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9c5ee55a81..3717f54302 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,21 +1,16 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. android.enableJetifier=true android.enableR8.fullMode=true +android.injected.testOnly=false android.useAndroidX=true +kapt.include.compile.classpath=false kapt.incremental.apt=true - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -org.gradle.jvmargs=-Xmx1536m +kapt.use.worker.api=true +kapt.verbose=true +kotlin.code.style=official +kotlin.incremental=true +kotlin.incremental.usePreciseJavaTracking=true +kotlin.parallel.tasks.in.project=true +org.gradle.caching=true +org.gradle.configureondemand=true +org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8 +org.gradle.parallel=true \ No newline at end of file From 6f9b5df87e5cfd07a44cf63cd64fac14ca194709 Mon Sep 17 00:00:00 2001 From: goooler Date: Tue, 16 Feb 2021 21:44:52 +0800 Subject: [PATCH 03/15] Downgrade cameraX version --- mobile/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 7159f0b0d8..710807412b 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -12,7 +12,7 @@ setupApp() android.defaultConfig.applicationId = "com.github.shadowsocks" dependencies { - val cameraxVersion = "1.1.0-alpha01" + val cameraxVersion = "1.0.0-rc02" implementation("androidx.browser:browser:1.3.0") implementation("androidx.camera:camera-camera2:$cameraxVersion") From d07d924f8ac1e5de040229591be6ce99d25baea0 Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 24 Feb 2021 20:58:57 +0800 Subject: [PATCH 04/15] Bump gradle to 6.8.3 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2a563242c1..442d9132ea 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 7955472d36f68ccb2950be0f2399feb6807fdd87 Mon Sep 17 00:00:00 2001 From: Goooler Date: Sun, 28 Feb 2021 12:01:16 +0800 Subject: [PATCH 05/15] Bump kotlin to 1.4.31 --- repositories.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repositories.gradle.kts b/repositories.gradle.kts index 8c3b9ebcb5..85e7d2cc33 100644 --- a/repositories.gradle.kts +++ b/repositories.gradle.kts @@ -1,6 +1,6 @@ rootProject.extra.apply { set("androidPlugin", "com.android.tools.build:gradle:4.1.2") - set("kotlinVersion", "1.4.30") + set("kotlinVersion", "1.4.31") } repositories { From 5abff91bec2497382c883d6d7b64be81b574a3af Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 17 Mar 2021 16:38:24 +0800 Subject: [PATCH 06/15] Update dependencies --- build.gradle.kts | 4 ++-- core/build.gradle.kts | 6 +++--- mobile/build.gradle.kts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 06354ce215..30bcc2abde 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,11 +18,11 @@ buildscript { classpath(rootProject.extra["androidPlugin"].toString()) classpath(kotlin("gradle-plugin", kotlinVersion)) classpath("com.google.android.gms:oss-licenses-plugin:0.10.2") - classpath("com.google.firebase:firebase-crashlytics-gradle:2.5.0") + classpath("com.google.firebase:firebase-crashlytics-gradle:2.5.1") classpath("com.google.gms:google-services:4.3.5") classpath("com.vanniktech:gradle-maven-publish-plugin:0.14.2") classpath("gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3") - classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20") + classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.30") } } diff --git a/core/build.gradle.kts b/core/build.gradle.kts index cf6279cdbe..aa9b148bb6 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -68,9 +68,9 @@ dependencies { api(project(":plugin")) api("androidx.appcompat:appcompat:1.2.0") - api("androidx.core:core-ktx:1.5.0-beta01") + api("androidx.core:core-ktx:1.5.0-beta03") - api("androidx.fragment:fragment-ktx:1.3.0") + api("androidx.fragment:fragment-ktx:1.3.1") api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion") api("androidx.preference:preference:1.1.1") @@ -80,7 +80,7 @@ dependencies { api("com.google.android.gms:play-services-oss-licenses:17.0.0") api("com.google.code.gson:gson:2.8.6") api("com.google.firebase:firebase-analytics-ktx:18.0.2") - api("com.google.firebase:firebase-crashlytics:17.3.1") + api("com.google.firebase:firebase-crashlytics:17.4.0") api("com.jakewharton.timber:timber:4.7.1") api("dnsjava:dnsjava:3.3.1") api("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion") diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 710807412b..9bce032d62 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { implementation("androidx.browser:browser:1.3.0") implementation("androidx.camera:camera-camera2:$cameraxVersion") implementation("androidx.camera:camera-lifecycle:$cameraxVersion") - implementation("androidx.camera:camera-view:1.0.0-alpha21") + implementation("androidx.camera:camera-view:1.0.0-alpha22") implementation("androidx.constraintlayout:constraintlayout:2.0.4") implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion") implementation("com.google.mlkit:barcode-scanning:16.1.1") From aa8ada5dcbd205bc3f820ae77ca6cb0eb64b00f8 Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 17 Mar 2021 18:37:38 +0800 Subject: [PATCH 07/15] Add `activity-ktx` dependency --- core/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index aa9b148bb6..1fd71b08e4 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -70,6 +70,7 @@ dependencies { api("androidx.appcompat:appcompat:1.2.0") api("androidx.core:core-ktx:1.5.0-beta03") + api("androidx.activity:activity-ktx:1.2.1") api("androidx.fragment:fragment-ktx:1.3.1") api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion") From 0cfe505494e9537a44d2c9ca3afef094c6a0b69e Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 17 Mar 2021 22:04:57 +0800 Subject: [PATCH 08/15] Suppress lint `InvalidFragmentVersionForActivityResult` --- buildSrc/src/main/kotlin/Helpers.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/buildSrc/src/main/kotlin/Helpers.kt b/buildSrc/src/main/kotlin/Helpers.kt index 6f1cd873b2..df6d6b76d2 100644 --- a/buildSrc/src/main/kotlin/Helpers.kt +++ b/buildSrc/src/main/kotlin/Helpers.kt @@ -64,6 +64,7 @@ fun Project.setupCore() { disable("BadConfigurationProvider") warning("RestrictedApi") disable("UseAppTint") + disable("InvalidFragmentVersionForActivityResult") } ndkVersion = "21.3.6528147" } From 490e4be8b4b410b272394f05f403b5961463983a Mon Sep 17 00:00:00 2001 From: Goooler Date: Sat, 20 Mar 2021 17:43:18 +0800 Subject: [PATCH 09/15] Bump AGP to 4.1.3 --- repositories.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repositories.gradle.kts b/repositories.gradle.kts index 85e7d2cc33..5563b27feb 100644 --- a/repositories.gradle.kts +++ b/repositories.gradle.kts @@ -1,5 +1,5 @@ rootProject.extra.apply { - set("androidPlugin", "com.android.tools.build:gradle:4.1.2") + set("androidPlugin", "com.android.tools.build:gradle:4.1.3") set("kotlinVersion", "1.4.31") } From fe4f48c71e74efd456d38c80337536848ac60d02 Mon Sep 17 00:00:00 2001 From: Goooler Date: Thu, 25 Mar 2021 11:01:47 +0800 Subject: [PATCH 10/15] Update dependencies --- buildSrc/src/main/kotlin/Helpers.kt | 2 +- core/build.gradle.kts | 4 ++-- mobile/build.gradle.kts | 2 +- repositories.gradle.kts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/Helpers.kt b/buildSrc/src/main/kotlin/Helpers.kt index df6d6b76d2..a1f7c3a0be 100644 --- a/buildSrc/src/main/kotlin/Helpers.kt +++ b/buildSrc/src/main/kotlin/Helpers.kt @@ -11,7 +11,7 @@ import org.gradle.kotlin.dsl.getByName import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions import java.util.* -const val lifecycleVersion = "2.3.0" +const val lifecycleVersion = "2.3.1" private val Project.android get() = extensions.getByName("android") diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 1fd71b08e4..5ca2c25534 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -70,8 +70,8 @@ dependencies { api("androidx.appcompat:appcompat:1.2.0") api("androidx.core:core-ktx:1.5.0-beta03") - api("androidx.activity:activity-ktx:1.2.1") - api("androidx.fragment:fragment-ktx:1.3.1") + api("androidx.activity:activity-ktx:1.2.2") + api("androidx.fragment:fragment-ktx:1.3.2") api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion") api("androidx.preference:preference:1.1.1") diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 9bce032d62..5a61c5c147 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { implementation("androidx.browser:browser:1.3.0") implementation("androidx.camera:camera-camera2:$cameraxVersion") implementation("androidx.camera:camera-lifecycle:$cameraxVersion") - implementation("androidx.camera:camera-view:1.0.0-alpha22") + implementation("androidx.camera:camera-view:1.0.0-alpha23") implementation("androidx.constraintlayout:constraintlayout:2.0.4") implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion") implementation("com.google.mlkit:barcode-scanning:16.1.1") diff --git a/repositories.gradle.kts b/repositories.gradle.kts index 5563b27feb..24e3170190 100644 --- a/repositories.gradle.kts +++ b/repositories.gradle.kts @@ -1,6 +1,6 @@ rootProject.extra.apply { set("androidPlugin", "com.android.tools.build:gradle:4.1.3") - set("kotlinVersion", "1.4.31") + set("kotlinVersion", "1.4.32") } repositories { From 7a5195409e42f795edce48b3be444a5c47d2753b Mon Sep 17 00:00:00 2001 From: Goooler Date: Thu, 25 Mar 2021 11:03:51 +0800 Subject: [PATCH 11/15] Replace `annotationProcessorOptions` with `KaptAnnotationProcessorOptions` --- core/build.gradle.kts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 5ca2c25534..c79dde3398 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,4 +1,5 @@ import com.android.build.gradle.internal.tasks.factory.dependsOn +import org.jetbrains.kotlin.gradle.plugin.KaptExtension plugins { id("com.android.library") @@ -19,9 +20,10 @@ android { arguments("-j${Runtime.getRuntime().availableProcessors()}") } - javaCompileOptions.annotationProcessorOptions.arguments(mapOf( - "room.incremental" to "true", - "room.schemaLocation" to "$projectDir/schemas")) + extensions.getByName("kapt").arguments { + arg("AROUTER_MODULE_NAME", project.name) + arg("room.schemaLocation", "$projectDir/build") + } } externalNativeBuild.ndkBuild.path("src/main/jni/Android.mk") From 8f7379b2bb817567b838681fc73570eb2f22ec45 Mon Sep 17 00:00:00 2001 From: Goooler Date: Thu, 25 Mar 2021 11:04:27 +0800 Subject: [PATCH 12/15] Revert "Suppress lint `InvalidFragmentVersionForActivityResult`" This reverts commit 0cfe5054 --- buildSrc/src/main/kotlin/Helpers.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Helpers.kt b/buildSrc/src/main/kotlin/Helpers.kt index a1f7c3a0be..8317edad7e 100644 --- a/buildSrc/src/main/kotlin/Helpers.kt +++ b/buildSrc/src/main/kotlin/Helpers.kt @@ -64,7 +64,6 @@ fun Project.setupCore() { disable("BadConfigurationProvider") warning("RestrictedApi") disable("UseAppTint") - disable("InvalidFragmentVersionForActivityResult") } ndkVersion = "21.3.6528147" } From 6ee48a63a31e1aab77ddbdc784979731a9c57d2d Mon Sep 17 00:00:00 2001 From: Goooler Date: Sat, 10 Apr 2021 00:57:04 +0800 Subject: [PATCH 13/15] Bump Firebase versions --- core/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index c79dde3398..6c450499f9 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -82,8 +82,8 @@ dependencies { api("androidx.work:work-runtime-ktx:$workVersion") api("com.google.android.gms:play-services-oss-licenses:17.0.0") api("com.google.code.gson:gson:2.8.6") - api("com.google.firebase:firebase-analytics-ktx:18.0.2") - api("com.google.firebase:firebase-crashlytics:17.4.0") + api("com.google.firebase:firebase-analytics-ktx:18.0.3") + api("com.google.firebase:firebase-crashlytics:17.4.1") api("com.jakewharton.timber:timber:4.7.1") api("dnsjava:dnsjava:3.3.1") api("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion") From 21761d1507e0882009515dbe4cf21d1725d2c2e0 Mon Sep 17 00:00:00 2001 From: Goooler Date: Sat, 10 Apr 2021 00:57:48 +0800 Subject: [PATCH 14/15] Add RecyclerView dependency --- core/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 6c450499f9..cce93347c4 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -76,6 +76,7 @@ dependencies { api("androidx.fragment:fragment-ktx:1.3.2") api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion") + api("androidx.recyclerview:recyclerview:1.2.0") api("androidx.preference:preference:1.1.1") api("androidx.room:room-runtime:$roomVersion") api("androidx.work:work-multiprocess:$workVersion") From e6a7c5b2c66528557c7dac5ff89b9803b3b7c7d0 Mon Sep 17 00:00:00 2001 From: Goooler Date: Sat, 10 Apr 2021 08:56:51 +0800 Subject: [PATCH 15/15] Bump plugins version (cherry picked from commit 591e3f3f80951c4c7d23e3d1a2b861b6c94408d4) --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 30bcc2abde..ec12db89f8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,8 +17,8 @@ buildscript { val kotlinVersion = rootProject.extra["kotlinVersion"].toString() classpath(rootProject.extra["androidPlugin"].toString()) classpath(kotlin("gradle-plugin", kotlinVersion)) - classpath("com.google.android.gms:oss-licenses-plugin:0.10.2") - classpath("com.google.firebase:firebase-crashlytics-gradle:2.5.1") + classpath("com.google.android.gms:oss-licenses-plugin:0.10.3") + classpath("com.google.firebase:firebase-crashlytics-gradle:2.5.2") classpath("com.google.gms:google-services:4.3.5") classpath("com.vanniktech:gradle-maven-publish-plugin:0.14.2") classpath("gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3")