You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+88-4Lines changed: 88 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,11 @@ BCV-MU is a re-imagined [Gradle](https://gradle.org/) Plugin for
6
6
This plugin validates the public JVM binary API of libraries to make sure that breaking changes are
7
7
tracked.
8
8
9
+
Read more in the BCV project:
10
+
11
+
*[What constitutes the public API?](https://github.com/Kotlin/binary-compatibility-validator/#what-constitutes-the-public-api)
12
+
*[What makes an incompatible change to the public binary API?](https://github.com/Kotlin/binary-compatibility-validator/#what-makes-an-incompatible-change-to-the-public-binary-api)
13
+
9
14
(The [Mirror Universe](https://en.wikipedia.org/wiki/Mirror_Universe) tag was chosen because I hope
10
15
to banish this plugin as soon the improvements here are merged upstream.)
11
16
@@ -14,8 +19,6 @@ to banish this plugin as soon the improvements here are merged upstream.)
14
19
Under-the-hood BCV-MU still uses the signature-generation code from BCV, but the Gradle plugin has
15
20
been refactored to better follow the Gradle API, and generate API signatures more flexibly.
16
21
17
-
### Quick start
18
-
19
22
BCV-MU plugin can either be [applied as to a Project](#build-plugin) in any `build.gradle(.kts)`,
20
23
or (**experimentally**) [as a Settings plugin](#settings-plugin) in `settings.gradle(.kts)`.
21
24
@@ -26,15 +29,96 @@ The minimal supported Gradle version is 7.6.
26
29
By default, BCV-MU uses BCV version `0.13.0`, which can be overridden, but may introduce runtime
27
30
errors.
28
31
29
-
#### Build plugin
32
+
### Build plugin
33
+
34
+
BCV-MU can be applied to each subproject as a standard Gradle plugin.
35
+
36
+
```kotlin
37
+
// build.gradle.kts
38
+
39
+
plugins {
40
+
id("dev.adamko.kotlin.binary-compatibility-validator") version "$bcvMuVersion"
41
+
}
42
+
```
43
+
44
+
To initialise the API declarations, run the Gradle task
45
+
46
+
```shell
47
+
./gradlew apiDump
48
+
```
49
+
50
+
This will produce API files into the `./api` directory of subprojects with the BCV-MU plugin.
51
+
These API declarations files must be committed to the repository.
52
+
53
+
To verify that the API declarations is up-to-date, run the Gradle task
54
+
55
+
```shell
56
+
./gradlew apiCheck
57
+
```
58
+
59
+
The `apiCheck` task will also be run whenever the `check` task is run.
60
+
61
+
##### Configuration
62
+
63
+
BCV-MU can be configured in a similar manner to BCV:
30
64
31
-
BCV-MU can be applied to each subproject.
65
+
```kotlin
66
+
// build.gradle.kts
67
+
68
+
plugins {
69
+
kotlin("jvm") version "1.8.10"
70
+
id("dev.adamko.kotlin.binary-compatibility-validator") version "$bcvMuVersion"
71
+
}
72
+
73
+
binaryCompatibilityValidator {
74
+
// Packages that are excluded from public API dumps even if they contain public API.
0 commit comments