Skip to content

Commit 75d4175

Browse files
chore: update dokka.
1 parent 3812fdf commit 75d4175

6 files changed

Lines changed: 18 additions & 32 deletions

File tree

build-logic/convention/src/main/kotlin/com/autonomousapps/convention/BaseConventionPlugin.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal class BaseConventionPlugin(private val project: Project) {
2525
pluginManager.run {
2626
apply("com.vanniktech.maven.publish.base")
2727
apply("org.gradle.signing")
28-
apply("org.jetbrains.dokka")
28+
apply("org.jetbrains.dokka-javadoc")
2929
apply("com.autonomousapps.dependency-analysis")
3030
apply("com.autonomousapps.testkit")
3131
}
@@ -61,12 +61,12 @@ internal class BaseConventionPlugin(private val project: Project) {
6161
t.isReproducibleFileOrder = true
6262
}
6363

64-
tasks.withType(DokkaTask::class.java).configureEach { t ->
65-
t.notCompatibleWithConfigurationCache("Uses 'project' at execution time")
66-
}
67-
tasks.withType(JavadocJar::class.java).configureEach { t ->
68-
t.notCompatibleWithConfigurationCache("Uses 'project' at execution time")
69-
}
64+
// tasks.withType(DokkaTask::class.java).configureEach { t ->
65+
// t.notCompatibleWithConfigurationCache("Uses 'project' at execution time")
66+
// }
67+
// tasks.withType(JavadocJar::class.java).configureEach { t ->
68+
// t.notCompatibleWithConfigurationCache("Uses 'project' at execution time")
69+
// }
7070

7171
// We only use the Jupiter platform (JUnit 5)
7272
configurations.all {

build-logic/convention/src/main/kotlin/com/autonomousapps/convention/LibKotlinConventionPlugin.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ public abstract class LibKotlinConventionPlugin : Plugin<Project> {
2727
extensions.getByType(MavenPublishBaseExtension::class.java).run {
2828
configure(
2929
KotlinJvm(
30-
// TODO(tsr): dokkaHtml is from Dokka v1. Does not exist in Dokka v2. See gradle.properties.
31-
javadocJar = JavadocJar.Dokka("dokkaHtml"),
30+
javadocJar = JavadocJar.Dokka("dokkaGeneratePublicationJavadoc"),
3231
sourcesJar = true,
3332
)
3433
)

build-logic/convention/src/main/kotlin/com/autonomousapps/convention/PluginConventionPlugin.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public abstract class PluginConventionPlugin : Plugin<Project> {
3030
configureKotlin()
3131
configurePlugins()
3232
configurePublishing()
33-
disableConfigurationCache()
33+
// disableConfigurationCache()
3434
}
3535

3636
private fun Project.configureGroovy(versionCatalog: VersionCatalog) {
@@ -62,12 +62,12 @@ public abstract class PluginConventionPlugin : Plugin<Project> {
6262
}
6363
}
6464

65-
private fun Project.disableConfigurationCache() {
66-
tasks.withType(PublishTask::class.java).configureEach { t ->
67-
t.notCompatibleWithConfigurationCache("Various problems")
68-
}
69-
tasks.withType(AbstractPublishToMaven::class.java) { t ->
70-
t.notCompatibleWithConfigurationCache("Various problems")
71-
}
72-
}
65+
// private fun Project.disableConfigurationCache() {
66+
// tasks.withType(PublishTask::class.java).configureEach { t ->
67+
// t.notCompatibleWithConfigurationCache("Various problems")
68+
// }
69+
// tasks.withType(AbstractPublishToMaven::class.java) { t ->
70+
// t.notCompatibleWithConfigurationCache("Various problems")
71+
// }
72+
// }
7373
}

build-logic/convention/src/main/kotlin/com/autonomousapps/convention/internal/kotlin/KotlinConfigurer.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,18 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1212
internal class KotlinConfigurer(private val project: Project) {
1313

1414
private val versionCatalog = project.extensions.getByType(VersionCatalogsExtension::class.java).named("libs")
15-
16-
private val dokka = versionCatalog.findLibrary("kotlin.dokka").get()
1715
private val javaTarget = versionCatalog.findVersion("javaTarget").orElseThrow().requiredVersion
1816
private val kotlin = versionCatalog.findVersion("kotlin").get().requiredVersion
1917

2018
// this function expects strings of the form 2.x, not 2.x.y
2119
private val kotlinVersion = KotlinVersion.fromVersion(kotlin.substringBeforeLast('.'))
2220

2321
fun configure(): Unit = project.run {
24-
configureDokka()
2522
configureKotlinExtension()
2623
configureKotlinTarget()
2724
configureKotlinVersion()
2825
}
2926

30-
private fun Project.configureDokka() {
31-
dependencies.add("dokkaHtmlPlugin", dokka)
32-
}
33-
3427
private fun Project.configureKotlinExtension() {
3528
project.extensions.getByType(KotlinJvmProjectExtension::class.java).run {
3629
explicitApi()

gradle.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,5 @@ VERSION=3.7.1-SNAPSHOT
1414
# https://kotlinlang.org/docs/gradle-configure-project.html#dependency-on-the-standard-library
1515
kotlin.stdlib.default.dependency=false
1616

17-
# TODO(tsr): switch these around when migration to Dokka v2 complete.
18-
org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers
19-
#org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
20-
2117
# Uncomment to use maven local
2218
#systemProp.local=true

gradle/libs.versions.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ junit = "5.14.1"
2626
kotlin = "2.3.20"
2727
kotlinForAndroidtests = "2.3.20"
2828
kotlinMetadata = "2.3.20"
29-
# TODO(tsr): update Dokka
30-
kotlinDokka = "2.0.0"
29+
kotlinDokka = "2.2.0"
3130
# Cannot be called kotlin-editor as it causes `libs.versions.kotlin.get()` to fail
3231
kotlineditor-core = "0.20"
3332
kotlineditor-relocated = "0.20.0"
@@ -62,7 +61,6 @@ junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine" }
6261
junit-launcher = { module = "org.junit.platform:junit-platform-launcher" }
6362
junit-params = { module = "org.junit.jupiter:junit-jupiter-params" }
6463
kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
65-
kotlin-dokka = { module = "org.jetbrains.dokka:kotlin-as-java-plugin", version.ref = "kotlinDokka" }
6664
kotlinDokkaGradlePlugin = { module = "org.jetbrains.dokka-javadoc:org.jetbrains.dokka-javadoc.gradle.plugin", version.ref = "kotlinDokka" }
6765
kotlin-editor-core = { module = "app.cash.kotlin-editor:core", version.ref = "kotlineditor-core" }
6866
kotlin-editor-grammar = { module = "app.cash.kotlin-editor:grammar", version.ref = "kotlineditor-core" }

0 commit comments

Comments
 (0)