Skip to content

Conversation

erikkerber
Copy link
Contributor

@erikkerber erikkerber commented Jun 2, 2025

Enables opting in to building with the Build Tools API (BTAPI). A simpler subset of #1316

The default configuration for CompilationService lands in a similar invocation of K2JVMCompiler that the current BazelK2JVMCompiler does, so this should very much be a drop-in replacement.

This approach still pins the BTAPI to 2.1.20, which may result in issues when using a different version of Kotlin. If the BTAPI is never shipped along Kotlin itself and that is a problem, then we'll have to somehow tie the version in Maven to the Kotlin version.

BTAPI References:

@erikkerber erikkerber force-pushed the ek/add-experimental-build-tools-api branch 4 times, most recently from 2441efe to 57e6805 Compare June 2, 2025 19:02
@erikkerber
Copy link
Contributor Author

erikkerber commented Jun 2, 2025

The integration tests I believe are hung up on not having any reference to the Maven artifacts in MODULE.release.bazel, which is where the BTAPI is published to.

Would look to the maintainers for guidance here.

@erikkerber erikkerber marked this pull request as ready for review June 2, 2025 19:07
@erikkerber erikkerber force-pushed the ek/add-experimental-build-tools-api branch 4 times, most recently from 87c1775 to e644ea7 Compare June 5, 2025 15:18
Copy link
Collaborator

@restingbull restingbull left a comment

Choose a reason for hiding this comment

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

Let's add the [basic jvm smoke test].(https://github.com/bazelbuild/rules_kotlin/blob/master/src/test/kotlin/io/bazel/kotlin/builder/tasks/jvm/KotlinBuilderJvmBasicTest.java)

And an iteration to the integration tests to include a run with the flag true and false.

Just to keep us honest.

@restingbull restingbull force-pushed the ek/add-experimental-build-tools-api branch from 7351778 to e2b170c Compare June 6, 2025 21:12
@Bencodes Bencodes merged commit 9734aa6 into bazelbuild:master Jun 7, 2025
2 checks passed
erikkerber added a commit to tinyspeck/rules_kotlin that referenced this pull request Jun 16, 2025
…1325)

* Add experimental Build Tools API (BTAPI) for compilation

* Provision build tools API with http_archive over Maven

* Fixup maven_install

* Add build tools api to the integration tests

---------

Co-authored-by: Corbin McNeely-Smith <[email protected]>
oliviernotteghem pushed a commit to uber-common/rules_kotlin that referenced this pull request Jun 18, 2025
…1325)

* Add experimental Build Tools API (BTAPI) for compilation

* Provision build tools API with http_archive over Maven

* Fixup maven_install

* Add build tools api to the integration tests

---------

Co-authored-by: Corbin McNeely-Smith <[email protected]>
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.

3 participants