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
{{ message }}
Repository navigation
Commit d6d89a6
Browse filesBrowse the repository at this point in the historyBrowse files
Move from bcv plugin to KGP api validation (#6362)
* build: Move from the binary-compatibility-validator plugin to KGP ABI validation
* build: Validate the ABI of sentry-opentelemetry-agentless
Co-Authored-By: Markus Hintersteiner <markus.hintersteiner@sentry.io>
* build: Drop the apiDump and apiCheck aliases in favour of the KGP task names
* build: Restore the root build file changes from main lost in the merge
* build: Chain the ABI filters onto the abiValidation lookup
---------
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .cursor/rules/api.mdc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ description: Public API surface, binary compatibility, and common classes to mod
6
6
7
7
## API Compatibility
8
8
9
-
Public API is tracked via `.api` files generated by the [Binary Compatibility Validator](https://github.com/Kotlin/binary-compatibility-validator) Gradle plugin. Each module has its own file at `<module>/api/<module>.api`.
9
+
Public API is tracked via `.api` files generated by the [ABI validation](https://kotlinlang.org/docs/gradle-binary-compatibility-validation.html) built into the Kotlin Gradle plugin. Each module has its own file at `<module>/api/<module>.api`.
10
10
11
-
- **Never edit `.api` files manually.** Run `./gradlew apiDump` to regenerate them.
11
+
- **Never edit `.api` files manually.** Run `./gradlew updateKotlinAbi` to regenerate them.
12
12
- `./gradlew check` validates current code against `.api` files and fails on unintended changes.
13
13
- `@ApiStatus.Internal` marks classes/methods as internal — they still appear in `.api` files but are not part of the public contract.
14
14
- `@ApiStatus.Experimental` marks API that may change in future versions.
@@ -42,7 +42,7 @@ The project uses **Gradle** with Kotlin DSL. Key build files:
42
42
43
43
```bash
44
44
# Format code and regenerate .api files (REQUIRED before committing)
45
-
./gradlew spotlessApply apiDump
45
+
./gradlew spotlessApply updateKotlinAbi
46
46
47
47
# Run all tests and linter
48
48
./gradlew check
@@ -74,7 +74,7 @@ resolves the per-module test task, including integration test suites, for you.
74
74
3.**Use todo tracking**: Work through todo items, marking them as complete as you go
75
75
4.**High-level communication**: Give high-level explanations of changes made, not step-by-step descriptions
76
76
5.**Simplicity first**: Make every task and code change as simple as possible. Avoid massive or complex changes. Impact as little code as possible.
77
-
6.**Format and regenerate**: Once done, format code and regenerate .api files: `./gradlew spotlessApply apiDump`
77
+
6.**Format and regenerate**: Once done, format code and regenerate .api files: `./gradlew spotlessApply updateKotlinAbi`
78
78
7.**Propose commit**: As final step, git stage relevant files and propose (but not execute) a single git commit command. This applies to implementation work; when the task is to open a PR, the `create-java-pr` skill takes over from here and does commit, push, and open it.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ or
81
81
82
82
# Binary compatibility validation
83
83
84
-
To prevent breaking ABI changes and exposing things we should not, we make use of https://github.com/Kotlin/binary-compatibility-validator. If your change intended to introduce a new public method/property or modify the existing one you can overwrite the API declarations to make CI happy as follows (overwrites them from scratch):
84
+
To prevent breaking ABI changes and exposing things we should not, we make use of https://kotlinlang.org/docs/gradle-binary-compatibility-validation.html. If your change intended to introduce a new public method/property or modify the existing one you can overwrite the API declarations to make CI happy as follows (overwrites them from scratch):
85
85
86
86
```shell
87
87
make api
@@ -90,7 +90,7 @@ make api
90
90
or
91
91
92
92
```shell
93
-
./gradlew apiDump
93
+
./gradlew updateKotlinAbi
94
94
```
95
95
96
96
However, if your change did not intend to modify the public API, consider changing the method/property visibility or removing the change altogether.
0 commit comments