aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-07-05 10:04:55 +0200
committerGitHub <noreply@github.com>2023-07-05 10:04:55 +0200
commit9559158bfeeb274e9ccf1b4563f1b23b42afc493 (patch)
tree3ece0887623cfe2b7148af23001867a1dd5e6597 /runners/gradle-plugin/src/main
parentcbd9733d3dd2f52992e98e7cebd072091a572529 (diff)
downloaddokka-9559158bfeeb274e9ccf1b4563f1b23b42afc493.tar.gz
dokka-9559158bfeeb274e9ccf1b4563f1b23b42afc493.tar.bz2
dokka-9559158bfeeb274e9ccf1b4563f1b23b42afc493.zip
Decompose Kotlin/Java analysis (#3034)
* Extract analysis into separate modules
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt4
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt6
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt2
3 files changed, 7 insertions, 5 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt
index 184e61bb..2975749f 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt
@@ -10,7 +10,9 @@ internal class DokkaArtifacts(private val project: Project) {
private fun fromModuleName(name: String): Dependency =
project.dependencies.create("org.jetbrains.dokka:$name:${DokkaVersion.version}")
- val dokkaAnalysis get() = fromModuleName("dokka-analysis")
+ // TODO [beresnev] analysis switcher
+ val analysisKotlinDescriptors get() = fromModuleName("analysis-kotlin-descriptors")
+
val allModulesPage get() = fromModuleName("all-modules-page-plugin")
val dokkaCore get() = fromModuleName("dokka-core")
val dokkaBase get() = fromModuleName("dokka-base")
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
index e27fee30..46712c81 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
@@ -393,7 +393,7 @@ open class GradleDokkaSourceSetBuilder(
*
* @see [GradleSourceLinkBuilder] for details.
*/
- @Suppress("DEPRECATION") // TODO [beresnev] ConfigureUtil will be removed in Gradle 8
+ @Suppress("DEPRECATION")
fun sourceLink(c: Closure<in GradleSourceLinkBuilder>) {
val configured = org.gradle.util.ConfigureUtil.configure(c, GradleSourceLinkBuilder(project))
sourceLinks.add(configured)
@@ -415,7 +415,7 @@ open class GradleDokkaSourceSetBuilder(
*
* @see [GradlePackageOptionsBuilder] for details.
*/
- @Suppress("DEPRECATION") // TODO [beresnev] ConfigureUtil will be removed in Gradle 8
+ @Suppress("DEPRECATION")
fun perPackageOption(c: Closure<in GradlePackageOptionsBuilder>) {
val configured = org.gradle.util.ConfigureUtil.configure(c, GradlePackageOptionsBuilder(project))
perPackageOptions.add(configured)
@@ -437,7 +437,7 @@ open class GradleDokkaSourceSetBuilder(
*
* @see [GradleExternalDocumentationLinkBuilder] for details.
*/
- @Suppress("DEPRECATION") // TODO [beresnev] ConfigureUtil will be removed in Gradle 8
+ @Suppress("DEPRECATION")
fun externalDocumentationLink(c: Closure<in GradleExternalDocumentationLinkBuilder>) {
val link = org.gradle.util.ConfigureUtil.configure(c, GradleExternalDocumentationLinkBuilder(project))
externalDocumentationLinks.add(link)
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt
index 86dd3716..a3f8af2d 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt
@@ -25,7 +25,7 @@ internal fun Project.maybeCreateDokkaPluginConfiguration(dokkaTaskName: String,
extendsFrom(maybeCreateDokkaDefaultPluginConfiguration())
attributes.attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage.JAVA_RUNTIME))
isCanBeConsumed = false
- dependencies.add(project.dokkaArtifacts.dokkaAnalysis) // compileOnly in base plugin
+ dependencies.add(project.dokkaArtifacts.analysisKotlinDescriptors)
dependencies.add(project.dokkaArtifacts.dokkaBase)
dependencies.addAll(additionalDependencies)
}