Skip to content

Commit

Permalink
Rename DokkaInternalApi to InternalDokkaGradlePluginApi (#3867)
Browse files Browse the repository at this point in the history
* Rename DokkaInternalApi to InternalDokkaGradlePluginApi

KT-72266
  • Loading branch information
adam-enko authored Oct 31, 2024
1 parent 2d648e0 commit 623ee35
Show file tree
Hide file tree
Showing 43 changed files with 102 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ abstract class GenerateDokkaGradlePluginConstants @Inject constructor(
| */
|package org.jetbrains.dokka.gradle.internal
|
|@DokkaInternalApi
|@InternalDokkaGradlePluginApi
|object DokkaConstants {
|$vals
|}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ public final class org/jetbrains/dokka/gradle/internal/AbstractDokkaTaskExtensio
public static synthetic fun buildJsonConfiguration$default (Lorg/jetbrains/dokka/gradle/AbstractDokkaTask;ZILjava/lang/Object;)Ljava/lang/String;
}

public abstract interface annotation class org/jetbrains/dokka/gradle/internal/DokkaInternalApi : java/lang/annotation/Annotation {
public abstract interface annotation class org/jetbrains/dokka/gradle/internal/InternalDokkaGradlePluginApi : java/lang/annotation/Annotation {
}

public final class org/jetbrains/dokka/gradle/internal/V2MigrationUtilsKt$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action {
Expand Down
4 changes: 2 additions & 2 deletions dokka-runners/dokka-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kotlin {
compilerOptions {
optIn.addAll(
"kotlin.RequiresOptIn",
"org.jetbrains.dokka.gradle.internal.DokkaInternalApi",
"org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi",
"kotlin.io.path.ExperimentalPathApi",
)
}
Expand Down Expand Up @@ -208,7 +208,7 @@ testing.suites {
skipTestFixturesPublications()

apiValidation {
nonPublicMarkers.add("org.jetbrains.dokka.gradle.internal.DokkaInternalApi")
nonPublicMarkers.add("org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi")
}

val generateDokkaGradlePluginConstants by tasks.registering(GenerateDokkaGradlePluginConstants::class) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import javax.inject.Inject
* but does not add any specific config (specifically, it does not create Dokka Publications).
*/
abstract class DokkaBasePlugin
@DokkaInternalApi
@InternalDokkaGradlePluginApi
@Inject
constructor(
private val providers: ProviderFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import kotlin.DeprecationLevel.ERROR
* Configure the behaviour of the [DokkaBasePlugin].
*/
abstract class DokkaExtension
@DokkaInternalApi
@InternalDokkaGradlePluginApi
constructor(
private val objects: ObjectFactory,
internal val baseDependencyManager: BaseDependencyManager,
Expand Down Expand Up @@ -117,7 +117,7 @@ constructor(
* projects with a version below 2.0.
*/
// This property should be removed when Dokka only supports KGP 2 or higher.
@DokkaInternalApi
@InternalDokkaGradlePluginApi
abstract val konanHome: RegularFileProperty

/**
Expand Down Expand Up @@ -398,8 +398,9 @@ constructor(
*
* ```
* import org.jetbrains.dokka.gradle.engine.plugins.DokkaPluginParametersBaseSpec
* import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
*
* @OptIn(DokkaInternalApi::class)
* @OptIn(InternalDokkaGradlePluginApi::class)
* abstract class MyCustomDokkaPluginConfiguration @Inject constructor(
* name: String
* ) : DokkaPluginParametersBaseSpec(name, "demo.MyCustomDokkaPlugin") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.jetbrains.dokka.gradle.formats.DokkaHtmlPlugin
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
import org.jetbrains.dokka.gradle.internal.PluginFeaturesService.Companion.pluginFeaturesService
import org.jetbrains.dokka.gradle.internal.addV2MigrationHelpers
import javax.inject.Inject
Expand All @@ -20,7 +20,7 @@ import org.jetbrains.dokka.gradle.DokkaClassicPlugin as ClassicDokkaPlugin
*/
abstract class DokkaPlugin
@Inject
@DokkaInternalApi
@InternalDokkaGradlePluginApi
constructor() : Plugin<Project> {

override fun apply(project: Project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.gradle.kotlin.dsl.withType
import org.jetbrains.dokka.gradle.DokkaBasePlugin
import org.jetbrains.dokka.gradle.DokkaExtension
import org.jetbrains.dokka.gradle.engine.parameters.KotlinPlatform
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
import org.jetbrains.dokka.gradle.internal.PluginId
import org.jetbrains.dokka.gradle.internal.artifactType
import java.io.File
Expand All @@ -33,7 +33,7 @@ import javax.inject.Inject
* This is an internal Dokka plugin and should not be used externally.
* It is not a standalone plugin, it requires [org.jetbrains.dokka.gradle.DokkaBasePlugin] is also applied.
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
abstract class AndroidAdapter @Inject constructor(
private val objects: ObjectFactory,
) : Plugin<Project> {
Expand Down Expand Up @@ -78,7 +78,7 @@ abstract class AndroidAdapter @Inject constructor(
}
}

@DokkaInternalApi
@InternalDokkaGradlePluginApi
companion object
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.gradle.kotlin.dsl.withType
import org.jetbrains.dokka.gradle.DokkaExtension
import org.jetbrains.dokka.gradle.engine.parameters.DokkaSourceSetSpec
import org.jetbrains.dokka.gradle.engine.parameters.KotlinPlatform
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
import org.jetbrains.dokka.gradle.internal.PluginId
import org.jetbrains.dokka.gradle.internal.or
import org.jetbrains.dokka.gradle.internal.uppercaseFirstChar
Expand All @@ -33,7 +33,7 @@ import javax.inject.Inject
* This is an internal Dokka plugin and should not be used externally.
* It is not a standalone plugin, it requires [org.jetbrains.dokka.gradle.DokkaBasePlugin] is also applied.
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
abstract class JavaAdapter @Inject constructor(
private val providers: ProviderFactory,
) : Plugin<Project> {
Expand Down Expand Up @@ -133,7 +133,7 @@ abstract class JavaAdapter @Inject constructor(
return projectHasKotlinPlugin or projectHasAndroidPlugin
}

@DokkaInternalApi
@InternalDokkaGradlePluginApi
companion object {
/**
* Determine if a [KotlinCompilation] is 'publishable', and so should be enabled by default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import kotlin.reflect.jvm.jvmName
* This is an internal Dokka plugin and should not be used externally.
* It is not a standalone plugin, it requires [org.jetbrains.dokka.gradle.DokkaBasePlugin] is also applied.
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
abstract class KotlinAdapter @Inject constructor(
private val objects: ObjectFactory,
private val providers: ProviderFactory,
Expand Down Expand Up @@ -178,7 +178,7 @@ abstract class KotlinAdapter @Inject constructor(
}
}

@DokkaInternalApi
@InternalDokkaGradlePluginApi
companion object {
private val dkaName: String = KotlinAdapter::class.simpleName!!

Expand Down Expand Up @@ -220,7 +220,7 @@ abstract class KotlinAdapter @Inject constructor(
* The compilation details may come from a multiplatform project ([KotlinMultiplatformExtension])
* or a single-platform project ([KotlinSingleTargetExtension]).
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
private data class KotlinCompilationDetails(
val target: String,
val kotlinPlatform: KotlinPlatform,
Expand Down Expand Up @@ -400,7 +400,7 @@ private class KotlinCompilationDetailsBuilder(
*
* @param[named] Should be [KotlinSourceSet.getName]
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
private abstract class KotlinSourceSetDetails @Inject constructor(
private val named: String,
) : Named {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import org.gradle.api.artifacts.Configuration
import org.gradle.api.model.ObjectFactory
import org.jetbrains.dokka.gradle.DokkaBasePlugin.Companion.DOKKA_CONFIGURATION_NAME
import org.jetbrains.dokka.gradle.DokkaBasePlugin.Companion.DOKKA_GENERATOR_PLUGINS_CONFIGURATION_NAME
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
import org.jetbrains.dokka.gradle.internal.declarable


/**
* Root [Configuration] for fetching all types of Dokka files from other subprojects.
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class BaseDependencyManager(
project: Project,
objects: ObjectFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package org.jetbrains.dokka.gradle.dependencies
import org.gradle.api.artifacts.Configuration
import org.jetbrains.dokka.gradle.DokkaBasePlugin
import org.jetbrains.dokka.gradle.DokkaBasePlugin.Companion.DOKKA_CONFIGURATION_NAME
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
import org.jetbrains.dokka.gradle.internal.HasFormatName
import org.jetbrains.dokka.gradle.internal.INTERNAL_CONF_NAME_TAG

Expand All @@ -17,7 +17,7 @@ import org.jetbrains.dokka.gradle.internal.INTERNAL_CONF_NAME_TAG
* - [Gradle Configurations][org.gradle.api.artifacts.Configuration] - share files between subprojects. Each has a name.
* - [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration] - parameters for executing the Dokka Generator
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class DependencyContainerNames(override val formatName: String) : HasFormatName() {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,38 @@ import org.gradle.api.Named
import org.gradle.api.artifacts.Configuration
import org.gradle.api.attributes.Attribute
import org.jetbrains.dokka.gradle.internal.Attribute
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi

/**
* Gradle Configuration Attributes for sharing Dokka files across subprojects.
*
* These attributes are used to tag [Configuration]s, so files can be shared between subprojects.
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
interface DokkaAttribute {

/** HTML, Markdown, etc. */
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class Format(private val named: String) : Named {
override fun getName(): String = named
override fun toString(): String = "Format($named)"
}

/** Generated output, or subproject classpath, or included files, etc. */
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class ModuleComponent(private val named: String) : Named {
override fun getName(): String = named
override fun toString(): String = "ModuleComponent($named)"
}

/** A classpath, e.g. for Dokka Plugins or the Dokka Generator. */
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class Classpath(private val named: String) : Named {
override fun getName(): String = named
override fun toString(): String = "Classpath($named)"
}

@DokkaInternalApi
@InternalDokkaGradlePluginApi
companion object {
/**
* Describes the type of generated output that Dokka generates.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import org.jetbrains.dokka.gradle.internal.*
* [DokkaConfiguration][org.jetbrains.dokka.DokkaConfiguration]
* is used to configure Dokka behaviour.)
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class FormatDependenciesManager(
private val formatName: String,
private val baseDependencyManager: BaseDependencyManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import java.io.File
*
* Files are shared using variant-aware Gradle [Configuration]s.
*/
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class ModuleComponentDependencies(
project: Project,
private val component: DokkaAttribute.ModuleComponent,
Expand Down Expand Up @@ -130,7 +130,7 @@ class ModuleComponentDependencies(
}
}

@DokkaInternalApi
@InternalDokkaGradlePluginApi
companion object {
private val logger: Logger = Logging.getLogger(DokkaAttribute.ModuleComponent::class.java)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import org.gradle.api.attributes.Usage
import org.gradle.api.model.ObjectFactory
import org.gradle.kotlin.dsl.named
import org.jetbrains.dokka.gradle.internal.Attribute
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi


/** Common [Attribute] values for Dokka [Configuration]s. */
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class BaseAttributes(
objects: ObjectFactory,
) {
Expand All @@ -31,7 +31,7 @@ class BaseAttributes(


/** [Attribute] values for a specific Dokka format. */
@DokkaInternalApi
@InternalDokkaGradlePluginApi
class FormatAttributes(
formatName: String,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.gradle.api.provider.Provider
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.intellij.lang.annotations.Language
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
import java.io.Serializable
import java.net.URI
import javax.inject.Inject
Expand Down Expand Up @@ -37,7 +37,7 @@ import javax.inject.Inject
* ```
*/
abstract class DokkaExternalDocumentationLinkSpec
@DokkaInternalApi
@InternalDokkaGradlePluginApi
@Inject
constructor(
private val name: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.gradle.api.plugins.ExtensionAware
import org.gradle.api.provider.Property
import org.gradle.api.tasks.*
import org.gradle.api.tasks.PathSensitivity.RELATIVE
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
import org.jetbrains.dokka.gradle.internal.DokkaPluginParametersContainer
import org.jetbrains.dokka.gradle.internal.adding
import org.jetbrains.dokka.gradle.internal.domainObjectContainer
Expand All @@ -27,7 +27,7 @@ import javax.inject.Inject
* [DokkaSourceSetSpec] and [org.jetbrains.dokka.gradle.formats.DokkaPublication].
*/
abstract class DokkaGeneratorParametersSpec
@DokkaInternalApi
@InternalDokkaGradlePluginApi
@Inject
constructor(
objects: ObjectFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package org.jetbrains.dokka.gradle.engine.parameters
import kotlinx.serialization.Serializable
import org.gradle.kotlin.dsl.java
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi

/**
* Any subproject can be merged into a single Dokka Publication. To do this, first it must create
Expand All @@ -24,7 +24,7 @@ import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
* @see org.jetbrains.dokka.DokkaModuleDescriptionImpl
*/
@Serializable
@DokkaInternalApi
@InternalDokkaGradlePluginApi
data class DokkaModuleDescriptionKxs(
/** @see DokkaConfiguration.DokkaModuleDescription.name */
val name: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package org.jetbrains.dokka.gradle.engine.parameters
import org.gradle.api.provider.Property
import org.gradle.api.provider.SetProperty
import org.gradle.api.tasks.Input
import org.jetbrains.dokka.gradle.internal.DokkaInternalApi
import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
import java.io.Serializable

/**
Expand All @@ -28,7 +28,7 @@ import java.io.Serializable
* ```
*/
abstract class DokkaPackageOptionsSpec
@DokkaInternalApi
@InternalDokkaGradlePluginApi
constructor() :
HasConfigurableVisibilityModifiers,
Serializable {
Expand Down
Loading

0 comments on commit 623ee35

Please sign in to comment.