From 161d7aff59585dab2957e32c30730a1827d58c8b Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 19 Sep 2015 21:51:06 +1000 Subject: [PATCH] uploadArchives is very uncooperative --- build.gradle | 124 ++++++++++++++++++++++++--------------------------- 1 file changed, 59 insertions(+), 65 deletions(-) diff --git a/build.gradle b/build.gradle index 0b5f12b51..33213fca4 100644 --- a/build.gradle +++ b/build.gradle @@ -126,77 +126,71 @@ artifacts { uploadArchives { dependsOn 'build' - repositories { + repositories.mavenDeployer { 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) { - authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password") - } - - pom { - groupId = project.group - version = project.version - artifactId = project.archivesBaseName - project { - name project.archivesBaseName - packaging 'jar' - description 'Biomes O Plenty' - url 'https://github.com/Glitchfiend/BiomesOPlenty' - - scm { - url 'https://github.com/Glitchfiend/BiomesOPlenty' - connection 'scm:git:git://github.com/Glitchfiend/BiomesOPlenty.git' - developerConnection 'scm:git:git@github.com:Glitchfiend/BiomesOPlenty.git' - } - - issueManagement { - system 'github' - url 'https://github.com/Glitchfiend/BiomesOPlenty/issues' - } - - licenses { - license { - name 'Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International Public License' - url 'http://creativecommons.org/licenses/by-nc-nd/4.0/' - distribution 'repo' - } - } - - developers { - developer { - id 'Adubbz' - name 'Adubbz' - roles { role 'developer' } - } - developer { - id 'Amnet' - name 'Amnet' - roles { role 'developer' } - } - developer { - id 'Forstride' - name 'Forstride' - roles { role 'developer' } - } - developer { - id 'ted80' - name 'ted80' - roles { role 'developer' } - } - } - } - } + repository(url: project.filesmaven.url) { + authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password") } } else { logger.info('Publishing to repo folder') - mavenDeployer { - pom.version = "${project.minecraft.version}-${project.version}" - repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) + pom.version = "${project.minecraft.version}-${project.version}" + repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) + } + + pom { + groupId = project.group + version = project.version + artifactId = project.archivesBaseName + project { + name project.archivesBaseName + packaging 'jar' + description 'Biomes O Plenty' + url 'https://github.com/Glitchfiend/BiomesOPlenty' + + scm { + url 'https://github.com/Glitchfiend/BiomesOPlenty' + connection 'scm:git:git://github.com/Glitchfiend/BiomesOPlenty.git' + developerConnection 'scm:git:git@github.com:Glitchfiend/BiomesOPlenty.git' + } + + issueManagement { + system 'github' + url 'https://github.com/Glitchfiend/BiomesOPlenty/issues' + } + + licenses { + license { + name 'Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International Public License' + url 'http://creativecommons.org/licenses/by-nc-nd/4.0/' + distribution 'repo' + } + } + + developers { + developer { + id 'Adubbz' + name 'Adubbz' + roles { role 'developer' } + } + developer { + id 'Amnet' + name 'Amnet' + roles { role 'developer' } + } + developer { + id 'Forstride' + name 'Forstride' + roles { role 'developer' } + } + developer { + id 'ted80' + name 'ted80' + roles { role 'developer' } + } + } } } }