Skip to content

Commit 3aac3a5

Browse files
authored
Migrate to the BCV shipped with KGP (#466)
1 parent e6d0f70 commit 3aac3a5

File tree

7 files changed

+25
-19
lines changed

7 files changed

+25
-19
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ to Gradle (in Preferences -> Build, Execution, Deployment -> Build Tools -> Grad
4848
### Updating the public API dump
4949

5050
* Use the [Binary Compatibility Validator](https://github.com/Kotlin/binary-compatibility-validator/blob/master/README.md) for updates to public API:
51-
* Run `./gradlew apiDump` to update API index files.
51+
* Run `./gradlew updateLegacyAbi` to update API index files.
5252
* Commit the updated API indexes together with other changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2010-2025 JetBrains s.r.o. and respective authors and developers.
3+
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
4+
*/
5+
6+
import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation
7+
8+
plugins {
9+
kotlin("multiplatform")
10+
}
11+
12+
kotlin {
13+
@OptIn(ExperimentalAbiValidation::class)
14+
abiValidation {
15+
enabled = true
16+
}
17+
}
18+
19+
tasks.check {
20+
dependsOn(tasks.checkLegacyAbi)
21+
}

build.gradle.kts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
*/
55

66
import kotlinx.kover.gradle.plugin.dsl.CoverageUnit
7-
import kotlinx.validation.ExperimentalBCVApi
87

98
plugins {
109
id("kotlinx-io-publish") apply false
1110
id("kotlinx-io-dokka")
12-
1311
alias(libs.plugins.kover)
14-
alias(libs.plugins.bcv)
1512
}
1613

1714
allprojects {
@@ -21,15 +18,6 @@ allprojects {
2118
}
2219
}
2320

24-
@OptIn(ExperimentalBCVApi::class)
25-
apiValidation {
26-
ignoredProjects.addAll(listOf(
27-
"kotlinx-io-benchmarks",
28-
"kotlinx-io-smoke-tests"
29-
))
30-
klib.enabled = true
31-
}
32-
3321
dependencies {
3422
kover(project(":kotlinx-io-core"))
3523
kover(project(":kotlinx-io-bytestring"))

bytestring/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
id("kotlinx-io-publish")
44
id("kotlinx-io-dokka")
55
id("kotlinx-io-android-compat")
6+
id("kotlinx-io-compatibility")
67
alias(libs.plugins.kover)
78
}
89

core/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ plugins {
1111
id("kotlinx-io-publish")
1212
id("kotlinx-io-dokka")
1313
id("kotlinx-io-android-compat")
14+
id("kotlinx-io-compatibility")
1415
alias(libs.plugins.kover)
1516
}
1617

gradle/libs.versions.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ okio = { group = "com.squareup.okio", name = "okio", version.ref = "okio" }
2424

2525
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
2626
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
27-
bcv = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "bcv" }
2827
kotlinx-benchmark-plugin = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "benchmark"}

integration/kotlinx-io-okio/build.gradle.kts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import org.jetbrains.dokka.gradle.DokkaTask
2-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
3-
import java.net.URL
4-
51
/*
62
* Copyright 2010-2024 JetBrains s.r.o. and respective authors and developers.
73
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
@@ -11,6 +7,7 @@ plugins {
117
id("kotlinx-io-multiplatform")
128
id("kotlinx-io-publish")
139
id("kotlinx-io-dokka")
10+
id("kotlinx-io-compatibility")
1411
alias(libs.plugins.kover)
1512
}
1613

@@ -49,4 +46,3 @@ dokka {
4946
}
5047
}
5148
}
52-

0 commit comments

Comments
 (0)