Skip to content

Apply Kotlin's binary-compatibility-validator plugin to all published subprojects#160

Merged
drewhamilton merged 2 commits into
mainfrom
drewh/api-dump
Jan 30, 2026
Merged

Apply Kotlin's binary-compatibility-validator plugin to all published subprojects#160
drewhamilton merged 2 commits into
mainfrom
drewh/api-dump

Conversation

@drewhamilton

Copy link
Copy Markdown
Collaborator

This prints out the API of each published subproject into a .api file, and runs the apiCheck task whenever the build or check tasks are run. If apiCheck fails, it means the public API has changed, and the apiDump task must be run to update the .api files. This will ensure we are always aware when the public API of the SDK is changing, and hopefully help us avoid breaking changes.

Any unmerged PRs that are merged after this will have to rebase on top of this and run ./gradlew apiDump.

Comment thread core/api/core.api
public fun toString ()Ljava/lang/String;
}

public final class app/cash/paykit/core/models/response/ApiErrorJsonAdapter : com/squareup/moshi/JsonAdapter {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposing Moshi-generated classes is unfortunate and will make it very hard to compatibly bump to Moshi 2. Maybe we should just cut our losses and release SDK 3.0 in a new package.

@pedronveloso pedronveloso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We might have to update our build.yml Github Action, I'm not sure if the tasks that are currently ran on PR would trigger this check, if not we can be explicit and run this new one

… subprojects

This prints out the API of each published subproject into a `.api` file, and runs the `apiCheck` task whenever the `build` or `check` tasks are run. If `apiCheck` fails, it means the public API has changed, and the `apiDump` task must be run to update the `.api` files. This will ensure we are always aware when the public API of the SDK is changing, and hopefully help us avoid breaking changes.
@drewhamilton

Copy link
Copy Markdown
Collaborator Author

Good call, I updated build.yml to run the full build command instead of just core:assemble.

@drewhamilton drewhamilton merged commit 699a944 into main Jan 30, 2026
3 of 4 checks passed
@drewhamilton drewhamilton deleted the drewh/api-dump branch January 30, 2026 15:46
pedronveloso added a commit that referenced this pull request Feb 2, 2026
* main:
  Apply Kotlin's binary-compatibility-validator plugin to all published subprojects (#160)
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.

2 participants