From af2f33f466b8a129cb32471be7dd9346257fa005 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 25 Nov 2023 19:23:20 +0100 Subject: [PATCH 1/3] Clean up settings.gradle.kt --- settings.gradle.kts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 3005371..a8893e1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,12 +1 @@ -pluginManagement { - repositories { - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0" -} - rootProject.name = "perspektive" From 3fd9c689bb05f0ad986f1b1a71a0c876068e0e0b Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 25 Nov 2023 19:24:28 +0100 Subject: [PATCH 2/3] Set version to 0.1.0, add description --- build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index efa012a..ddbe303 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,8 @@ plugins { } group = "hu.webhejj.perspektive" -version = "1.0-SNAPSHOT" +version = "0.1.0" +description = "Perspektive is a diagramming tool written in Kotlin" repositories { mavenCentral() From dfb0efd56e538c95c040d791983ff9c41149b506 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 25 Nov 2023 19:25:01 +0100 Subject: [PATCH 3/3] Set up artifact signing and publishing from gradle --- build.gradle.kts | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index ddbe303..624c474 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,7 @@ plugins { kotlin("jvm") version "1.9.10" + `maven-publish` + signing id("org.jlleitschuh.gradle.ktlint") version "11.6.1" id("com.github.ben-manes.versions") version "0.50.0" } @@ -25,3 +27,55 @@ dependencies { tasks.withType { useJUnitPlatform() } + +java { + withJavadocJar() + withSourcesJar() +} + +publishing { + publications { + create("maven") { + from(components["java"]) + pom { + packaging = "jar" + name.set("perspektive") + description.set(project.description) + url.set("https://github.com/gnagy/perspektive") + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + id.set("gnagy") + name.set("Gergely Nagy") + email.set("greg@webhejj.hu") + } + } + scm { + connection.set("scm:git:git://github.com/gnagy/perspektive.git") + developerConnection.set("scm:git:ssh://github.com/gnagy/perspektive.git") + url.set("https://github.com/gnagy/perspektive") + } + } + } + } + + repositories { + maven { + name = "OSSRH" + url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { + username = project.findProperty("ossrhUsername") as String? + password = project.findProperty("ossrhPassword") as String? + } + } + } +} + +signing { + sign(publishing.publications["maven"]) +}