From 5bfb23305af046a8f514a5cbfabc79dd346a904e Mon Sep 17 00:00:00 2001 From: rnentjes Date: Fri, 24 Dec 2021 11:11:22 +0100 Subject: [PATCH] Prepare version 1.0.0 --- .gitignore | 1 + build.gradle.kts | 110 +++++++++++++++++------ gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 14 +-- 4 files changed, 88 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index 57ec08d..4dd2c58 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ local.properties *.iml *.ipr *.iws +kotlin-js-store diff --git a/build.gradle.kts b/build.gradle.kts index 5ae756d..4f0b9fc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,12 @@ plugins { - kotlin("multiplatform") version "1.5.21" + kotlin("multiplatform") version "1.6.10" `maven-publish` + signing + id("org.jetbrains.dokka") version "1.5.31" } group = "nl.astraeus" -version = "0.5.12" +version = "1.0.0" repositories { mavenCentral() @@ -43,36 +45,94 @@ kotlin { } } +extra["PUBLISH_GROUP_ID"] = group +extra["PUBLISH_VERSION"] = version +extra["PUBLISH_ARTIFACT_ID"] = name + +// Stub secrets to let the project sync and build without the publication values set up +val signingKeyId: String by project +val signingPassword: String by project +val signingSecretKeyRingFile: String by project +val ossrhUsername: String by project +val ossrhPassword: String by project + +extra["signing.keyId"] = signingKeyId +extra["signing.password"] = signingPassword +extra["signing.secretKeyRingFile"] = signingSecretKeyRingFile +extra["ossrhUsername"] = ossrhUsername +extra["ossrhPassword"] = ossrhPassword + +val javadocJar by tasks.registering(Jar::class) { + archiveClassifier.set("javadoc") +} + publishing { repositories { - if (project.properties["nexusUsername"] != null) { - maven { - name = "releases" - url = uri("https://nexus.astraeus.nl/nexus/content/repositories/releases") - credentials { - val nexusUsername: String by project - val nexusPassword: String by project + maven { + name = "releases" + // change to point to your repo, e.g. http://my.org/repo + url = uri("https://nexus.astraeus.nl/nexus/content/repositories/releases") + credentials { + val nexusUsername: String by project + val nexusPassword: String by project - username = nexusUsername - password = nexusPassword - } + username = nexusUsername + password = nexusPassword } - maven { - name = "snapshots" - url = uri("https://nexus.astraeus.nl/nexus/content/repositories/snapshots") - credentials { - val nexusUsername: String by project - val nexusPassword: String by project + } + maven { + name = "snapshots" + // change to point to your repo, e.g. http://my.org/repo + url = uri("https://nexus.astraeus.nl/nexus/content/repositories/snapshots") + credentials { + val nexusUsername: String by project + val nexusPassword: String by project - username = nexusUsername - password = nexusPassword - } + username = nexusUsername + password = nexusPassword + } + } + maven { + name = "sonatype" + setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2") + credentials { + username = ossrhUsername + password = ossrhPassword } - } else { - println("Publishing disabled properties not found.") } } - publications { - val kotlinMultiplatform by getting {} + + // Configure all publications + publications.withType { + // Stub javadoc.jar artifact + artifact(javadocJar.get()) + + // Provide artifacts information requited by Maven Central + pom { + name.set("kotlin-komponent") + description.set("Kotlin komponent") + url.set("https://github.com/rnentjes/komponent") + + licenses { + license { + name.set("MIT") + url.set("https://opensource.org/licenses/MIT") + } + } + developers { + developer { + id.set("rnentjes") + name.set("Rien Nentjes") + email.set("info@nentjes.com") + } + } + scm { + url.set("https://github.com/rnentjes/komponent") + } + } } } + +signing { + sign(publishing.publications) +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 591af2e..191b356 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Wed Mar 04 13:29:12 CET 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index 606c7d8..933d378 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,14 +1,2 @@ -pluginManagement { - repositories { - maven { setUrl("https://dl.bintray.com/kotlin/kotlin-dev") } - - maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") } - - mavenCentral() - - maven { setUrl("https://plugins.gradle.org/m2/") } - } -} - -rootProject.name = "komp" +rootProject.name = "kotlin-komponent"