build: use the same custom pom file for 'install', 'uploadArchives' and 'uploadBintray'. A custom pom with minimal information required to maven central
This commit is contained in:
parent
142d7bebae
commit
2aca942b1b
@ -8,6 +8,7 @@ bintray {
|
||||
user = bintray_user
|
||||
key = bintray_api_key
|
||||
configurations = ['archives']
|
||||
dryRun = false
|
||||
pkg {
|
||||
repo = 'org.jmonkeyengine'
|
||||
userOrg = 'jmonkeyengine'
|
||||
@ -15,11 +16,13 @@ bintray {
|
||||
desc = POM_DESCRIPTION
|
||||
websiteUrl = POM_URL
|
||||
licenses = ['BSD New']
|
||||
vcsUrl = POM_SCM_CONNECTION
|
||||
vcsUrl = POM_SCM_URL
|
||||
labels = ['jmonkeyengine']
|
||||
}
|
||||
}
|
||||
|
||||
bintrayUpload.dependsOn(writeFullPom)
|
||||
|
||||
bintrayUpload.onlyIf {
|
||||
(bintray_api_key.length() > 0) &&
|
||||
!(version ==~ /.*SNAPSHOT/)
|
||||
|
@ -61,12 +61,84 @@ task javadocJar(type: Jar, dependsOn: javadoc, description: 'Creates a jar from
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
def pomConfig = {
|
||||
name POM_NAME
|
||||
description POM_DESCRIPTION
|
||||
url POM_URL
|
||||
inceptionYear '2016'
|
||||
scm {
|
||||
url POM_SCM_URL
|
||||
connection POM_SCM_CONNECTION
|
||||
developerConnection POM_SCM_DEVELOPER_CONNECTION
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name POM_LICENSE_NAME
|
||||
url POM_LICENSE_URL
|
||||
distribution POM_LICENSE_DISTRIBUTION
|
||||
}
|
||||
}
|
||||
// from http://hub.jmonkeyengine.org/introduction/team/
|
||||
developers {
|
||||
developer {
|
||||
name 'Kirill Vainer'
|
||||
id 'Momoko_Fan'
|
||||
}
|
||||
developer {
|
||||
name 'Erlend Sogge Heggen'
|
||||
id 'erlend_sh'
|
||||
}
|
||||
developer {
|
||||
name 'Skye Book'
|
||||
id 'sbook'
|
||||
}
|
||||
developer {
|
||||
name 'Normen Hansen'
|
||||
id 'normen'
|
||||
}
|
||||
developer {
|
||||
name 'Ruth Kusterer'
|
||||
id 'zathras'
|
||||
}
|
||||
developer {
|
||||
name 'Rémy Bouquet'
|
||||
id 'nehon'
|
||||
}
|
||||
developer {
|
||||
name 'Paul Speed'
|
||||
id 'pspeed'
|
||||
}
|
||||
developer {
|
||||
name 'Brent Owens'
|
||||
id 'Sploreg'
|
||||
}
|
||||
developer {
|
||||
name 'Eric Potter'
|
||||
id 'iwgeric'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// workaround to be able to use same custom pom with 'maven' and 'bintray' plugin
|
||||
task writeFullPom {
|
||||
ext.pomFile = "$mavenPomDir/${project.name}-${project.version}.pom"
|
||||
outputs.file pomFile
|
||||
doLast {
|
||||
pom {
|
||||
project pomConfig
|
||||
}.writeTo(pomFile)
|
||||
}
|
||||
}
|
||||
install.dependsOn(writeFullPom)
|
||||
uploadArchives.dependsOn(writeFullPom)
|
||||
|
||||
artifacts {
|
||||
archives jar
|
||||
archives sourcesJar
|
||||
if(buildJavaDoc == "true"){
|
||||
archives javadocJar
|
||||
}
|
||||
archives writeFullPom.outputs.files[0]
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
@ -80,23 +152,7 @@ uploadArchives {
|
||||
authentication(userName: "www-updater", privateKey: "private/www-updater.key")
|
||||
}
|
||||
|
||||
pom.project {
|
||||
name POM_NAME
|
||||
description POM_DESCRIPTION
|
||||
url POM_URL
|
||||
scm {
|
||||
url POM_SCM_URL
|
||||
connection POM_SCM_CONNECTION
|
||||
developerConnection POM_SCM_DEVELOPER_CONNECTION
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name POM_LICENSE_NAME
|
||||
url POM_LICENSE_URL
|
||||
distribution POM_LICENSE_DISTRIBUTION
|
||||
}
|
||||
}
|
||||
}
|
||||
pom.project pomConfig
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user