Remove the @Inclubating annotation from UnstableApiUsage inspection
Also remove `@Suppress("UnstableApiUsage)"` where it was relevant
This commit is contained in:
+15
@@ -436,6 +436,21 @@
|
||||
<inspection_tool class="UnnecessaryLabelOnContinueStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryQualifierForThis" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UnnecessaryUnboxing" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnstableApiUsage" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="unstableApiAnnotations">
|
||||
<set>
|
||||
<option value="com.google.common.annotations.Beta" />
|
||||
<option value="io.reactivex.annotations.Beta" />
|
||||
<option value="io.reactivex.annotations.Experimental" />
|
||||
<option value="org.apache.http.annotation.Beta" />
|
||||
<option value="org.jetbrains.annotations.ApiStatus.Experimental" />
|
||||
<option value="org.jetbrains.annotations.ApiStatus.Internal" />
|
||||
<option value="org.jetbrains.annotations.ApiStatus.ScheduledForRemoval" />
|
||||
<option value="rx.annotations.Beta" />
|
||||
<option value="rx.annotations.Experimental" />
|
||||
</set>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UseOfPropertiesAsHashtable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UtilityClassWithPublicConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="VolatileLongOrDoubleField" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
|
||||
@@ -186,7 +186,6 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
|
||||
val getConfigurationName = dependencyHolderClass.getMethodOrNull(configurationNameAccessor) ?: return emptyList()
|
||||
val configurationName = getConfigurationName(dependencyHolder) as? String ?: return emptyList()
|
||||
val configuration = project.configurations.findByName(configurationName) ?: return emptyList()
|
||||
@Suppress("UnstableApiUsage")
|
||||
if (!configuration.isCanBeResolved) return emptyList()
|
||||
|
||||
val dependencyAdjuster =
|
||||
@@ -512,7 +511,6 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
|
||||
return (getCompileClasspath(compileKotlinTask) as? Collection<File>)?.map { it.path } ?: emptyList()
|
||||
}
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
private fun buildCompilationOutput(
|
||||
gradleCompilation: Named,
|
||||
compileKotlinTask: Task
|
||||
@@ -580,7 +578,6 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
private class DependencyAdjuster(
|
||||
private val configuration: Configuration,
|
||||
private val scope: String,
|
||||
|
||||
-1
@@ -196,7 +196,6 @@ internal open class GradleCompilerRunner(protected val task: Task) {
|
||||
project.buildDir,
|
||||
taskData.buildHistoryFile
|
||||
)
|
||||
@Suppress("UnstableApiUsage")
|
||||
dirToModule[taskData.destinationDir.get()] = module
|
||||
|
||||
taskData.javaOutputDir?.let { dirToModule[it] = module }
|
||||
|
||||
-1
@@ -475,7 +475,6 @@ class Kapt3KotlinGradleSubplugin : KotlinGradleSubplugin<KotlinCompile> {
|
||||
val kaptTaskName = getKaptTaskName("kaptGenerateStubs")
|
||||
|
||||
KotlinCompileTaskData.register(kaptTaskName, KotlinCompileTaskData.get(project, kotlinCompile.name).compilation).apply {
|
||||
@Suppress("UnstableApiUsage")
|
||||
useModuleDetection.set(KotlinCompileTaskData.get(project, kotlinCompile.name).useModuleDetection)
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -85,7 +85,6 @@ internal abstract class KotlinSourceSetProcessor<T : AbstractKotlinCompile<*>>(
|
||||
logger.kotlinDebug("Creating kotlin compile task $name")
|
||||
|
||||
KotlinCompileTaskData.register(name, kotlinCompilation).apply {
|
||||
@Suppress("UnstableApiUsage")
|
||||
destinationDir.set(project.provider { defaultKotlinDestinationDir })
|
||||
}
|
||||
|
||||
@@ -920,7 +919,6 @@ abstract class AbstractAndroidProjectHandler<V>(private val kotlinConfigurationT
|
||||
|
||||
KotlinCompileTaskData.register(kotlinTaskName, compilation).apply {
|
||||
// store kotlin classes in separate directory. They will serve as class-path to java compiler
|
||||
@Suppress("UnstableApiUsage")
|
||||
destinationDir.set(project.provider { File(project.buildDir, "tmp/kotlin-classes/$variantDataName") })
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ internal class SourceSetVisibilityProvider(
|
||||
* If the [resolvedMppDependency] is a project dependency, its project should be passed as [resolvedToOtherProject], as
|
||||
* the Gradle API for dependency variants behaves differently for project dependencies and published ones.
|
||||
*/
|
||||
@Suppress("UnstableApiUsage")
|
||||
fun getVisibleSourceSetNames(
|
||||
visibleFrom: KotlinSourceSet,
|
||||
dependencyScopes: Iterable<KotlinDependencyScope>,
|
||||
|
||||
-1
@@ -217,7 +217,6 @@ internal fun KotlinSourceSet.disambiguateName(simpleName: String): String {
|
||||
|
||||
private fun createDefaultSourceDirectorySet(project: Project, name: String?, resolver: FileResolver?): SourceDirectorySet {
|
||||
if (isGradleVersionAtLeast(5, 0)) {
|
||||
@Suppress("UnstableApiUsage")
|
||||
val objects = project.objects
|
||||
val sourceDirectorySetMethod = objects.javaClass.methods.single { it.name == "sourceDirectorySet" && it.parameterCount == 2 }
|
||||
return sourceDirectorySetMethod(objects, name, name) as SourceDirectorySet
|
||||
|
||||
-1
@@ -64,7 +64,6 @@ open class KotlinPackageJsonTask : DefaultTask() {
|
||||
task.description = "Create package.json file for $compilation"
|
||||
task.group = NodeJsRootPlugin.TASKS_GROUP_NAME
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
task.dependsOn(target.project.provider { task.findDependentTasks() })
|
||||
task.mustRunAfter(rootClean)
|
||||
}
|
||||
|
||||
-1
@@ -270,7 +270,6 @@ class KotlinMetadataTargetConfigurator(kotlinPluginVersion: String) :
|
||||
* dependencies during the transformation. */
|
||||
private fun GranularMetadataTransformation.applyToConfiguration(configuration: Configuration) {
|
||||
// Run this action immediately before the configuration first takes part in dependency resolution:
|
||||
@Suppress("UnstableApiUsage")
|
||||
configuration.withDependencies {
|
||||
val (unrequested, requested) = metadataDependencyResolutions
|
||||
.partition { it is MetadataDependencyResolution.ExcludeAsUnrequested }
|
||||
|
||||
-1
@@ -25,7 +25,6 @@ abstract class KotlinTest : AbstractTestTask() {
|
||||
@Input
|
||||
var excludes = mutableSetOf<String>()
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
protected val filterExt: DefaultTestFilter
|
||||
@Internal get() = filter as DefaultTestFilter
|
||||
|
||||
|
||||
+3
-8
@@ -142,7 +142,6 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractKo
|
||||
private val taskData: KotlinCompileTaskData
|
||||
get() = KotlinCompileTaskData.get(project, name)
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
@get:Input
|
||||
internal open var useModuleDetection: Boolean
|
||||
get() = taskData.useModuleDetection.get()
|
||||
@@ -185,21 +184,17 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractKo
|
||||
get() = project.extensions.findByType(KotlinProjectExtension::class.java)!!
|
||||
|
||||
override fun getDestinationDir(): File =
|
||||
@Suppress("UnstableApiUsage")
|
||||
taskData.destinationDir.get()
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
override fun setDestinationDir(provider: Provider<File>) {
|
||||
taskData.destinationDir.set(provider)
|
||||
}
|
||||
|
||||
fun setDestinationDir(provider: () -> File) {
|
||||
@Suppress("UnstableApiUsage")
|
||||
taskData.destinationDir.set(project.provider(provider))
|
||||
}
|
||||
|
||||
override fun setDestinationDir(destinationDir: File) {
|
||||
@Suppress("UnstableApiUsage")
|
||||
taskData.destinationDir.set(destinationDir)
|
||||
}
|
||||
|
||||
@@ -512,21 +507,21 @@ open class KotlinCompile : AbstractKotlinCompile<K2JVMCompilerArguments>(), Kotl
|
||||
|
||||
@CacheableTask
|
||||
internal open class KotlinCompileWithWorkers @Inject constructor(
|
||||
@Suppress("UnstableApiUsage") private val workerExecutor: WorkerExecutor
|
||||
private val workerExecutor: WorkerExecutor
|
||||
) : KotlinCompile() {
|
||||
override fun compilerRunner() = GradleCompilerRunnerWithWorkers(this, workerExecutor)
|
||||
}
|
||||
|
||||
@CacheableTask
|
||||
internal open class Kotlin2JsCompileWithWorkers @Inject constructor(
|
||||
@Suppress("UnstableApiUsage") private val workerExecutor: WorkerExecutor
|
||||
private val workerExecutor: WorkerExecutor
|
||||
) : Kotlin2JsCompile() {
|
||||
override fun compilerRunner() = GradleCompilerRunnerWithWorkers(this, workerExecutor)
|
||||
}
|
||||
|
||||
@CacheableTask
|
||||
internal open class KotlinCompileCommonWithWorkers @Inject constructor(
|
||||
@Suppress("UnstableApiUsage") private val workerExecutor: WorkerExecutor
|
||||
private val workerExecutor: WorkerExecutor
|
||||
) : KotlinCompileCommon() {
|
||||
override fun compilerRunner() = GradleCompilerRunnerWithWorkers(this, workerExecutor)
|
||||
}
|
||||
|
||||
-2
@@ -14,9 +14,7 @@ import java.io.File
|
||||
internal open class KotlinCompileTaskData(
|
||||
val taskName: String,
|
||||
val compilation: AbstractKotlinCompilation<*>,
|
||||
@Suppress("UnstableApiUsage")
|
||||
val destinationDir: Property<File>,
|
||||
@Suppress("UnstableApiUsage")
|
||||
val useModuleDetection: Property<Boolean>
|
||||
) {
|
||||
private val taskBuildDirectory: File
|
||||
|
||||
-3
@@ -121,7 +121,6 @@ open class KotlinTestReport : TestReport() {
|
||||
}
|
||||
|
||||
private fun reportOn(task: AbstractTestTask) {
|
||||
@Suppress("UnstableApiUsage")
|
||||
reportOn(task.binResultsDir)
|
||||
}
|
||||
|
||||
@@ -240,10 +239,8 @@ open class KotlinTestReport : TestReport() {
|
||||
task.ignoreRunFailures = true
|
||||
}
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
task.reports.html.isEnabled = false
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
task.reports.junitXml.isEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -14,12 +14,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinTest
|
||||
import org.jetbrains.kotlin.gradle.utils.isGradleVersionAtLeast
|
||||
import java.io.File
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
internal val Project.testResultsDir: File
|
||||
get() = project.buildDir.resolve(TestingBasePlugin.TEST_RESULTS_DIR_NAME)
|
||||
internal val Project.reportsDir: File
|
||||
get() = project.extensions.getByType(ReportingExtension::class.java).baseDir
|
||||
@Suppress("UnstableApiUsage")
|
||||
|
||||
internal val Project.testReportsDir: File
|
||||
get() = reportsDir.resolve(TestingBasePlugin.TESTS_DIR_NAME)
|
||||
|
||||
|
||||
-1
@@ -73,7 +73,6 @@ internal fun AbstractArchiveTask.setArchiveAppendixCompatible(appendixProvider:
|
||||
internal val AbstractArchiveTask.archivePathCompatible: File
|
||||
get() =
|
||||
if (isGradleVersionAtLeast(5, 1)) {
|
||||
@Suppress("UnstableApiUsage")
|
||||
archiveFile.get().asFile
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
|
||||
Reference in New Issue
Block a user