aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/build.gradle.kts1
-rw-r--r--build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.bouncycastle-dependency.gradle.kts13
-rw-r--r--gradle/libs.versions.toml6
3 files changed, 18 insertions, 2 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index b81b386e..48bf7ba8 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -11,6 +11,7 @@ plugins {
id("com.github.android-password-store.versioning-plugin")
id("com.github.android-password-store.sentry")
id("com.github.android-password-store.rename-artifacts")
+ id("com.github.android-password-store.bouncycastle-dependency")
id("dagger.hilt.android.plugin")
}
diff --git a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.bouncycastle-dependency.gradle.kts b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.bouncycastle-dependency.gradle.kts
new file mode 100644
index 00000000..d0f54e59
--- /dev/null
+++ b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.bouncycastle-dependency.gradle.kts
@@ -0,0 +1,13 @@
+/**
+ * Bouncy Castle 1.71 changed their packaging to stop shipping jdk15on artifacts, and instead use
+ * multi-release JARs with the jdk15to18 suffix. This plugin replaces older dependencies to use the
+ * new version and artifact.
+ */
+configurations.all {
+ resolutionStrategy.eachDependency {
+ if (requested.group == "org.bouncycastle" && requested.name.contains("jdk15on")) {
+ val replacement = "${requested.group}:${requested.name.replace("jdk15on", "jdk15to18")}:1.71"
+ useTarget(replacement)
+ }
+ }
+}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 662f9ef1..9a4b70b4 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -73,7 +73,8 @@ kotlin-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines
kotlin-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
-thirdparty-bouncycastle = "org.bouncycastle:bcprov-jdk15on:1.70"
+# Keep in sync with the bouncycastle-dependency plugin
+thirdparty-bouncycastle = "org.bouncycastle:bcprov-jdk15to18:1.71"
thirdparty-commons_codec = "commons-codec:commons-codec:1.14"
thirdparty-eddsa = "net.i2p.crypto:eddsa:0.3.0"
thirdparty-fastscroll = "me.zhanghai.android.fastscroll:library:1.1.7"
@@ -86,8 +87,9 @@ thirdparty-logcat = "com.squareup.logcat:logcat:0.1"
thirdparty-modernAndroidPrefs = "de.maxr1998:modernandroidpreferences:2.3.0"
thirdparty-nonfree-googlePlayAuthApiPhone = "com.google.android.gms:play-services-auth-api-phone:18.0.1"
thirdparty-nonfree-sentry = "io.sentry:sentry-android:5.7.2"
-thirdparty-pgpainless = "org.pgpainless:pgpainless-core:1.1.5"
+thirdparty-pgpainless = "org.pgpainless:pgpainless-core:1.2.0"
thirdparty-sshauth = "com.github.open-keychain.open-keychain:sshauthentication-api:5.7.5"
+# TODO: Remove bouncycastle-dependency plugin when upgrading this to a BC 1.71 compatible version
thirdparty-sshj = "com.hierynomus:sshj:0.32.0"
thirdparty-whatthestack = "com.github.haroldadmin:WhatTheStack:0.3.1"