diff --git a/build_publish.gradle b/build_publish.gradle new file mode 100644 index 0000000..1ac6523 --- /dev/null +++ b/build_publish.gradle @@ -0,0 +1,64 @@ +// Documentation: https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle +// Secrets stored in ~/.jreleaser/config.toml + +publishing { + publications { + maven(MavenPublication) { + groupId = 'se.koc' + artifactId = 'zutil' + + from components.java + + pom { + name = 'Zutil' + description = 'A library containing utility classes and code snippets.' + url = 'https://github.com/Ziver/zutil' + + licenses { + license { + name = 'MIT License' + url = 'http://www.opensource.org/licenses/mit-license.php' + } + } + developers { + developer { + id = 'Ziver Koc' + name = 'dev@koc.se' + } + } + scm { + connection = 'scm:git:https://github.com/Ziver/zutil.git' + developerConnection = 'scm:git:https://repo.koc.se/zutil-java.git' + url = 'https://github.com/Ziver/zutil' + } + } + } + } + + repositories { + maven { + url = layout.buildDirectory.dir('staging-deploy') + } + } +} + +jreleaser { + signing { + active = 'ALWAYS' + armored = true + } + deploy { + maven { + nexus2 { + 'maven-central' { + active = 'ALWAYS' + url = 'https://s01.oss.sonatype.org/service/local' + snapshotUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + closeRepository = true + releaseRepository = true + stagingRepository('build/staging-deploy') + } + } + } + } +} \ No newline at end of file