Rename UseExperimental->OptIn, Experimental->RequiresOptIn in Gradle plugin

This commit is contained in:
Alexander Udalov
2019-12-27 16:35:34 +01:00
parent 8f94a2bb75
commit da077b5353
3 changed files with 5 additions and 5 deletions
@@ -542,8 +542,8 @@ class NewMultiplatformIT : BaseGradleIT() {
assertTasksExecuted(":$it") assertTasksExecuted(":$it")
assertContains( assertContains(
"-language-version 1.3", "-api-version 1.3", "-XXLanguage:+InlineClasses", "-language-version 1.3", "-api-version 1.3", "-XXLanguage:+InlineClasses",
" -progressive", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes", " -progressive", "-Xopt-in=kotlin.ExperimentalUnsignedTypes",
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts" "-Xopt-in=kotlin.contracts.ExperimentalContracts"
) )
} }
} }
@@ -103,7 +103,7 @@ internal fun applyLanguageSettingsToKotlinTask(
} }
languageSettingsBuilder.experimentalAnnotationsInUse.forEach { annotationName -> languageSettingsBuilder.experimentalAnnotationsInUse.forEach { annotationName ->
freeCompilerArgs += "-Xuse-experimental=$annotationName" freeCompilerArgs += "-Xopt-in=$annotationName"
} }
} }
@@ -354,7 +354,7 @@ open class KotlinNativeCompile : AbstractKotlinNativeCompile<KotlinCommonOptions
add("-XXLanguage:+$featureName") add("-XXLanguage:+$featureName")
} }
experimentalAnnotationsInUse.forEach { annotationName -> experimentalAnnotationsInUse.forEach { annotationName ->
add("-Xuse-experimental=$annotationName") add("-Xopt-in=$annotationName")
} }
} }
@@ -545,7 +545,7 @@ open class KotlinNativeLink : AbstractKotlinNativeCompile<KotlinCommonToolOption
add("-XXLanguage:+$featureName") add("-XXLanguage:+$featureName")
} }
it.experimentalAnnotationsInUse.forEach { annotationName -> it.experimentalAnnotationsInUse.forEach { annotationName ->
add("-Xuse-experimental=$annotationName") add("-Xopt-in=$annotationName")
} }
} }
} }