net/gradle/publish.gradle

76 lines
2.7 KiB
Groovy
Raw Normal View History

2017-07-24 16:02:50 +02:00
ext {
projectDescription = 'Network classes for Java'
scmUrl = 'https://github.com/xbib/net'
scmConnection = 'scm:git:git://github.com/xbib/net.git'
scmDeveloperConnection = 'scm:git:git://github.com/xbib/net.git'
}
2017-07-24 21:33:52 +02:00
task xbibUpload(type: Upload) {
group = 'publish'
2017-07-24 16:02:50 +02:00
configuration = configurations.archives
uploadDescriptor = true
repositories {
2017-07-24 21:33:52 +02:00
if (project.hasProperty("xbibUsername")) {
2017-07-24 16:02:50 +02:00
mavenDeployer {
configuration = configurations.wagon
2017-07-24 21:33:52 +02:00
repository(url: 'sftp://xbib.org/repository') {
authentication(userName: xbibUsername, privateKey: xbibPrivateKey)
2017-07-24 16:02:50 +02:00
}
}
}
}
}
task sonatypeUpload(type: Upload, dependsOn: build) {
group = 'publish'
2017-07-24 16:02:50 +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 {
groupId project.group
artifactId project.name
version project.version
name project.name
description projectDescription
packaging 'jar'
2017-07-24 21:33:52 +02:00
inceptionYear '2017'
2017-07-24 16:02:50 +02:00
url scmUrl
organization {
name 'xbib'
url 'http://xbib.org'
}
developers {
developer {
id 'xbib'
2017-07-24 16:02:50 +02:00
name 'Jörg Prante'
email 'joergprante@gmail.com'
2017-07-24 21:33:52 +02:00
url 'https://github.com/xbib'
2017-07-24 16:02:50 +02:00
}
}
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'
}
}
}
}
}
}
}