Use type-safe model accessors for Gradle plugin #KT-31766 Fixed
This commit is contained in:
+9
-2
@@ -139,8 +139,15 @@ class KotlinDslGradleKotlinJavaFrameworkSupportProvider :
|
|||||||
val jvmTarget = getDefaultJvmTarget(rootModel.sdk, bundledRuntimeVersion())
|
val jvmTarget = getDefaultJvmTarget(rootModel.sdk, bundledRuntimeVersion())
|
||||||
if (jvmTarget != null) {
|
if (jvmTarget != null) {
|
||||||
buildScriptData
|
buildScriptData
|
||||||
.addImport("import org.jetbrains.kotlin.gradle.tasks.KotlinCompile")
|
.addOther(
|
||||||
.addOther("tasks.withType<KotlinCompile> {\n kotlinOptions.jvmTarget = \"1.8\"\n}\n")
|
"tasks {\n" +
|
||||||
|
" compileKotlin {\n" +
|
||||||
|
" kotlinOptions {\n" +
|
||||||
|
" jvmTarget = \"8\"\n" +
|
||||||
|
" }\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val artifactId = getStdlibArtifactId(rootModel.sdk, bundledRuntimeVersion())
|
val artifactId = getStdlibArtifactId(rootModel.sdk, bundledRuntimeVersion())
|
||||||
|
|||||||
Reference in New Issue
Block a user