From 129537a60cad7a3c1c45d5fa85f4486916211b82 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 16 Jun 2024 13:36:06 +0200 Subject: [PATCH] Add maven-publish plugin Publishes to mvn.staropensource.de. --- base/build.gradle | 25 +++++++++++++++++++++++++ build.gradle | 1 + slf4j-compat/build.gradle | 24 ++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/base/build.gradle b/base/build.gradle index 8ffdb92d..b79d62a3 100644 --- a/base/build.gradle +++ b/base/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java' id 'io.freefair.lombok' version "${pluginLombok}" + id 'maven-publish' } dependencies { @@ -47,3 +48,27 @@ test { events "passed", "skipped", "failed" } } + +publishing { + repositories { + maven { + name = "staropensource" + url = uri("https://mvn.staropensource.de/sosengine") + credentials(org.gradle.api.credentials.PasswordCredentials) + authentication { + //noinspection GroovyAssignabilityCheck + basic (BasicAuthentication) + } + } + } + publications { + //noinspection GroovyAssignabilityCheck + maven (MavenPublication) { + groupId = group + artifactId = "base" + version = version + //noinspection GroovyAssignabilityCheck + from components.java + } + } +} diff --git a/build.gradle b/build.gradle index 4536809d..56410fdd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ plugins { id 'java' + id 'maven-publish' } tasks.register('javadocAll', Javadoc) { diff --git a/slf4j-compat/build.gradle b/slf4j-compat/build.gradle index 8839aaa3..03865d20 100644 --- a/slf4j-compat/build.gradle +++ b/slf4j-compat/build.gradle @@ -47,3 +47,27 @@ test { events "passed", "skipped", "failed" } } + +publishing { + repositories { + maven { + name = "staropensource" + url = "https://mvn.staropensource.de/sosengine" + credentials(org.gradle.api.credentials.PasswordCredentials) + authentication { + //noinspection GroovyAssignabilityCheck + basic (BasicAuthentication) + } + } + } + publications { + //noinspection GroovyAssignabilityCheck + maven (MavenPublication) { + groupId = group + artifactId = "slf4j-compat" + version = version + //noinspection GroovyAssignabilityCheck + from components.java + } + } +}