From 574564b3c5b3a9189bed59d66875509acea26f41 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Sun, 20 Oct 2024 20:45:28 +0800 Subject: [PATCH 1/4] Use and debug "com.huanshankeji.team:gradle-plugins:0.6.1-SNAPSHOT" The corresponding commit: https://github.com/huanshankeji/gradle-common/commit/adc4c6893545a667e01e684d6d44e9153bb0e231 --- 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 bf8774c..4a2e47e 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -18,5 +18,5 @@ 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.6.1-SNAPSHOT") // don't use a snapshot version in a main branch } From 13845280240117e5095196b482ccbb5e8c0137bf Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Thu, 7 Nov 2024 16:46:29 +0800 Subject: [PATCH 2/4] Use the new `com.huanshankeji.team.dokka.github-dokka-convention` plugin The corresponding commit: https://github.com/huanshankeji/gradle-common/commit/9e60c15fa54e02722c9b409eed68e75fabec4e66 --- buildSrc/build.gradle.kts | 2 +- .../src/main/kotlin/common-conventions.gradle.kts | 3 +-- .../src/main/kotlin/dokka-convention.gradle.kts | 13 +------------ buildSrc/src/main/kotlin/version.gradle.kts | 3 +++ 4 files changed, 6 insertions(+), 15 deletions(-) create mode 100644 buildSrc/src/main/kotlin/version.gradle.kts diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index a862211..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.1-SNAPSHOT") // 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/buildSrc/src/main/kotlin/common-conventions.gradle.kts b/buildSrc/src/main/kotlin/common-conventions.gradle.kts index 4d9114e..f28cfc1 100644 --- a/buildSrc/src/main/kotlin/common-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/common-conventions.gradle.kts @@ -5,11 +5,10 @@ plugins { id("com.huanshankeji.team.with-group") id("maven-central") id("com.huanshankeji.team.default-github-packages-maven-publish") + id("version") id("dokka-convention") } -version = projectVersion - afterEvaluate { publishing.publications.withType { pomForTeamDefaultOpenSource( diff --git a/buildSrc/src/main/kotlin/dokka-convention.gradle.kts b/buildSrc/src/main/kotlin/dokka-convention.gradle.kts index d214a55..e3c4746 100644 --- a/buildSrc/src/main/kotlin/dokka-convention.gradle.kts +++ b/buildSrc/src/main/kotlin/dokka-convention.gradle.kts @@ -1,22 +1,11 @@ plugins { - id("org.jetbrains.dokka") + id("com.huanshankeji.team.dokka.github-dokka-convention") } dokka { //moduleName.set("Huanshankeji Kotlin Common") dokkaSourceSets.all { //includes.from("README.md") - sourceLink { - //localDirectory.set(file("src/main/kotlin")) - remoteUrl( - "https://github.com/huanshankeji/kotlin-common/tree/v${version}/${ - with(project) { - name.removePrefix(parent!!.name + '-') - } - }" - ) - remoteLineSuffix.set("#L") - } /*pluginsConfiguration.html { footerMessage.set("(c) Yongshun Ye") }*/ diff --git a/buildSrc/src/main/kotlin/version.gradle.kts b/buildSrc/src/main/kotlin/version.gradle.kts new file mode 100644 index 0000000..ad0ecbd --- /dev/null +++ b/buildSrc/src/main/kotlin/version.gradle.kts @@ -0,0 +1,3 @@ +// extracted into a separate script so the version can be set before `dokka-convention` + +version = projectVersion From 6ce9852219cb817c886658626feafd753718684d Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Thu, 7 Nov 2024 17:58:54 +0800 Subject: [PATCH 3/4] Debug the changes in the `com.huanshankeji.team.dokka.github-dokka-convention` plugin The corresponding commit: https://github.com/huanshankeji/gradle-common/commit/fac56e49fb61077287a041596ab21e2f8d2c98d7 From e072f5cd383c61d093dbf0e81683007a5557c2f0 Mon Sep 17 00:00:00 2001 From: Yongshun Shreck Ye Date: Fri, 29 Nov 2024 17:46:04 +0800 Subject: [PATCH 4/4] 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") }