-
Notifications
You must be signed in to change notification settings - Fork 18
Constraint Kotlin language version for the Gradle plugin #656
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR configures the Gradle plugin build with explicit Kotlin compiler options and Gradle API version requirements. The changes standardize the build configuration to target JDK 17 and Kotlin 2.2, while declaring compatibility with Gradle API 9.0.0.
Key changes:
- Adds Kotlin compiler options including API/language version 2.2, JVM target 17, and warning-as-error enforcement
- Declares Gradle Plugin API version 9.0.0 for the plugin's published metadata
- Configures Java compilation to use JDK 17 release flag
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment was marked as outdated.
This comment was marked as outdated.
bbe5265 to
495784b
Compare
495784b to
c74152c
Compare
|
|
||
| kotlin { | ||
| compilerOptions { | ||
| jvmTarget = JvmTarget.JVM_21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fallback to the default, Java 17. Seems no need to require it running on Java 21.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's check after the merge; I remember it was needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
build.gradle.kts (1)
5-7: Remove unused importJvmDefaultMode.The import at line 5 is not referenced in this file.
-import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
build.gradle.kts(2 hunks)gradle/libs.versions.toml(1 hunks)tools/cli/build.gradle.kts(0 hunks)tools/gradle-plugin/build.gradle.kts(3 hunks)
💤 Files with no reviewable changes (1)
- tools/cli/build.gradle.kts
🚧 Files skipped from review as they are similar to previous changes (2)
- tools/gradle-plugin/build.gradle.kts
- gradle/libs.versions.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build (ubuntu-latest)
🔇 Additional comments (2)
build.gradle.kts (2)
80-85: Approve centralized Kotlin compiler configuration.The KotlinCompile task configuration cleanly centralizes language and release targets across all projects. The combination of
jvmTargetand-Xjdk-releaseensures consistent bytecode generation and cross-compilation compatibility.
76-85: API contract verified—no issues found.The centralized configuration is correct.
JvmTarget.fromTarget()is a public Kotlin API that accepts string parameters, andlibs.versions.jdkRelease.get()returns"17", which is a fully supported target version. The call at line 82 follows the documented API usage pattern and will produce the expected enum valueJvmTarget.JVM_17.The subproject override in
tools/idea-plugin/build.gradle.kts(hardcoded toJvmTarget.JVM_21) is intentional and documented with a comment explaining the IDEA 2024.2+ requirement.
No description provided.