[Repo] Don't use kotlinOptions in repo build scripts

^KT-63419 In Progress
This commit is contained in:
Yahor Berdnikau
2024-02-19 23:34:11 +01:00
committed by Space Team
parent 22e1e79c41
commit 6b19b8b9d0
54 changed files with 300 additions and 204 deletions
@@ -75,7 +75,7 @@ fun Project.checkIdeDependencyConfiguration() {
}
val enabledExperimentalAnnotations =
ExperimentalAnnotationsCollector().getUsedExperimentalAnnotations(compileTask.kotlinOptions.freeCompilerArgs)
ExperimentalAnnotationsCollector().getUsedExperimentalAnnotations(compileTask.compilerOptions.freeCompilerArgs.get())
check(enabledExperimentalAnnotations.isEmpty()) {
"`$name` allows using experimental kotlin stdlib API marked with ${enabledExperimentalAnnotations.joinToString()}. " +
@@ -22,10 +22,10 @@ RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
compileKotlin {
kotlinOptions.freeCompilerArgs = [
compilerOptions.freeCompilerArgs = [
"-Xallow-kotlin-package",
]
kotlinOptions.moduleName = project.name
compilerOptions.moduleName = project.name
}
LibrariesCommon.configureFrontendIr(project)
@@ -1,4 +1,5 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.konan.target.HostManager
import org.jetbrains.kotlin.konan.target.KonanTarget
import java.nio.file.Paths
@@ -120,8 +121,8 @@ val splitGradleIntegrationTestTasks =
project.providers.gradleProperty("gradle.integration.tests.split.tasks").orNull?.toBoolean()
?: project.kotlinBuildProperties.isTeamcityBuild
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.io.path.ExperimentalPathApi"
tasks.withType<KotlinJvmCompile>().configureEach {
compilerOptions.optIn.add("kotlin.io.path.ExperimentalPathApi")
}
val cleanTestKitCacheTask = tasks.register<Delete>("cleanTestKitCache") {
+2 -2
View File
@@ -26,10 +26,10 @@ RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
compileKotlin {
kotlinOptions.freeCompilerArgs = [
compilerOptions.freeCompilerArgs = [
"-Xallow-kotlin-package",
]
kotlinOptions.moduleName = project.name
compilerOptions.moduleName = project.name
}
LibrariesCommon.configureFrontendIr(project)