[Compiler] Mark all entrypoints to compiler API as experimental
This commit is contained in:
committed by
teamcity
parent
169e80e8c9
commit
1a8496757e
+2
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.analysis.api.fir.utils
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar
|
||||
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
|
||||
import org.jetbrains.kotlin.config.AnalysisFlag
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.LanguageVersion
|
||||
@@ -65,6 +66,7 @@ private class EnabledByDirectiveConfiguratorDecorator(
|
||||
original.legacyRegisterCompilerExtensions(project, module, configuration)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalCompilerApi::class)
|
||||
override fun CompilerPluginRegistrar.ExtensionStorage.registerCompilerExtensions(
|
||||
module: TestModule,
|
||||
configuration: CompilerConfiguration
|
||||
|
||||
+2
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.analysis.low.level.api.fir.test.base
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar
|
||||
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
|
||||
import org.jetbrains.kotlin.config.AnalysisFlag
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.LanguageVersion
|
||||
@@ -65,6 +66,7 @@ private class EnabledByDirectiveConfiguratorDecorator(
|
||||
original.legacyRegisterCompilerExtensions(project, module, configuration)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalCompilerApi::class)
|
||||
override fun CompilerPluginRegistrar.ExtensionStorage.registerCompilerExtensions(
|
||||
module: TestModule,
|
||||
configuration: CompilerConfiguration
|
||||
|
||||
@@ -330,3 +330,11 @@ fun Project.confugureFirPluginAnnotationsDependency(testTask: TaskProvider<Test>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.optInToExperimentalCompilerApi() {
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ dependencies {
|
||||
antLauncherJar(toolsJar())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" {
|
||||
|
||||
@@ -53,6 +53,10 @@ sourceSets {
|
||||
"test" { }
|
||||
}
|
||||
|
||||
allprojects {
|
||||
optInToExperimentalCompilerApi()
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||
kotlinOptions {
|
||||
languageVersion = "1.4"
|
||||
|
||||
@@ -21,6 +21,8 @@ sourceSets {
|
||||
"test" {}
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
tasks.getByName<Jar>("jar") {
|
||||
//excludes unused bunch files
|
||||
exclude("META-INF/extensions/*.xml.**")
|
||||
|
||||
@@ -24,6 +24,8 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
|
||||
@@ -18,3 +18,5 @@ sourceSets {
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions.freeCompilerArgs += "-Xjvm-default=all-compatibility"
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
+2
-1
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.compiler.plugin
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.CompilerConfigurationKey
|
||||
|
||||
@ExperimentalCompilerApi
|
||||
interface CommandLineProcessor {
|
||||
val pluginId: String
|
||||
val pluginOptions: Collection<AbstractCliOption>
|
||||
@@ -63,4 +64,4 @@ interface CommandLineProcessor {
|
||||
|
||||
return this.toMutableList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -11,6 +11,7 @@ import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.CompilerConfigurationKey
|
||||
import org.jetbrains.kotlin.extensions.ProjectExtensionDescriptor
|
||||
|
||||
@ExperimentalCompilerApi
|
||||
abstract class CompilerPluginRegistrar {
|
||||
companion object {
|
||||
val COMPILER_PLUGIN_REGISTRARS: CompilerConfigurationKey<MutableList<CompilerPluginRegistrar>> =
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.config.CompilerConfigurationKey
|
||||
replaceWith = ReplaceWith("CompilerPluginRegistrar", "org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar"),
|
||||
level = DeprecationLevel.WARNING
|
||||
)
|
||||
@ExperimentalCompilerApi
|
||||
interface ComponentRegistrar {
|
||||
companion object {
|
||||
@Suppress("DEPRECATION")
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.compiler.plugin
|
||||
|
||||
@RequiresOptIn("This API is experimental. There are no stability guarantees for it")
|
||||
annotation class ExperimentalCompilerApi
|
||||
@@ -17,6 +17,8 @@ dependencies {
|
||||
testRuntimeOnly(commonDependency("net.java.dev.jna:jna"))
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { none() }
|
||||
"test" { projectDefault() }
|
||||
|
||||
@@ -40,6 +40,8 @@ dependencies {
|
||||
testApi(toolsJar())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
val generationRoot = projectDir.resolve("tests-gen")
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -82,6 +82,8 @@ dependencies {
|
||||
testApiJUnit5()
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { }
|
||||
"test" { projectDefault() }
|
||||
|
||||
@@ -81,6 +81,8 @@ dependencies {
|
||||
|
||||
val generationRoot = projectDir.resolve("tests-gen")
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { }
|
||||
"test" {
|
||||
|
||||
@@ -38,6 +38,7 @@ dependencies {
|
||||
GradleCommonKt.configureCommonPublicationSettingsForGradle(project)
|
||||
GradleCommonKt.configureKotlinCompileTasksGradleCompatibility(project)
|
||||
GradleCommonKt.excludeGradleCommonDependencies(project, sourceSets.main)
|
||||
TasksKt.optInToExperimentalCompilerApi(project)
|
||||
|
||||
extensions.extraProperties["kotlin.stdlib.default.dependency"] = "false"
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ dependencies {
|
||||
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:trove4j"))
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" { projectDefault() }
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
<annotationPaths>
|
||||
<annotationPath>${basedir}/kotlinAnnotation</annotationPath>
|
||||
</annotationPaths>
|
||||
<args>
|
||||
<arg>-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
|
||||
<executions>
|
||||
|
||||
+1
@@ -10,4 +10,5 @@ dependencies {
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
kotlinOptions.freeCompilerArgs += "-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ kotlin.sourceSets.all {
|
||||
languageSettings.optIn("org.jetbrains.kotlin.gradle.plugin.mpp.pm20.AdvancedKotlinGradlePluginApi")
|
||||
languageSettings.optIn("org.jetbrains.kotlin.gradle.kpm.idea.InternalKotlinGradlePluginApi")
|
||||
languageSettings.optIn("org.jetbrains.kotlin.gradle.plugin.ExperimentalKotlinGradlePluginApi")
|
||||
languageSettings.optIn("org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -77,6 +77,11 @@
|
||||
<goals> <goal>compile</goal> </goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
|
||||
@@ -83,6 +83,11 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
|
||||
@@ -83,6 +83,9 @@
|
||||
|
||||
<configuration>
|
||||
<jvmTarget>1.8</jvmTarget>
|
||||
<args>
|
||||
<arg>-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -54,6 +54,11 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
|
||||
@@ -80,6 +80,11 @@
|
||||
<goals> <goal>compile</goal> </goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
<args>
|
||||
<arg>-Xjvm-default=enable</arg>
|
||||
<arg>-opt-in=org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI</arg>
|
||||
<arg>-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -30,6 +30,8 @@ dependencies {
|
||||
testApi(intellijCore())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
force(commonDependency("junit:junit"))
|
||||
|
||||
@@ -24,6 +24,8 @@ dependencies {
|
||||
runtimeOnly(kotlinStdlib())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
|
||||
@@ -33,6 +33,8 @@ dependencies {
|
||||
testRuntimeOnly(project(":core:descriptors.runtime"))
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { none() }
|
||||
"test" {
|
||||
|
||||
@@ -43,6 +43,8 @@ dependencies {
|
||||
androidExtensionsRuntimeForTests(project(":kotlin-android-extensions-runtime")) { isTransitive = false }
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
|
||||
@@ -92,11 +92,15 @@ dependencies {
|
||||
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.6.2")
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
@@ -39,6 +39,8 @@ dependencies {
|
||||
testRuntimeOnly(toolsJar())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
val generationRoot = projectDir.resolve("tests-gen")
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -30,4 +30,6 @@ projectTest {
|
||||
dependsOn(":dist")
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
runtimeJar()
|
||||
|
||||
@@ -46,6 +46,8 @@ dependencies {
|
||||
testImplementation(projectTests(":compiler:incremental-compilation-impl"))
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
publish()
|
||||
|
||||
noDefaultJar()
|
||||
|
||||
@@ -39,6 +39,8 @@ dependencies {
|
||||
embedded(project(":kotlin-annotation-processing-base")) { isTransitive = false }
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
|
||||
@@ -47,6 +47,8 @@ tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||
}
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
@@ -57,4 +59,4 @@ projectTest(parallel = true, jUnitMode = JUnitMode.JUnit5) {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
val generateTests by generator("org.jetbrains.kotlinx.serialization.TestGeneratorKt")
|
||||
val generateTests by generator("org.jetbrains.kotlinx.serialization.TestGeneratorKt")
|
||||
|
||||
@@ -44,6 +44,8 @@ dependencies {
|
||||
testRuntimeOnly(toolsJar())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { none() }
|
||||
"test" {
|
||||
|
||||
@@ -20,6 +20,8 @@ dependencies {
|
||||
compileOnly(intellijCore())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
|
||||
@@ -29,6 +29,8 @@ dependencies {
|
||||
testApi(intellijCore())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { none() }
|
||||
"test" {
|
||||
@@ -37,6 +39,8 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
@@ -18,6 +18,8 @@ dependencies {
|
||||
compileOnly(intellijCore())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
|
||||
@@ -61,6 +61,8 @@ dependencies {
|
||||
layoutLibApi("com.android.tools.layoutlib:layoutlib-api:26.5.0") { isTransitive = false }
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { none() }
|
||||
"test" {
|
||||
|
||||
@@ -23,6 +23,8 @@ sourceSets {
|
||||
"test" { none() }
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
runtimeJar()
|
||||
javadocJar()
|
||||
sourcesJar()
|
||||
|
||||
@@ -35,6 +35,8 @@ dependencies {
|
||||
testApi(intellijCore())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { none() }
|
||||
"test" {
|
||||
|
||||
@@ -15,6 +15,8 @@ dependencies {
|
||||
compileOnly(intellijCore())
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
|
||||
@@ -36,6 +36,8 @@ dependencies {
|
||||
testImplementation(project(":kotlin-reflect"))
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
|
||||
Reference in New Issue
Block a user