Skip to content

Migrate to Kotlin Gradle plugin binary compatibility validation - #74

Open
jeffdgr8 wants to merge 1 commit into
native-url-listenerfrom
abi-validation
Open

Migrate to Kotlin Gradle plugin binary compatibility validation#74
jeffdgr8 wants to merge 1 commit into
native-url-listenerfrom
abi-validation

Conversation

@jeffdgr8

Copy link
Copy Markdown
Owner

Replaces the kotlinx binary-compatibility-validator plugin with the Kotlin Gradle plugin's built-in (experimental) ABI validation.

  • abiValidation is configured in library-convention, scoping it to the published modules (replacing BCV's ignoredProjects), with the BuildConfig classes excluded via filters { exclude { byNames } } (replacing ignoredClasses)
  • Gradle's check task depends on checkKotlinAbi automatically; dumps are updated with updateKotlinAbi and live in the same api/ layout (api/<module>.klib.api, api/jvm/<module>.api)
  • klib dumps are byte-identical to BCV's; the JVM dumps drop synthetic DefaultConstructorMarker constructors and a protected member that BCV included but aren't public ABI

Note: the current DSL differs slightly from the docs — in Kotlin 2.4.0 the enabled property and klib { enabled } toggle are removed (configuring the block enables it, klib dumps are always generated) and excluded {} is superseded by exclude {}. Task rename to be aware of: apiDump/apiCheckupdateKotlinAbi/checkKotlinAbi.

🤖 Generated with Claude Code

Replaces the kotlinx binary-compatibility-validator plugin with the
Kotlin Gradle plugin's built-in (experimental) ABI validation:
https://kotlinlang.org/docs/gradle-binary-compatibility-validation.html

- abiValidation is configured in library-convention, scoping it to
  the published modules (replacing BCV's ignoredProjects) with the
  BuildConfig classes excluded via filters (replacing ignoredClasses)
- The check task depends on checkKotlinAbi automatically; dumps are
  updated with updateKotlinAbi and live in the same api/ layout
  (api/<module>.klib.api and api/jvm/<module>.api)
- klib dumps are unchanged; the jvm dumps drop synthetic
  DefaultConstructorMarker constructors and a protected member that
  BCV included but are not public ABI

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant