From 37635a6c4efe7f724c27471f8924317a7011d9d8 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Sun, 22 May 2022 19:00:52 +0800 Subject: [PATCH 1/4] Add "kotlin-1.6.10" to the version of "common-gradle-dependencies" --- common-gradle-dependencies/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-gradle-dependencies/build.gradle.kts b/common-gradle-dependencies/build.gradle.kts index ff9ca88..17274ba 100644 --- a/common-gradle-dependencies/build.gradle.kts +++ b/common-gradle-dependencies/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("build-dependency-library-conventions") } -version = "0.1.0-20220522-dev" +version = "0.1.0-20220522-kotlin-1.6.10-dev" From bdd1086648603f7bf25add2b04ce5dbd0bbd1399 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Wed, 25 May 2022 12:35:44 +0800 Subject: [PATCH 2/4] Remove `mavenCentral()` from publishing repositories in "default-maven-publish.gradle.kts" as it cannot be directly published to A common approach is to publish via Sonatype OSSRH. --- .../com/huanshankeji/default-maven-publish.gradle.kts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/default-maven-publish.gradle.kts b/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/default-maven-publish.gradle.kts index a07a221..31a7ffb 100644 --- a/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/default-maven-publish.gradle.kts +++ b/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/default-maven-publish.gradle.kts @@ -5,9 +5,3 @@ plugins { } group = "com.huanshankeji" - -publishing { - repositories { - mavenCentral() - } -} From f2e133b1446ffe5d88b62c7c4a4329a394e8ba59 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Wed, 25 May 2022 13:57:26 +0800 Subject: [PATCH 3/4] Update the plugin project version to "0.1.2-SNAPSHOT" --- buildSrc/src/main/kotlin/plugin-conventions.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/plugin-conventions.gradle.kts b/buildSrc/src/main/kotlin/plugin-conventions.gradle.kts index cb13aad..b4a04d8 100644 --- a/buildSrc/src/main/kotlin/plugin-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/plugin-conventions.gradle.kts @@ -8,7 +8,7 @@ dependencies { implementation(kotlin("gradle-plugin", "1.6.21")) } -version = "0.1.1-SNAPSHOT" +version = "0.1.2-SNAPSHOT" pluginBundle { website = "https://github.com/huanshankeji/gradle-plugin" From 846bc2b067d7acd76953964b8d5141cd297872c4 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Wed, 25 May 2022 21:47:24 +0800 Subject: [PATCH 4/4] Add the javadoc jar in a Kotlin Multiplatform project's publications to Maven due to requirements of Maven Central --- ...d-js-browser-default-maven-publish-conventions.gradle.kts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-jvm-and-js-browser-default-maven-publish-conventions.gradle.kts b/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-jvm-and-js-browser-default-maven-publish-conventions.gradle.kts index e26cd75..5e26175 100644 --- a/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-jvm-and-js-browser-default-maven-publish-conventions.gradle.kts +++ b/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-jvm-and-js-browser-default-maven-publish-conventions.gradle.kts @@ -5,10 +5,15 @@ plugins { id("com.huanshankeji.default-maven-publish") } +val javadocJar by tasks.registering(Jar::class) { + archiveClassifier.set("javadoc") +} + publishing { publications { withType { artifactId = "$defaultPrefixForPublishing-$artifactId" + artifact(javadocJar) } } }