Skip to content
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

Mark kotlin target JVM as 1.8 #1262

Closed
wants to merge 1 commit into from

Conversation

tweksteen
Copy link
Member

There is a conflict between the compiler used for Java and Kotlin, even if this is defined in the root project's build.gradle. Explicitly note that the targeted jvm version is 1.8.

This was reported by Gradle and prevents the upgrade to Gradle 8.x.

There is a conflict between the compiler used for Java and Kotlin, even
if this is defined in the root project's build.gradle. Explicitly
note that the targeted jvm version is 1.8.

This was reported by Gradle and prevents the upgrade to Gradle 8.x.
@tweksteen
Copy link
Member Author

For an example of the build error message, see yesterday's CI execution on MacOS: https://github.com/google/conscrypt/actions/runs/12000790815/job/33450371030#step:15:43

@prbprbprb
Copy link
Collaborator

This warning has been bugging me, but I'm not sure this is the right solution.

The Doclet is using the Java 11 javadoc APIs, so org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8 feels wrong. Although if it works, it works :)

@tweksteen
Copy link
Member Author

Yes, you are right. This is odd. I inspected the output .jar of api-doclet and it contains:

Source-Compatibility: 11                                                                                                                                                                                                                            
Target-Compatibility: 11

So I'm not sure if this is a bug in Gradle or in the Kotlin plugin. Either way, I think this is related to how we are currently sharing the logic between the project (aka, the root project build.gradle). I created #1263 which I reckon is the root cause here. Happy to close this PR and follow up with the right approach. Thanks.

@tweksteen tweksteen closed this Nov 25, 2024
@prbprbprb
Copy link
Collaborator

#1263 Looks interesting but potentially a lot of work... Happy to go that way if you have the time to work on it.

@tweksteen tweksteen deleted the fix_jvm_kotlin_version branch November 27, 2024 03:15
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