From c6cfeefabbd4ba01dc75c44f46d6dd1349ff8dd4 Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sat, 16 Nov 2024 17:25:28 +0000 Subject: [PATCH 1/8] Update AGP to 8.7.2 --- build.gradle.kts | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b0c2b07f..0631fa3f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,7 +28,7 @@ buildscript { } dependencies { - classpath("com.android.tools.build:gradle:8.2.2") + classpath("com.android.tools.build:gradle:8.7.2") classpath("org.aspectj:aspectjtools:1.9.21") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20") classpath("org.jetbrains.kotlin:kotlin-serialization:1.9.20") diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b80c76c0..9c26c6fe 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip From 11f6efd7ceff010dcfd5148624f0156a9d488ab7 Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sun, 17 Nov 2024 14:07:33 +0000 Subject: [PATCH 2/8] Do not minify cats From AGP release notes: Starting with Android Gradle Plugin 8.4, if an Android library project is minified, shrunk program classes will be published for inter-project publishing. This means that if an app depends on the shrunk version of the Android library subprojects, the APK will include shrunk Android library classes. You may need to adjust library keep rules in case there are missing classes in the APK. This leads to various R8 errors when building. The solution would be simply to not minify the library itself as the app is going to be minified anyway. --- cats/build.gradle.kts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/cats/build.gradle.kts b/cats/build.gradle.kts index 8ff2fb99..cada9c7d 100644 --- a/cats/build.gradle.kts +++ b/cats/build.gradle.kts @@ -23,20 +23,10 @@ android { targetCompatibility = JavaVersion.VERSION_17 } - buildTypes { - getByName("debug") {} - - getByName("release") { - isMinifyEnabled = true - proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") - } - - create("dev") { initWith(getByName("release")) } - } - defaultConfig { targetSdk = 34 minSdk = 16 + consumerProguardFile("proguard-rules.pro") } buildFeatures { From c90bd8261c14560b4f4cbbcd16d2b10e15af7e17 Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sat, 16 Nov 2024 17:44:15 +0000 Subject: [PATCH 3/8] Bump Java language level to 21 throughout This helps to avoid the error: Inconsistent JVM-target compatibility detected for tasks 'compileJava' (21) and 'compileKotlin' (17). See also 28fbdfc640ba6ee2980c91d817beefdfd11607b2 --- .github/workflows/main.yml | 8 ++++---- app/build.gradle.kts | 11 ++--------- cats/build.gradle.kts | 7 ++----- relay/build.gradle.kts | 6 +----- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1ae9fba9..94653d51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,11 +7,11 @@ jobs: name: Run tests runs-on: ubuntu-latest steps: - - name: Install Java 17 + - name: Install Java 21 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '17' + java-version: '21' - name: Checkout repository uses: actions/checkout@v2 @@ -25,11 +25,11 @@ jobs: name: Build release apk runs-on: ubuntu-latest steps: - - name: Install Java 17 + - name: Install Java 21 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '17' + java-version: '21' - name: Checkout repository uses: actions/checkout@v2 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1875d5be..30169a74 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -78,10 +78,6 @@ android { arguments["room.incremental"] = "true" } } - - kotlinOptions { - jvmTarget = "17" - } } signingConfigs { @@ -124,11 +120,6 @@ android { versionNameSuffix = "-dev" signingConfig = signingConfigs.getByName("dev") } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } } buildFeatures { @@ -146,6 +137,8 @@ fun versionBanner(): String { return String(os.toByteArray()).trim() } +java.toolchain.languageVersion = JavaLanguageVersion.of(21) + //////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////// cats //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/cats/build.gradle.kts b/cats/build.gradle.kts index cada9c7d..547b9967 100644 --- a/cats/build.gradle.kts +++ b/cats/build.gradle.kts @@ -18,11 +18,6 @@ android { namespace = "com.ubergeek42.cats" compileSdk = 34 - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - defaultConfig { targetSdk = 34 minSdk = 16 @@ -62,3 +57,5 @@ tasks.withType { } } } + +java.toolchain.languageVersion = JavaLanguageVersion.of(21) \ No newline at end of file diff --git a/relay/build.gradle.kts b/relay/build.gradle.kts index 6517f471..4050da31 100644 --- a/relay/build.gradle.kts +++ b/relay/build.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { `java-library` kotlin("jvm") @@ -25,6 +23,4 @@ tasks.withType { options.encoding = "UTF-8" } -tasks.withType { - kotlinOptions { jvmTarget = "17" } -} +java.toolchain.languageVersion = JavaLanguageVersion.of(21) \ No newline at end of file From afa24fa58d5275aa99d91f8d86da993bdd109e72 Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sat, 16 Nov 2024 18:44:23 +0000 Subject: [PATCH 4/8] Use version catalog (libs.versions.toml) --- app/build.gradle.kts | 57 +++++++++++++++-------------- build.gradle.kts | 31 ++++++++-------- cats/build.gradle.kts | 8 ++--- gradle/libs.versions.toml | 76 +++++++++++++++++++++++++++++++++++++++ relay/build.gradle.kts | 12 +++---- 5 files changed, 128 insertions(+), 56 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 30169a74..f302a501 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -8,50 +8,49 @@ dependencies { implementation(project(":cats")) implementation(project(":relay")) - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.20") + implementation(libs.kotlin.stdlib.jdk7) // these two are required for logging within the relay module. todo remove? - implementation("org.slf4j:slf4j-api:2.0.9") - implementation("com.noveogroup.android:android-logger:1.3.6") + implementation(libs.slf4j.api) + implementation(libs.androidlogger) - implementation("androidx.core:core-ktx:1.12.0") - implementation("androidx.legacy:legacy-support-v4:1.0.0") - implementation("androidx.annotation:annotation:1.7.1") // For @Nullable/@NonNull - implementation("androidx.appcompat:appcompat:1.6.1") - implementation("androidx.emoji2:emoji2:1.4.0") - implementation("androidx.preference:preference-ktx:1.2.1") // preference fragment & al - implementation("androidx.legacy:legacy-preference-v14:1.0.0") // styling for the fragment - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2") - implementation("androidx.lifecycle:lifecycle-common-java8:2.6.2") - implementation("androidx.sharetarget:sharetarget:1.2.0") + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.legacy.support.v4) + implementation(libs.androidx.annotation) // For @Nullable/@NonNull + implementation(libs.androidx.appcompat) + implementation(libs.androidx.emoji2) + implementation(libs.androidx.preference.ktx) // preference fragment & al + implementation(libs.androidx.legacy.preference.v14) // styling for the fragment + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.lifecycle.common.java8) + implementation(libs.androidx.sharetarget) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") + implementation(libs.kotlinx.coroutines.android) - implementation("com.github.bumptech.glide:glide:4.16.0") - kapt("com.github.bumptech.glide:compiler:4.16.0") - implementation("com.squareup.okhttp3:okhttp:4.12.0") + implementation(libs.glide.glide) + kapt(libs.glide.compiler) + implementation(libs.okhttp) - val roomVersion = "2.6.1" - implementation("androidx.room:room-runtime:$roomVersion") - annotationProcessor("androidx.room:room-compiler:$roomVersion") - kapt("androidx.room:room-compiler:$roomVersion") + implementation(libs.androidx.room.runtime) + annotationProcessor(libs.androidx.room.compiler) + kapt(libs.androidx.room.compiler) - implementation("org.yaml:snakeyaml:2.2") + implementation(libs.snakeyaml) - implementation("org.bouncycastle:bcpkix-jdk15on:1.70") + implementation(libs.bouncycastle.pkix) // needed for thread-safe date formatting as SimpleDateFormat isn"t thread-safe // the alternatives, including apache commons and threetenabp, seem to be much slower // todo perhaps replace with core library desugaring, if it"s fast - implementation("net.danlew:android.joda:2.12.6") + implementation(libs.joda) - implementation("org.greenrobot:eventbus:3.3.1") + implementation(libs.eventbus) - debugImplementation("org.aspectj:aspectjrt:1.9.21") - debugImplementation("com.squareup.leakcanary:leakcanary-android:2.12") + debugImplementation(libs.aspectj.rt) + debugImplementation(libs.leakcanary) - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") - testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.1") + testImplementation(libs.junit.jupiter) + testImplementation(libs.junit.jupiter.params) } tasks.withType { diff --git a/build.gradle.kts b/build.gradle.kts index 0631fa3f..0bed885c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,12 +8,6 @@ subprojects { } } -// to print a sensible task graph, uncomment the following lines and run: -// $ gradlew :app:assembleDebug taskTree --no-repeat -// plugins { -// id("com.dorongold.task-tree") version "1.5" -// } - defaultTasks("assembleDebug") repositories { @@ -28,11 +22,11 @@ buildscript { } dependencies { - classpath("com.android.tools.build:gradle:8.7.2") - classpath("org.aspectj:aspectjtools:1.9.21") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20") - classpath("org.jetbrains.kotlin:kotlin-serialization:1.9.20") - classpath("com.ibotta:plugin:1.4.1") + classpath(libs.gradle) + classpath(libs.aspectj.tools) + classpath(libs.kotlin.gradle.plugin) + classpath(libs.kotlin.serialization) + classpath(libs.aspectjpipeline) } } @@ -71,13 +65,16 @@ subprojects { } } - -// The below is a plugin that checks for dependency updates. -// To get a plain text report, run: -// $ ./gradlew dependencyUpdates -// See https://github.com/ben-manes/gradle-versions-plugin plugins { - id("com.github.ben-manes.versions") version "0.50.0" + // The below is a plugin that checks for dependency updates. + // To get a plain text report, run: + // $ ./gradlew dependencyUpdates + // See https://github.com/ben-manes/gradle-versions-plugin + alias(libs.plugins.gradleversionsplugin) + + // to print a sensible task graph, uncomment the following line and run: + // $ gradlew :app:assembleDebug taskTree --no-repeat + //alias(libs.plugins.tasktree) } fun isNonStable(version: String): Boolean { diff --git a/cats/build.gradle.kts b/cats/build.gradle.kts index 547b9967..6667e4dc 100644 --- a/cats/build.gradle.kts +++ b/cats/build.gradle.kts @@ -7,11 +7,11 @@ plugins { } dependencies { - implementation("org.aspectj:aspectjrt:1.9.21") - implementation("androidx.annotation:annotation:1.7.1") + implementation(libs.aspectj.rt) + implementation(libs.androidx.annotation) - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") - testImplementation("org.mockito:mockito-core:5.8.0") + testImplementation(libs.junit.jupiter) + testImplementation(libs.mockito.core) } android { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..37d367c9 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,76 @@ +[versions] +androidlogger = "1.3.6" +androidx-annotation = "1.7.1" +androidx-appcompat = "1.6.1" +androidx-core = "1.12.0" +androidx-emoji2 = "1.4.0" +androidx-legacy = "1.0.0" +androidx-lifecycle = "2.6.2" +androidx-preference = "1.2.1" +androidx-room = "2.6.1" +androidx-sharetarget = "1.2.0" +aspectj = "1.9.21" +aspectjpipeline = "1.4.1" +bouncycastle-pkix = "1.70" +eventbus = "3.3.1" +glide = "4.16.0" +gradle = "8.7.2" +gradleversionsplugin = "0.50.0" +joda = "2.12.6" +junit = "5.10.1" +kotlin = "1.9.20" +kotlinx-coroutines = "1.7.3" +kotlinx-serialization = "1.6.2" +leakcanary = "2.12" +mockito = "5.8.0" +nvwebsocketclient = "2.14" +okhttp = "4.12.0" +slf4j-api = "2.0.9" +snakeyaml = "2.2" +sshlib = "2.2.21" +tasktree = "1.5" + + +[libraries] +androidlogger = { module = "com.noveogroup.android:android-logger", version.ref = "androidlogger" } +androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "androidx-annotation" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" } +androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core" } +androidx-emoji2 = { module = "androidx.emoji2:emoji2", version.ref = "androidx-emoji2" } +androidx-legacy-preference-v14 = { module = "androidx.legacy:legacy-preference-v14", version.ref = "androidx-legacy" } +androidx-legacy-support-v4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "androidx-legacy" } +androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "androidx-lifecycle" } +androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" } +androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "androidx-preference" } +androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" } # plugin +androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "androidx-room" } +androidx-sharetarget = { module = "androidx.sharetarget:sharetarget", version.ref = "androidx-sharetarget" } +aspectj-rt = { module = "org.aspectj:aspectjrt", version.ref = "aspectj" } +aspectj-tools = { module = "org.aspectj:aspectjtools", version.ref = "aspectj" } # plugin +aspectjpipeline = { module = "com.ibotta:plugin", version.ref = "aspectjpipeline" } # plugin +bouncycastle-pkix = { module = "org.bouncycastle:bcpkix-jdk15on", version.ref = "bouncycastle-pkix" } +eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbus" } +glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" } # plugin +glide-glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } +gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" } # plugin +joda = { module = "net.danlew:android.joda", version.ref = "joda" } +junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } +junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" } +kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } # plugin +kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" } # plugin +kotlin-stdlib-jdk7 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk7", version.ref = "kotlin" } +kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } +leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" } +mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } +nvwebsocketclient = { module = "com.neovisionaries:nv-websocket-client", version.ref = "nvwebsocketclient" } +okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } +slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j-api" } +snakeyaml = { module = "org.yaml:snakeyaml", version.ref = "snakeyaml" } +sshlib = { module = "com.github.connectbot:sshlib", version.ref = "sshlib" } + + +[plugins] +gradleversionsplugin = { id = "com.github.ben-manes.versions", version.ref = "gradleversionsplugin" } +tasktree = { id = "com.dorongold.task-tree", version.ref = "tasktree" } diff --git a/relay/build.gradle.kts b/relay/build.gradle.kts index 4050da31..bf6c6037 100644 --- a/relay/build.gradle.kts +++ b/relay/build.gradle.kts @@ -5,18 +5,18 @@ plugins { } dependencies { - implementation("org.slf4j:slf4j-api:2.0.9") + implementation(libs.slf4j.api) // "api" because we are calling `SSHConnection.getKnownHosts` from the app // and it returns something from inside sshlib - api("com.github.connectbot:sshlib:2.2.21") + api(libs.sshlib) - implementation("com.neovisionaries:nv-websocket-client:2.14") + implementation(libs.nvwebsocketclient) - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.20") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2") + implementation(libs.kotlin.stdlib.jdk8) + implementation(libs.kotlinx.serialization.json) - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation(libs.junit.jupiter) } tasks.withType { From 333b839d05a1e4937f3d05e2a372e5c218eb4fae Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sat, 16 Nov 2024 21:16:01 +0000 Subject: [PATCH 5/8] Fix some lint warnings in gradle files --- app/build.gradle.kts | 4 ++-- build.gradle.kts | 2 +- cats/build.gradle.kts | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f302a501..e147026c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -86,7 +86,7 @@ android { storePassword = project.properties["devStorePassword"] as String keyAlias = project.properties["devKeyAlias"] as String keyPassword = project.properties["devKeyPassword"] as String - } catch (e: Exception) { + } catch (_: Exception) { project.logger.warn("WARNING: Set the values devStorefile, devStorePassword, " + "devKeyAlias, and devKeyPassword " + "in ~/.gradle/gradle.properties to sign the release.") @@ -107,7 +107,7 @@ android { "../cats/proguard-rules.pro") // kotlinx-coroutines-core debug-only artifact // see https://github.com/Kotlin/kotlinx.coroutines#avoiding-including-the-debug-infrastructure-in-the-resulting-apk - packagingOptions { + packaging { resources.excludes += "DebugProbesKt.bin" } } diff --git a/build.gradle.kts b/build.gradle.kts index 0bed885c..8b6cf58d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -78,7 +78,7 @@ plugins { } fun isNonStable(version: String): Boolean { - val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) } + val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) } val regex = "^[0-9,.v-]+(-r)?$".toRegex() val isStable = stableKeyword || regex.matches(version) return isStable.not() diff --git a/cats/build.gradle.kts b/cats/build.gradle.kts index 6667e4dc..6a3fb2da 100644 --- a/cats/build.gradle.kts +++ b/cats/build.gradle.kts @@ -19,7 +19,6 @@ android { compileSdk = 34 defaultConfig { - targetSdk = 34 minSdk = 16 consumerProguardFile("proguard-rules.pro") } @@ -35,9 +34,9 @@ tasks.withType { val args = arrayOf("-showWeaveInfo", "-1.5", - "-inpath", destinationDir.toString(), + "-inpath", destinationDirectory.asFile.get().toString(), "-aspectpath", classpath.asPath, - "-d", destinationDir.toString(), + "-d", destinationDirectory.asFile.get().toString(), "-classpath", classpath.asPath, "-bootclasspath", android.bootClasspath.joinToString(File.pathSeparator)) From ece2f110ec14ec74d01877b6b1ba58d2c03ec34f Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sun, 17 Nov 2024 12:33:57 +0000 Subject: [PATCH 6/8] Update libraries --- gradle/libs.versions.toml | 45 ++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 37d367c9..6497e9f3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,32 +1,47 @@ [versions] androidlogger = "1.3.6" -androidx-annotation = "1.7.1" -androidx-appcompat = "1.6.1" -androidx-core = "1.12.0" -androidx-emoji2 = "1.4.0" +androidx-annotation = "1.9.1" +androidx-appcompat = "1.7.0" + +# Bumping androidx-core to 1.15.+ requires compileSdk 35. +# However, API level 35 comes with some JDK API changes that, if not addressed in code, +# might lead to crashes on lower API level devices. See: +# https://developer.android.com/about/versions/15/behavior-changes-15#openjdk-api-changes +# https://issuetracker.google.com/issues/350432371 +androidx-core = "1.13.1" + +androidx-emoji2 = "1.5.0" androidx-legacy = "1.0.0" -androidx-lifecycle = "2.6.2" +androidx-lifecycle = "2.8.7" androidx-preference = "1.2.1" androidx-room = "2.6.1" androidx-sharetarget = "1.2.0" + +# Bumping AspectJ to either 1.9.22 or 1.9.22.1, the currently latest version, leads to the following +# crashes on emulators with API 21 to 23, 24 and beyond behaving nominally: +# ... +# Caused by: java.lang.NoClassDefFoundError: org.aspectj.runtime.reflect.JoinPointImpl$$ExternalSyntheticLambda0 +# at org.aspectj.runtime.reflect.JoinPointImpl.(JoinPointImpl.java:145) +# at org.aspectj.runtime.reflect.Factory.makeJP(Factory.java:270) aspectj = "1.9.21" + aspectjpipeline = "1.4.1" bouncycastle-pkix = "1.70" eventbus = "3.3.1" glide = "4.16.0" gradle = "8.7.2" -gradleversionsplugin = "0.50.0" -joda = "2.12.6" -junit = "5.10.1" -kotlin = "1.9.20" -kotlinx-coroutines = "1.7.3" -kotlinx-serialization = "1.6.2" -leakcanary = "2.12" -mockito = "5.8.0" +gradleversionsplugin = "0.51.0" +joda = "2.13.0" +junit = "5.11.3" +kotlin = "2.0.21" +kotlinx-coroutines = "1.9.0" +kotlinx-serialization = "1.7.3" +leakcanary = "2.14" +mockito = "5.14.2" nvwebsocketclient = "2.14" okhttp = "4.12.0" -slf4j-api = "2.0.9" -snakeyaml = "2.2" +slf4j-api = "2.0.16" +snakeyaml = "2.3" sshlib = "2.2.21" tasktree = "1.5" From 75c8fe061ae60cded065e6f3431a21a147842f7f Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sun, 17 Nov 2024 14:24:47 +0000 Subject: [PATCH 7/8] Don't depend on kotlin-stdlib-jdk* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These have been added ages ago and everything works without them ¯\_(ツ)_/¯ --- app/build.gradle.kts | 2 -- gradle/libs.versions.toml | 2 -- relay/build.gradle.kts | 1 - 3 files changed, 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e147026c..7f4cc11c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -8,8 +8,6 @@ dependencies { implementation(project(":cats")) implementation(project(":relay")) - implementation(libs.kotlin.stdlib.jdk7) - // these two are required for logging within the relay module. todo remove? implementation(libs.slf4j.api) implementation(libs.androidlogger) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6497e9f3..6aa6bac5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -73,8 +73,6 @@ junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "jun junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" } kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } # plugin kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" } # plugin -kotlin-stdlib-jdk7 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk7", version.ref = "kotlin" } -kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" } diff --git a/relay/build.gradle.kts b/relay/build.gradle.kts index bf6c6037..2c5552c7 100644 --- a/relay/build.gradle.kts +++ b/relay/build.gradle.kts @@ -13,7 +13,6 @@ dependencies { implementation(libs.nvwebsocketclient) - implementation(libs.kotlin.stdlib.jdk8) implementation(libs.kotlinx.serialization.json) testImplementation(libs.junit.jupiter) From 6a0f8a68203c7736e93dfcd64b73442ac725ac5e Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sun, 17 Nov 2024 15:03:20 +0000 Subject: [PATCH 8/8] Bump actions/upload-artifact & actions/download-artifact Error from Actions CI: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v2`. Learn more: https://github.blog/changelog/2024-02-13-deprecation-notice-v1-and-v2-of-the-artifact-actions/ --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94653d51..d9a6269a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,7 +54,7 @@ jobs: DEVSTOREFILE: /home/runner/work/weechat-android/weechat-android/releases/android.jks - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: build-outputs path: app/build/outputs/ @@ -73,7 +73,7 @@ jobs: uses: actions/checkout@v2 - name: Download artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: build-outputs path: app/build/outputs/ @@ -102,7 +102,7 @@ jobs: fetch-depth: 0 - name: Download artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: build-outputs path: app/build/outputs/