elx/gradle/publish.gradle

63 lines
2.3 KiB
Groovy
Raw Normal View History

ext {
description = 'Extensions for Elasticsearch clients (node and transport)'
scmUrl = 'https://github.com/jprante/elx'
scmConnection = 'scm:git:git://github.com/jprante/elx.git'
scmDeveloperConnection = 'scm:git:git://github.com/jprante/elx.git'
}
2016-11-01 17:28:05 +01:00
task sonaTypeUpload(type: Upload, dependsOn: build) {
group = 'publish'
2016-11-01 17:28:05 +01:00
configuration = configurations.archives
uploadDescriptor = true
repositories {
if (project.hasProperty('ossrhUsername')) {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots') {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
2016-11-01 23:27:40 +01:00
groupId project.group
artifactId project.name
version project.version
name project.name
2016-11-01 17:28:05 +01:00
description description
packaging 'jar'
inceptionYear '2019'
2016-11-01 17:28:05 +01:00
url scmUrl
organization {
name 'xbib'
url 'http://xbib.org'
}
developers {
developer {
id 'xbib'
2016-11-01 17:28:05 +01: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"
}