From 6e09828644e2db73da1d10c67a35e2185a0503d6 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Thu, 7 Nov 2024 17:02:35 +0800 Subject: [PATCH 1/3] Use the new `com.huanshankeji.team.dokka.github-dokka-convention` plugin Running `dokkaGenerate` yields this message: ```text > Failed to apply plugin 'com.huanshankeji.dokka.dokka-convention'. > Cannot query the value of extension 'dokkaConvention' property 'sourceLinkRemoteUrlRoot' because it has no value available. ``` It's strange because applying the plugin works without errors in https://github.com/huanshankeji/kotlin-common/commit/13845280240117e5095196b482ccbb5e8c0137bf. --- buildSrc/build.gradle.kts | 2 +- lib/build.gradle.kts | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 6a6f9e2..507988e 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -18,6 +18,6 @@ dependencies { // With Kotlin 2.0.20, a "Could not parse POM" build error occurs in the JVM projects of some dependent projects. implementation(kotlin("gradle-plugin", "2.0.10")) implementation("com.huanshankeji:common-gradle-dependencies:0.8.0-20241016") // don't use a snapshot version in a main branch - implementation("com.huanshankeji.team:gradle-plugins:0.6.0") // don't use a snapshot version in a main branch + implementation("com.huanshankeji.team:gradle-plugins:0.7.0-SNAPSHOT") // TODO don't use a snapshot version in a main branch implementation("org.jetbrains.dokka:dokka-gradle-plugin:2.0.0-Beta") } diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index 54f9243..354f568 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -1,6 +1,6 @@ plugins { conventions - id("org.jetbrains.dokka") + id("com.huanshankeji.team.dokka.github-dokka-convention") } dependencies { @@ -9,12 +9,3 @@ dependencies { implementation(commonDependencies.kotlinCommon.reflect()) implementation(commonDependencies.kotlinCommon.core()) } - -dokka { - dokkaSourceSets.all { - sourceLink { - remoteUrl("https://github.com/huanshankeji/exposed-adt-mapping/tree/v${version}/lib") - remoteLineSuffix.set("#L") - } - } -} From 2ccd8cff7ebce6a0f49bd3f7348e791c12ac217d Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Thu, 7 Nov 2024 17:59:54 +0800 Subject: [PATCH 2/3] Debug the changes in the `com.huanshankeji.team.dokka.github-dokka-convention` plugin and resolve the error in the previous commit The corresponding commit: https://github.com/huanshankeji/gradle-common/commit/fac56e49fb61077287a041596ab21e2f8d2c98d7 From 0f7ad4254c7dfb0d26d118de8f4b802cc9ab08aa Mon Sep 17 00:00:00 2001 From: Yongshun Shreck Ye Date: Fri, 29 Nov 2024 20:46:19 +0800 Subject: [PATCH 3/3] Bump our Gradle plugins to the stable version of v0.7.0 --- buildSrc/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 507988e..cab0d18 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -18,6 +18,6 @@ dependencies { // With Kotlin 2.0.20, a "Could not parse POM" build error occurs in the JVM projects of some dependent projects. implementation(kotlin("gradle-plugin", "2.0.10")) implementation("com.huanshankeji:common-gradle-dependencies:0.8.0-20241016") // don't use a snapshot version in a main branch - implementation("com.huanshankeji.team:gradle-plugins:0.7.0-SNAPSHOT") // TODO don't use a snapshot version in a main branch + implementation("com.huanshankeji.team:gradle-plugins:0.7.0") // don't use a snapshot version in a main branch implementation("org.jetbrains.dokka:dokka-gradle-plugin:2.0.0-Beta") }