Skip to content

Build: Migrate BCV and run checks for PRs#35

Open
Goooler wants to merge 2 commits into
zhanghai:masterfrom
Goooler:migrate-bcv
Open

Build: Migrate BCV and run checks for PRs#35
Goooler wants to merge 2 commits into
zhanghai:masterfrom
Goooler:migrate-bcv

Conversation

@Goooler
Copy link
Copy Markdown
Contributor

@Goooler Goooler commented May 28, 2026

It helps us avoid accidental API breaking changes.

https://kotlinlang.org/docs/gradle-binary-compatibility-validation.html

  • Tests pass
  • Appropriate changes to README are included in PR

@zhanghai
Copy link
Copy Markdown
Owner

BCV in KGP is still experimental, so I'd like to wait for it to be stable before migration. (Or once AndroidX migrates.)

I was under the impression apiCheck should be part of assembleDebug or lintVitalRelease - is that not the case? If not, I'd like to add apiCheck on root project instead of only on the preference project.

@Goooler
Copy link
Copy Markdown
Contributor Author

Goooler commented May 29, 2026

apiCheck doesn't matter to assemble or lint stuff. It has been added to check task lifecycle.

@Goooler Goooler mentioned this pull request May 29, 2026
2 tasks
@Goooler
Copy link
Copy Markdown
Contributor Author

Goooler commented May 29, 2026

Addressing 8024e7c to #36.

@zhanghai
Copy link
Copy Markdown
Owner

https://github.com/kotlin/binary-compatibility-validator#tasks :

apiCheck — builds the project and checks that project's public API is the same as golden value in project api subfolder. This task is automatically inserted into check pipeline, so both build and check tasks will start checking public API upon their execution.

You are right it's only in check (and thus build).

I was using assembleDebug lintVitalRelease as a workaround to bypass release build which requires signing but still run the release lint. I think given that we want apiCheck, we should just switch to buildDebug lintVitalRelease. Wdyt?

@Goooler
Copy link
Copy Markdown
Contributor Author

Goooler commented May 29, 2026

Actually I prefer running build as the only job, which contains the most lifecycle tasks.

I was using assembleDebug lintVitalRelease as a workaround to bypass release build

We can add signingConfig signingConfigs.debug for the release variant to fix it. e.g.

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