Skip to content

Commit

Permalink
Simplify binary-compatibility-validator setup
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt committed Mar 2, 2024
1 parent 65280c0 commit 4e68813
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlinter) apply false
alias(libs.plugins.dokka)
alias(libs.plugins.android.publish) apply false
alias(libs.plugins.binary.compatibility.validator)
alias(libs.plugins.api)
alias(libs.plugins.dokka)
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ktor-mock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" }
[plugins]
android-library = { id = "com.android.library", version = "8.3.0" }
android-publish = { id = "com.vanniktech.maven.publish", version = "0.27.0" }
binary-compatibility-validator = { id = "binary-compatibility-validator", version = "0.13.0" }
api = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.13.0" }
dokka = { id = "org.jetbrains.dokka", version = "1.9.10" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinter = { id = "org.jmailen.kotlinter", version = "4.2.0" }
11 changes: 2 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ pluginManagement {

resolutionStrategy {
eachPlugin {
when (requested.id.id) {
"binary-compatibility-validator" ->
useModule("org.jetbrains.kotlinx:binary-compatibility-validator:${requested.version}")

else -> when (requested.id.namespace) {
"com.android" ->
useModule("com.android.tools.build:gradle:${requested.version}")
}
}
if (requested.id.namespace == "com.android")
useModule("com.android.tools.build:gradle:${requested.version}")
}
}
}
Expand Down

0 comments on commit 4e68813

Please sign in to comment.