marc/gradle/publishing/publication.gradle

64 lines
1.9 KiB
Groovy
Raw Permalink Normal View History

2023-04-04 20:55:40 +02:00
apply plugin: 'io.github.gradle-nexus.publish-plugin'
publishing {
publications {
2023-04-04 20:55:40 +02:00
javaPublication(MavenPublication) {
from components.java
pom {
name = project.name
description = rootProject.ext.description
url = rootProject.ext.url
inceptionYear = rootProject.ext.inceptionYear
packaging = 'jar'
organization {
name = 'xbib'
url = 'https://xbib.org'
}
developers {
developer {
id = 'jprante'
name = 'Jörg Prante'
email = 'joergprante@gmail.com'
2023-04-04 20:55:40 +02:00
url = 'https://github.com/xbib'
}
}
scm {
url = rootProject.ext.scmUrl
connection = rootProject.ext.scmConnection
developerConnection = rootProject.ext.scmDeveloperConnection
}
issueManagement {
system = rootProject.ext.issueManagementSystem
url = rootProject.ext.issueManagementUrl
}
licenses {
license {
name = rootProject.ext.licenseName
url = rootProject.ext.licenseUrl
distribution = 'repo'
}
}
}
}
}
}
if (project.hasProperty("signing.keyId")) {
signing {
2023-04-04 20:55:40 +02:00
sign publishing.publications.javaPublication
}
}
2023-04-04 20:55:40 +02:00
if (project.hasProperty("ossrhUsername")) {
nexusPublishing {
repositories {
sonatype {
username = project.property('ossrhUsername')
password = project.property('ossrhPassword')
2023-04-04 20:55:40 +02:00
packageGroup = 'org.xbib'
}
}
}
}