From 3284f2c34ad936b42560e84f2d4ca979bb87f5e6 Mon Sep 17 00:00:00 2001 From: Pedro Duque Vieira Date: Sun, 20 Jan 2019 02:00:09 +0000 Subject: [PATCH] Update gradle script, enabling publication to Maven Central --- jmetro/build.gradle | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/jmetro/build.gradle b/jmetro/build.gradle index 14144a03..263e806b 100644 --- a/jmetro/build.gradle +++ b/jmetro/build.gradle @@ -47,6 +47,7 @@ artifacts { } /* Publishing */ +/* - for publishing to maven central need to define MAVEN_USERNAME and MAVEN_PASSWORD as environment variables */ bintray { user = System.getenv('BINTRAY_USER') key = System.getenv('BINTRAY_KEY') @@ -64,6 +65,41 @@ bintray { name = project.version desc = versionDescription // Version description vcsTag = project.version + mavenCentralSync { + sync = true + user = System.getenv('MAVEN_USERNAME') + password = System.getenv('MAVEN_PASSWORD') + } + } + } +} + +def pomConfig = { + packaging 'jar' + name project.name + url 'https://www.pixelduke.com/jmetro' + inceptionYear '2012' + licenses { + license([:]) { + name 'BSD New' + url 'https://opensource.org/licenses/BSD-3-Clause' + distribution 'repo' + } + } + scm { + url 'https://github.com/JFXtras/jfxtras-styles.git' + } + developers { + [ + dukke: 'Pedro Duque Vieira', + ].each { devId, devName -> + developer { + id devId + name devName + roles { + role 'Developer' + } + } } } } @@ -78,6 +114,11 @@ publishing { artifact javadocJar { classifier "javadoc" } + + pom.withXml { + asNode().children().last() + pomConfig + asNode().appendNode('description', "A theme / look and feel for JavaFX inspired by Microsoft's Fluent Design (previously named Metro)") + } } } }