uploadArchives is very uncooperative

This commit is contained in:
Adubbz 2015-09-19 21:51:06 +10:00
parent e9c701746b
commit 161d7aff59

View file

@ -126,16 +126,19 @@ artifacts {
uploadArchives { uploadArchives {
dependsOn 'build' dependsOn 'build'
repositories { repositories.mavenDeployer {
if ("$System.env.maven_username" != "null" && "$System.env.maven_password" != "null") { if ("$System.env.maven_username" != "null" && "$System.env.maven_password" != "null") {
logger.info('Publishing to files server') logger.info('Publishing to files server')
mavenDeployer {
configuration = configurations.deployJars
repository(url: project.filesmaven.url) { repository(url: project.filesmaven.url) {
authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password") authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password")
} }
} else {
logger.info('Publishing to repo folder')
pom.version = "${project.minecraft.version}-${project.version}"
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
}
pom { pom {
groupId = project.group groupId = project.group
@ -191,13 +194,4 @@ uploadArchives {
} }
} }
} }
} else {
logger.info('Publishing to repo folder')
mavenDeployer {
pom.version = "${project.minecraft.version}-${project.version}"
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
}
}
}
} }