content/gradle/publish.gradle

80 lines
2.7 KiB
Groovy
Raw Permalink Normal View History

2016-10-03 14:25:26 +02:00
2018-07-10 14:41:20 +02:00
ext {
projectDescription = 'Content processing library for Java'
scmUrl = 'https://github.com/xbib/content'
scmConnection = 'scm:git:git://github.com/xbib/content.git'
scmDeveloperConnection = 'scm:git:git://github.com/xbib/content.git'
}
task xbibUpload(type: Upload, dependsOn: build) {
2018-02-06 23:31:56 +01:00
group = 'publish'
2016-10-03 14:25:26 +02:00
configuration = configurations.archives
uploadDescriptor = true
repositories {
if (project.hasProperty('xbibUsername')) {
mavenDeployer {
configuration = configurations.wagon
2018-02-06 23:31:56 +01:00
repository(url: uri(project.property('xbibUrl'))) {
2016-10-03 14:25:26 +02:00
authentication(userName: xbibUsername, privateKey: xbibPrivateKey)
}
}
}
}
}
task sonatypeUpload(type: Upload, dependsOn: build) {
2018-02-06 23:31:56 +01:00
group = 'publish'
2016-10-03 14:25:26 +02:00
configuration = configurations.archives
uploadDescriptor = true
repositories {
if (project.hasProperty('ossrhUsername')) {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: uri(ossrhReleaseUrl)) {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: uri(ossrhSnapshotUrl)) {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
2016-10-29 20:00:22 +02:00
groupId project.group
artifactId project.name
version project.version
name project.name
2016-10-03 14:25:26 +02:00
description projectDescription
packaging 'jar'
inceptionYear '2016'
url scmUrl
organization {
name 'xbib'
url 'http://xbib.org'
}
developers {
developer {
2018-07-10 14:41:20 +02:00
id 'xbib'
2016-10-03 14:25:26 +02:00
name 'Jörg Prante'
email 'joergprante@gmail.com'
url 'https://github.com/jprante'
}
}
scm {
url scmUrl
connection scmConnection
developerConnection scmDeveloperConnection
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
}
}
}
}
nexusStaging {
packageGroup = "org.xbib"
}