From 2f4deab6b5a52d109890244cf65d9ab92b33d22d Mon Sep 17 00:00:00 2001 From: sszuev Date: Tue, 7 Mar 2023 23:12:49 +0300 Subject: [PATCH] rdf-graphs: build.gradle - add publishing and info --- build.gradle.kts | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index ce6f1bf..44c0822 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,7 @@ plugins { kotlin("jvm") + id("maven-publish") + signing } group = "com.github.sszuev" @@ -22,6 +24,66 @@ dependencies { testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion") } + +publishing { + publications { + create("maven") { + groupId = project.group.toString() + artifactId = project.name + version = project.version.toString() + + from(components["java"]) + + pom { + name.set("${project.group}:${project.name}") + description.set("Thread-safe RDF Graphs") + url.set("https://github.com/sszuev/concurrent-rdf-graph") + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + license { + name.set("GNU LGPL Version 3.0") + url.set("http://www.gnu.org/licenses/lgpl.txt") + } + } + scm { + connection.set("scm:git:git://github.com/sszuev/concurrent-rdf-graph.git") + developerConnection.set("scm:git:ssh://github.com/sszuev/concurrent-rdf-graph.git") + url.set("https://github.com/sszuev/concurrent-rdf-graph") + } + developers { + developer { + id.set("sszuev") + name.set("Sergei Zuev") + email.set("sss.zuev@gmail.com") + } + } + } + } + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/sszuev/${project.name}") + credentials { + username = project.findProperty("gpr.user") as String? + password = project.findProperty("gpr.key") as String? + } + } + } + } +} + +java { + withSourcesJar() + withJavadocJar() +} + +signing { + sign(publishing.publications["maven"]) +} + tasks.test { useJUnitPlatform() }