[Gradle] Add required suppressions for API .dsl package

Some classes or fields in this package should not be present in the
documentation.

^KT-58858 In Progress
This commit is contained in:
Yahor Berdnikau
2023-09-05 22:24:45 +02:00
committed by Space Team
parent f78cddcd3f
commit b22185f140
3 changed files with 51 additions and 0 deletions
@@ -11,6 +11,9 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType
import org.jetbrains.kotlin.konan.target.KonanTarget
/**
* @suppress
*/
interface KotlinArtifact : Named, ExtensionAware {
val artifactName: String
val modules: Set<Any>
@@ -19,6 +22,9 @@ interface KotlinArtifact : Named, ExtensionAware {
fun registerAssembleTask(project: Project)
}
/**
* @suppress
*/
interface KotlinNativeArtifact : KotlinArtifact {
val modes: Set<NativeBuildType>
val isStatic: Boolean
@@ -28,25 +34,40 @@ interface KotlinNativeArtifact : KotlinArtifact {
val binaryOptions: Map<String, String>
}
/**
* @suppress
*/
interface KotlinNativeLibrary : KotlinNativeArtifact {
val target: KonanTarget
}
/**
* @suppress
*/
interface KotlinNativeFramework : KotlinNativeArtifact {
val target: KonanTarget
val embedBitcode: BitcodeEmbeddingMode?
}
/**
* @suppress
*/
interface KotlinNativeFatFramework : KotlinNativeArtifact {
val targets: Set<KonanTarget>
val embedBitcode: BitcodeEmbeddingMode?
}
/**
* @suppress
*/
interface KotlinNativeXCFramework : KotlinNativeArtifact {
val targets: Set<KonanTarget>
val embedBitcode: BitcodeEmbeddingMode?
}
/**
* @suppress
*/
interface KotlinArtifactConfig {
val artifactName: String
val modules: Set<Any>
@@ -55,6 +76,9 @@ interface KotlinArtifactConfig {
fun createArtifact(extensions: ExtensionAware): KotlinArtifact
}
/**
* @suppress
*/
interface KotlinNativeArtifactConfig : KotlinArtifactConfig {
var modes: Set<NativeBuildType>
fun modes(vararg modes: NativeBuildType)
@@ -65,27 +89,42 @@ interface KotlinNativeArtifactConfig : KotlinArtifactConfig {
fun binaryOption(name: String, value: String)
}
/**
* @suppress
*/
interface KotlinNativeLibraryConfig : KotlinNativeArtifactConfig {
var target: KonanTarget
}
/**
* @suppress
*/
interface KotlinNativeFrameworkConfig : KotlinNativeArtifactConfig {
var target: KonanTarget
var embedBitcode: BitcodeEmbeddingMode?
}
/**
* @suppress
*/
interface KotlinNativeFatFrameworkConfig : KotlinNativeArtifactConfig {
var targets: Set<KonanTarget>
fun targets(vararg targets: KonanTarget)
var embedBitcode: BitcodeEmbeddingMode?
}
/**
* @suppress
*/
interface KotlinNativeXCFrameworkConfig : KotlinNativeArtifactConfig {
var targets: Set<KonanTarget>
fun targets(vararg targets: KonanTarget)
var embedBitcode: BitcodeEmbeddingMode?
}
/**
* @suppress
*/
interface KotlinArtifactsExtension {
//Extending by external plugins:
//
@@ -105,6 +144,9 @@ interface KotlinArtifactsExtension {
val Native: KotlinNativeArtifactDSL
}
/**
* @suppress
*/
interface KotlinNativeArtifactDSL {
@RequiresOptIn(
message = "This API is experimental. It may be changed in the future.",
@@ -14,6 +14,9 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.plugin.KotlinHierarchyBuilder
import org.jetbrains.kotlin.gradle.plugin.KotlinHierarchyTemplate
/**
* @suppress
*/
@Deprecated("Use 'KotlinHierarchyTemplate' instead")
@ExperimentalKotlinGradlePluginApi
interface KotlinTargetHierarchyDsl {
@@ -35,6 +35,9 @@ interface KotlinTopLevelExtensionConfig {
* Different modes that can be used to set the level of issue reporting for [KotlinTopLevelExtensionConfig.explicitApi] option.
*/
enum class ExplicitApiMode(
/**
* @suppress
*/
@Deprecated("Should not be exposed in api", level = DeprecationLevel.ERROR)
val cliOption: String
) {
@@ -47,6 +50,9 @@ enum class ExplicitApiMode(
/** Disable issues reporting. */
Disabled("disable");
/**
* @suppress
*/
@Deprecated("Should not be exposed in api", level = DeprecationLevel.ERROR)
@Suppress("DEPRECATION_ERROR")
fun toCompilerArg() = "-Xexplicit-api=$cliOption"