From ecedde8828cc4c4bdab07a0d0cf750341cdec637 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Fri, 27 May 2022 15:28:26 +0800 Subject: [PATCH 1/2] Include sources in the Gradle plugin (Maven) publications and improve `CommonDependencies.Vertx` --- ...uild-dependency-library-conventions.gradle.kts | 3 +++ .../src/main/kotlin/plugin-conventions.gradle.kts | 2 +- common-gradle-dependencies/build.gradle.kts | 4 +++- .../kotlin/com/huanshankeji/CommonDependencies.kt | 15 ++++++++++++--- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/build-dependency-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/build-dependency-library-conventions.gradle.kts index 35c05cb..78c8b31 100644 --- a/buildSrc/src/main/kotlin/build-dependency-library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/build-dependency-library-conventions.gradle.kts @@ -13,4 +13,7 @@ group = "com.huanshankeji" java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 + + withSourcesJar() + withJavadocJar() } diff --git a/buildSrc/src/main/kotlin/plugin-conventions.gradle.kts b/buildSrc/src/main/kotlin/plugin-conventions.gradle.kts index 90d671f..b3038b4 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.10")) } -version = "0.1.3-kotlin-1.6.10-SNAPSHOT" +version = "0.1.4-kotlin-1.6.10-SNAPSHOT" pluginBundle { website = "https://github.com/huanshankeji/gradle-plugin" diff --git a/common-gradle-dependencies/build.gradle.kts b/common-gradle-dependencies/build.gradle.kts index 17274ba..5dceeb0 100644 --- a/common-gradle-dependencies/build.gradle.kts +++ b/common-gradle-dependencies/build.gradle.kts @@ -2,4 +2,6 @@ plugins { id("build-dependency-library-conventions") } -version = "0.1.0-20220522-kotlin-1.6.10-dev" +// `SNAPSHOT` means it's under development until that version, +// and `dev` means it has been under development since that version. +version = "0.1.1-SNAPSHOT-20220522-dev-kotlin-1.6.10" diff --git a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt index 914e372..69c7c3b 100644 --- a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt +++ b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt @@ -1,5 +1,7 @@ package com.huanshankeji +import org.gradle.api.artifacts.dsl.DependencyHandler + // some but not all default dependencies object CommonDependencies { object KotlinCommon { @@ -83,11 +85,18 @@ object CommonDependencies { object Vertx { val defaultVersion = DefaultVersions.vertx - fun stackDepchain(version: String = defaultVersion) = - "io.vertx:vertx-stack-depchain:$version" - fun module(module: String) = + private fun stackDepchain(version: String = defaultVersion) = + moduleWithVersion("stack-depchain", version) + + fun DependencyHandler.platformStackDepchain(version: String = defaultVersion) = + platform(stackDepchain(version)) + + fun moduleWithoutVersion(module: String) = "io.vertx:vertx-$module" + + fun moduleWithVersion(module: String, version: String = defaultVersion) = + "${moduleWithoutVersion(module)}:$version" } object Arrow { From 9935c9ccbdd69ff3f9ff5af38ae425a9a3dae6de Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Fri, 27 May 2022 21:47:26 +0800 Subject: [PATCH 2/2] Update "kotlin-common" version before it's released --- common-gradle-dependencies/build.gradle.kts | 2 +- .../src/main/kotlin/com/huanshankeji/DefaultVersions.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common-gradle-dependencies/build.gradle.kts b/common-gradle-dependencies/build.gradle.kts index 5dceeb0..9e2d71b 100644 --- a/common-gradle-dependencies/build.gradle.kts +++ b/common-gradle-dependencies/build.gradle.kts @@ -4,4 +4,4 @@ plugins { // `SNAPSHOT` means it's under development until that version, // and `dev` means it has been under development since that version. -version = "0.1.1-SNAPSHOT-20220522-dev-kotlin-1.6.10" +version = "0.1.1-SNAPSHOT-20220527-dev-kotlin-1.6.10" diff --git a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/DefaultVersions.kt b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/DefaultVersions.kt index 0de73df..ce1d6a3 100644 --- a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/DefaultVersions.kt +++ b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/DefaultVersions.kt @@ -3,7 +3,7 @@ package com.huanshankeji object DefaultVersions { val kotlin = "1.6.10" - val kotlinCommon = "0.1.0-kotlin-1.6.10" + val kotlinCommon = "0.1.1-kotlin-1.6.10" val exposed = "0.38.2" val kotlinxCoroutines = "1.6.1"