Skip to content

Conversation

rajveermalviya
Copy link
Member

@rajveermalviya rajveermalviya force-pushed the pr-migrate-kotlinOptions branch from 842aceb to 29e9482 Compare August 26, 2025 17:33
@rajveermalviya rajveermalviya added the maintainer review PR ready for review by Zulip maintainers label Aug 26, 2025
Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

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

Thanks! Small comment below.

Comment on lines -85 to +87
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile).configureEach {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the reason to change org.jetbrains.kotlin.gradle.tasks.KotlinCompile to org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile?

Copy link
Member Author

@rajveermalviya rajveermalviya Aug 27, 2025

Choose a reason for hiding this comment

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

KotlinCompile (not sure why it's documentation is in org.jetbrains.kotlin.gradle.dsl package and not org.jetbrains.kotlin.gradle.tasks) is deprecated in favor of one-of the KotlinCompilationTask, and KotlinJvmCompile is a subclass of KotlinCompilationTask.

Also the migration guide (expand the "Migrate from kotlinOptions {} to compilerOptions {}" section) has a handy migration example for this "compilation unit level" configuration.

Copy link
Collaborator

Choose a reason for hiding this comment

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

(I think you mean KotlinCompile is the deprecated thing?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yes!

@chrisbobbe chrisbobbe requested a review from gnprice August 29, 2025 00:14
@chrisbobbe chrisbobbe assigned gnprice and unassigned chrisbobbe Aug 29, 2025
@chrisbobbe chrisbobbe added integration review Added by maintainers when PR may be ready for integration and removed maintainer review PR ready for review by Zulip maintainers labels Aug 29, 2025
@chrisbobbe
Copy link
Collaborator

Thanks! LGTM, marking for Greg's review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration review Added by maintainers when PR may be ready for integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to compilerOptions from kotlinOptions in Gradle scripts
3 participants