Skip to content

Commit

Permalink
Merge branch 'kotlin-1.6.10' into common-gradle-dependencies-kotlin-1…
Browse files Browse the repository at this point in the history
….6.10-release

common-gradle-dependencies v0.1.1-20220527-kotlin-1.6.10 release
  • Loading branch information
ShreckYe committed May 28, 2022
2 parents 084f763 + 9935c9c commit 080ccf0
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ group = "com.huanshankeji"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

withSourcesJar()
withJavadocJar()
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/plugin-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
implementation(kotlin("gradle-plugin", "1.6.10"))
}

version = "0.1.1-kotlin-1.6.10-SNAPSHOT"
version = "0.1.4-kotlin-1.6.10-SNAPSHOT"

pluginBundle {
website = "https://github.com/huanshankeji/gradle-plugin"
Expand Down
4 changes: 3 additions & 1 deletion common-gradle-dependencies/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ plugins {
id("build-dependency-library-conventions")
}

version = "0.1.0-20220522-kotlin-1.6.10"
// `SNAPSHOT` means it's under development until that version,
// and `dev` means it has been under development since that version.
version = "0.1.1-20220527-kotlin-1.6.10"
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.huanshankeji

import org.gradle.api.artifacts.dsl.DependencyHandler

// some but not all default dependencies
object CommonDependencies {
object KotlinCommon {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions kotlin-common-gradle-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {

dependencies {
//api(project(":common-gradle-dependencies"))
//implementation("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0")
}

gradlePlugin {
Expand Down Expand Up @@ -38,5 +39,13 @@ gradlePlugin {
"kotlin-multiplatform-jvm-and-js-browser-default-maven-publish-conventions",
"Kotlin Multiplatform conventions with the JVM target and the JS browser target, and with default Maven publish"
)
scriptConventionsPlugin(
"kotlin-jvm-library-sonatype-ossrh-publish-conventions",
"Kotlin/JVM library conventions with Sonatype OSSRH Maven Central publish"
)
scriptConventionsPlugin(
"kotlin-multiplatform-jvm-and-js-browser-sonatype-ossrh-publish-conventions",
"Kotlin Multiplatform conventions with the JVM target and the JS browser target, and with Sonatype OSSRH Maven Central publish"
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ plugins {
}

group = "com.huanshankeji"

publishing {
repositories {
mavenCentral()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.huanshankeji

plugins {
id("com.huanshankeji.kotlin-jvm-library-default-maven-publish-conventions")
id("com.huanshankeji.sonatype-ossrh-publish")
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ plugins {
id("com.huanshankeji.default-maven-publish")
}

publishing {
publications {
withType<MavenPublication> {
artifactId = "$defaultPrefixForPublishing-$artifactId"
}
}
publishing.publications.withType<MavenPublication> {
artifactId = "$defaultPrefixForPublishing-$artifactId"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.huanshankeji

plugins {
id("com.huanshankeji.kotlin-multiplatform-jvm-and-js-browser-default-maven-publish-conventions")
id("com.huanshankeji.sonatype-ossrh-publish")
}

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

publishing.publications.withType<MavenPublication> {
artifact(javadocJar)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.huanshankeji

/* TODO: this script is not working yet.
plugins {
id("io.codearte.nexus-staging")
}
group = "com.huanshankeji"
nexusStaging {
serverUrl = "https://s01.oss.sonatype.org/service/local/"
// TODO
}
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.huanshankeji

plugins {
id("com.huanshankeji.default-maven-publish")
signing
}

signing {
sign(publishing.publications)
}

publishing.repositories.maven {
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = project.property("ossrhUsername") as String
password = project.property("ossrhPassword") as String
}
}

0 comments on commit 080ccf0

Please sign in to comment.