Skip to content

Instantly share code, notes, and snippets.

@landarskiy
Created November 15, 2022 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save landarskiy/e32cc77142a064f95f79b9f0e4f5ac50 to your computer and use it in GitHub Desktop.
Save landarskiy/e32cc77142a064f95f79b9f0e4f5ac50 to your computer and use it in GitHub Desktop.
internal fun Project.configureKotlin(
commonExtension: CommonExtension<*, *, *, *>,
) {
commonExtension.apply {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
fun CommonExtension<*, *, *, *>.kotlinOptions(block: KotlinJvmOptions.() -> Unit) {
(this as ExtensionAware).extensions.configure("kotlinOptions", block)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment