Update Kotlin repo for bootstrap update
^KT-27301 Fixed
This commit is contained in:
@@ -139,6 +139,7 @@ fun Project.createGradleCommonSourceSet(): SourceSet {
|
||||
// Common outputs will also produce '${project.name}.kotlin_module' file, so we need to avoid
|
||||
// files clash
|
||||
tasks.named<KotlinCompile>("compile${commonSourceSet.name.replaceFirstChar { it.uppercase() }}Kotlin") {
|
||||
@Suppress("DEPRECATION")
|
||||
kotlinOptions {
|
||||
moduleName = "${this@createGradleCommonSourceSet.name}_${commonSourceSet.name}"
|
||||
}
|
||||
@@ -479,6 +480,7 @@ fun Project.createGradlePluginVariant(
|
||||
|
||||
// KT-52138: Make module name the same for all variants, so KSP could access internal methods/properties
|
||||
tasks.named<KotlinCompile>("compile${variantSourceSet.name.replaceFirstChar { it.uppercase() }}Kotlin") {
|
||||
@Suppress("DEPRECATION")
|
||||
kotlinOptions {
|
||||
moduleName = this@createGradlePluginVariant.name
|
||||
}
|
||||
@@ -515,6 +517,7 @@ private fun Project.commonVariantAttributes(): Action<Configuration> = Action<Co
|
||||
}
|
||||
|
||||
fun Project.configureKotlinCompileTasksGradleCompatibility() {
|
||||
@Suppress("DEPRECATION")
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions.languageVersion = "1.4"
|
||||
kotlinOptions.apiVersion = "1.4"
|
||||
|
||||
@@ -123,6 +123,7 @@ fun KotlinCompile.configureTaskToolchain(
|
||||
)
|
||||
)
|
||||
)
|
||||
@Suppress("DEPRECATION")
|
||||
kotlinOptions {
|
||||
jvmTarget = jdkVersion.targetName
|
||||
}
|
||||
@@ -165,6 +166,7 @@ fun Project.updateJvmTarget(
|
||||
.withType<KotlinCompile>()
|
||||
.matching { it.name != "compileJava9Kotlin" }
|
||||
.configureEach {
|
||||
@Suppress("DEPRECATION")
|
||||
kotlinOptions.jvmTarget = jvmTarget
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ fun Project.configureJava9Compilation(
|
||||
|
||||
tasks.named("compileJava9Kotlin", KotlinCompile::class.java) {
|
||||
configureTaskToolchain(JdkMajorVersion.JDK_9)
|
||||
@Suppress("DEPRECATION")
|
||||
kotlinOptions.jvmTarget = JdkMajorVersion.JDK_9.targetName
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ fun Project.configureKotlinCompilationOptions() {
|
||||
val useFirIC by extra(project.kotlinBuildProperties.useFirTightIC)
|
||||
val renderDiagnosticNames by extra(project.kotlinBuildProperties.renderDiagnosticNames)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().configureEach {
|
||||
kotlinOptions {
|
||||
languageVersion = kotlinLanguageVersion
|
||||
@@ -127,8 +128,10 @@ fun Project.configureKotlinCompilationOptions() {
|
||||
!kotlinBuildProperties.getBoolean("kotlin.build.use.absolute.paths.in.klib")
|
||||
}
|
||||
|
||||
// Workaround to avoid remote build cache misses due to absolute paths in relativePathBaseArg
|
||||
doFirst {
|
||||
if (relativePathBaseArg != null) {
|
||||
@Suppress("DEPRECATION")
|
||||
kotlinOptions.freeCompilerArgs += relativePathBaseArg
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,6 +333,7 @@ fun Project.confugureFirPluginAnnotationsDependency(testTask: TaskProvider<Test>
|
||||
}
|
||||
|
||||
fun Project.optInToExperimentalCompilerApi() {
|
||||
@Suppress("DEPRECATION")
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi"
|
||||
|
||||
Reference in New Issue
Block a user