-
Notifications
You must be signed in to change notification settings - Fork 37
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
Adding Kotlin compile support #189
Adding Kotlin compile support #189
Conversation
kotlin { | ||
compilerOptions { | ||
jvmTarget.set(JvmTarget.fromTarget(javaVersion.toString())) | ||
languageVersion.set(minKotlinVersion) |
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.
languageVersion.set(minKotlinVersion) | |
languageVersion.set(minKotlinVersion) | |
apiVersion.set(minKotlinVersion) |
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.
Probably has to change in the other places as well
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.
Cool, I'll make the changes 👍 tbh the docs for that option weren't too clear for me so I wasn't sure if we needed it. Though I guess is better to have it to avoid unexpected issues. We should probably add it in the core repo too, as it's only got languageVersion set.
sourceCompatibility(javaVersion) | ||
targetCompatibility(javaVersion) | ||
isCoreLibraryDesugaringEnabled = true | ||
} | ||
} | ||
kotlin { |
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.
Usually this configuration goes in the android.kotlinOptions
block:
android {
kotlinOptions {
// jvmTarget
// languageVersion
// apiVersion
}
}
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.
It seems like the android.kotlinOptions is just a wrapper of the other config, though yeah it's usually the way Android suggests to set Kotlin stuff so I've made the changes 👍
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.
LGTM. One step closer! Thanks.
# Conflicts: # gradle/libs.versions.toml
Related to this discussion.