From 02279618d3030ac13a6d0c8714304466286573f4 Mon Sep 17 00:00:00 2001 From: Federico Tomassetti Date: Fri, 11 Aug 2023 12:49:41 +0200 Subject: [PATCH] add maven publish configuration for gradle plugin --- lionweb-gen-gradle/build.gradle | 66 +++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/lionweb-gen-gradle/build.gradle b/lionweb-gen-gradle/build.gradle index ce2c90ae7..1e764ac5e 100644 --- a/lionweb-gen-gradle/build.gradle +++ b/lionweb-gen-gradle/build.gradle @@ -61,4 +61,70 @@ java { registerFeature('cli') { usingSourceSet(sourceSets.main) } +} + +publishing { + + repositories { + maven { + def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/" + url = isReleaseVersion ? releaseRepo : snapshotRepo + credentials { + username = project.hasProperty('ossrhUsername') ? ossrhUsername : "Unknown user" + password = project.hasProperty('ossrhPassword') ? ossrhPassword : "Unknown password" + } + } + } + +// publications { +// kolasu_lionweb(MavenPublication) { +// from components.java +// artifactId "kolasu-" + project.name +// artifact sourcesJar +// artifact javadocJar +// suppressPomMetadataWarningsFor('cliApiElements') +// suppressPomMetadataWarningsFor('cliRuntimeElements') +// pom { +// name = "kolasu-" + project.name +// description = "Gradle plugin for the integration of Kolasu with LIonWeb" +// version = project.version +// packaging = 'jar' +// url = 'https://github.com/Strumenta/kolasu' +// +// scm { +// connection = 'scm:git:https://github.com/Strumenta/kolasu.git' +// developerConnection = 'scm:git:git@github.com:Strumenta/kolasu.git' +// url = 'https://github.com/Strumenta/kolasu.git' +// } +// +// licenses { +// license { +// name = 'Apache Licenve V2.0' +// url = 'https://www.apache.org/licenses/LICENSE-2.0' +// distribution = 'repo' +// } +// } +// +// developers { +// developer { +// id = 'ftomassetti' +// name = 'Federico Tomassetti' +// email = 'federico@strumenta.com' +// } +// developer { +// id = 'alessiostalla' +// name = 'Alessio Stalla' +// email = 'alessio.stalla@strumenta.com' +// } +// developer { +// id = 'lorenzoaddazi' +// name = 'Lorenzo Addazi' +// email = 'lorenzo.addazi@strumenta.com' +// } +// } +// +// } +// } +// } } \ No newline at end of file