|
3 | 3 |
|
4 | 4 | # Kotlin Binary Compatibility Validator (Mirror Universe)
|
5 | 5 |
|
6 |
| -[BCV-MU](https://github.com/adamko-dev/kotlin-binary-compatibility-validator-mu) is a re-imagined [Gradle](https://gradle.org/) Plugin for |
| 6 | +[BCV-MU](https://github.com/adamko-dev/kotlin-binary-compatibility-validator-mu) is a |
| 7 | +re-imagined [Gradle](https://gradle.org/) Plugin for |
7 | 8 | [Kotlin/binary-compatibility-validator](https://github.com/Kotlin/binary-compatibility-validator).
|
8 | 9 |
|
9 | 10 | This plugin validates the public JVM binary API of libraries to make sure that breaking changes are
|
@@ -194,28 +195,56 @@ All subprojects are included by default, and can be excluded using BCV-MU config
|
194 | 195 |
|
195 | 196 | buildscript {
|
196 | 197 | dependencies {
|
197 |
| - // BCV-MU requires the Kotlin Gradle Plugin classes are present |
198 |
| - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10") |
| 198 | + // BCV-MU requires the Kotlin Gradle Plugin classes are present |
| 199 | + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.8.10") |
199 | 200 | }
|
200 | 201 | }
|
201 | 202 |
|
202 | 203 | plugins {
|
203 | 204 | id("dev.adamko.kotlin.binary-compatibility-validator") version "$bcvMuVersion"
|
204 | 205 | }
|
205 | 206 |
|
206 |
| -extensions |
207 |
| - .getByType<dev.adamko.kotlin.binary_compatibility_validator.BCVSettingsPlugin.Extension>() |
208 |
| - .apply { |
209 |
| - ignoredProjects.addAll( |
210 |
| - |
211 |
| - // ignore subprojects explicitly |
212 |
| - ":some-subproject", |
213 |
| - |
214 |
| - // or ignore using a glob pattern |
215 |
| - ":internal-dependencies:**", |
216 |
| - ":*-tasks:**", |
217 |
| - ) |
| 207 | +binaryCompatibilityValidator { |
| 208 | + ignoredProjects.addAll( |
| 209 | + |
| 210 | + ":", // ignore root project |
| 211 | + ":some-subproject", // ignore subprojects explicitly |
| 212 | + |
| 213 | + // or ignore using a glob pattern |
| 214 | + ":internal-dependencies:*", |
| 215 | + ":*-tasks:**", |
| 216 | + ) |
| 217 | + |
| 218 | + // set the default values for all targets in all enabled-subprojects |
| 219 | + defaultTargetValues { |
| 220 | + enabled.convention(true) |
| 221 | + ignoredClasses.set(listOf("com.package.MyIgnoredClass")) |
| 222 | + ignoredMarkers.set(listOf("com.package.MyInternalApiAnnotationMarker")) |
| 223 | + ignoredPackages.set(listOf("com.package.my_ignored_package")) |
218 | 224 | }
|
| 225 | +} |
| 226 | + |
| 227 | +include( |
| 228 | + // these projects will have BCV-MU automatically applied |
| 229 | + ":common", |
| 230 | + ":internal-dependencies:alpha:nested", |
| 231 | + ":internal-dependencies:alpha:nested", |
| 232 | + ":a-task", |
| 233 | + |
| 234 | + // this subproject is explicitly excluded from BCV |
| 235 | + ":some-subproject", |
| 236 | + |
| 237 | + // these subprojects will be excluded by glob pattern |
| 238 | + ":internal-dependencies", |
| 239 | + ":internal-dependencies:alpha", |
| 240 | + ":internal-dependencies:beta", |
| 241 | + ":x-tasks", |
| 242 | + ":x-tasks:sub1", |
| 243 | + ":x-tasks:sub1:sub2", |
| 244 | + ":z-tasks", |
| 245 | + ":z-tasks:sub1", |
| 246 | + ":z-tasks:sub1:sub2", |
| 247 | +) |
219 | 248 | ```
|
220 | 249 |
|
221 | 250 | ## License
|
|
0 commit comments