aboutsummaryrefslogtreecommitdiffstats
path: root/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.bouncycastle-dependency.gradle.kts
blob: d0f54e59618f1128c3d7c6022e6e28d9ba4e715a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)
    }
  }
}