Skip to content

Allow specifying JVM toolchain version #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jolanrensen opened this issue Mar 6, 2025 · 2 comments
Closed

Allow specifying JVM toolchain version #290

Jolanrensen opened this issue Mar 6, 2025 · 2 comments

Comments

@Jolanrensen
Copy link

Jolanrensen commented Mar 6, 2025

Currently, the plugin produces different results based on the JVM toolchain version the project is built with.
This version, however, is often higher than the actual JVM target version of the library.

For instance, setting the JVM toolchain version to 21 produces

	public synthetic fun addFirst (Ljava/lang/Object;)V
	public fun addFirst (Ljava/lang/String;)V
	public synthetic fun addLast (Ljava/lang/Object;)V
	public fun addLast (Ljava/lang/String;)V

in the .api file for classes extending the List class, while these functions are not available in our JVM target version 11. (Correct me if I'm wrong btw)

It would be helpful if we could change the toolchain version for the api- tasks to avoid this and produce an api dump which actually represents our published artifact.

@fzhinkin
Copy link
Collaborator

fzhinkin commented Mar 6, 2025

@Jolanrensen, api-* tasks are only loading compiled class files (or klibs) and dump whatever declarations these files contain. So it's about how compilations are configured, not about a toolchain used for BCV-specific tasks.

@Jolanrensen
Copy link
Author

Ah I see :). I actually found changing the jdk-release version on our end correctly changes the api dump. Just setting source- and target compatibility wasn't enough.

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

No branches or pull requests

2 participants