[Gradle] Implement kotlin-gradle-plugin-annotations module

This will include Internal* and *Experimental annotations for the
Kotlin Gradle Plugin. The separate module is proposed, so that
additional modules can use those annotations without
a dependency to the full kotlin-gradle-plugin-api module
(see -idea modules)

^KT-54029 WIP
This commit is contained in:
Sebastian Sellmair
2022-09-14 16:59:33 +02:00
committed by Space
parent d9c5f100db
commit 8189d7b254
8 changed files with 43 additions and 0 deletions
+1
View File
@@ -380,6 +380,7 @@ val projectsWithEnabledContextReceivers by extra {
val gradlePluginProjects = listOf(
":kotlin-gradle-plugin",
":kotlin-gradle-plugin-api",
":kotlin-gradle-plugin-annotations",
":kotlin-gradle-plugin-idea",
":kotlin-gradle-plugin-idea-proto",
":kotlin-gradle-plugin-kpm-android",
+1
View File
@@ -44,6 +44,7 @@ val kotlinGradlePluginAndItsRequired = arrayOf(
":kotlin-daemon-client",
":kotlin-project-model",
":kotlin-gradle-plugin-api",
":kotlin-gradle-plugin-annotations",
":kotlin-gradle-plugin-idea",
":kotlin-gradle-plugin-idea-proto",
":kotlin-gradle-plugin",
+1
View File
@@ -18,6 +18,7 @@
<trust group="org.jetbrains.kotlin" name="kotlin-daemon-embeddable"/>
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin"/>
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-api"/>
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-annotations"/>
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-model"/>
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-idea"/>
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-idea-proto"/>
@@ -0,0 +1,12 @@
plugins {
kotlin("jvm")
}
configureKotlinCompileTasksGradleCompatibility()
publish()
standardPublicJars()
dependencies {
compileOnly(kotlinStdlib())
}
@@ -0,0 +1,13 @@
/*
* 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.gradle
@RequiresOptIn(
message = "Experimental API in the Kotlin Gradle Plugin: No stability guarantees can be provided. " +
"The API could get removed in the future without replacement",
level = RequiresOptIn.Level.WARNING
)
annotation class ExperimentalKotlinGradlePluginApi
@@ -0,0 +1,12 @@
/*
* 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.gradle
@RequiresOptIn(
message = "This API is not intended to be used outside of JetBrains / outside the Kotlin Gradle Plugin",
level = RequiresOptIn.Level.ERROR
)
annotation class InternalKotlinGradlePluginApi
@@ -4,6 +4,7 @@ plugins {
}
dependencies {
commonApi(project(":kotlin-gradle-plugin-annotations"))
commonApi(project(":native:kotlin-native-utils"))
commonApi(project(":kotlin-project-model"))
commonImplementation(project(":kotlin-tooling-core"))
+2
View File
@@ -251,6 +251,7 @@ include ":kotlin-imports-dumper-compiler-plugin",
":kotlin-project-model-tests-generator",
":kotlin-gradle-compiler-types",
":kotlin-gradle-plugin-api",
":kotlin-gradle-plugin-annotations",
":kotlin-gradle-plugin-idea",
":kotlin-gradle-plugin-idea-proto",
":kotlin-gradle-plugin-idea-for-compatibility-tests",
@@ -756,6 +757,7 @@ project(':kotlin-project-model').projectDir = "$rootDir/libraries/tools/kotlin-p
project(':kotlin-project-model-tests-generator').projectDir = "$rootDir/libraries/tools/kotlin-project-model-tests-generator" as File
project(':kotlin-gradle-compiler-types').projectDir = "$rootDir/libraries/tools/kotlin-gradle-compiler-types" as File
project(':kotlin-gradle-plugin-api').projectDir = "$rootDir/libraries/tools/kotlin-gradle-plugin-api" as File
project(':kotlin-gradle-plugin-annotations').projectDir = "$rootDir/libraries/tools/kotlin-gradle-plugin-annotations" as File
project(':kotlin-gradle-plugin-idea').projectDir = "$rootDir/libraries/tools/kotlin-gradle-plugin-idea" as File
project(':kotlin-gradle-plugin-idea-proto').projectDir = "$rootDir/libraries/tools/kotlin-gradle-plugin-idea-proto" as File
project(':kotlin-gradle-plugin-idea-for-compatibility-tests').projectDir = "$rootDir/libraries/tools/kotlin-gradle-plugin-idea-for-compatibility-tests" as File