From 6840197c4493f4f797c2bac26de73ffd5da2a8ce Mon Sep 17 00:00:00 2001 From: Adubbz Date: Tue, 15 Dec 2015 20:05:06 +1100 Subject: [PATCH] Attempting to fix Gradle --- build.gradle | 130 +++++++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 62 deletions(-) diff --git a/build.gradle b/build.gradle index 3d2d00440..26ef7bf53 100644 --- a/build.gradle +++ b/build.gradle @@ -106,73 +106,79 @@ artifacts { } uploadArchives { - dependsOn 'build' - - repositories.mavenDeployer { - if ("$System.env.maven_username" != "null" && "$System.env.maven_password" != "null") { + dependsOn 'reobf' + repositories { + if (project.hasProperty("filesmaven")) { logger.info('Publishing to files server') + + mavenDeployer { + configuration = configurations.deployJars - repository(url: "http://files.minecraftforge.net/maven/manage/upload") { - authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password") + repository(url: project.filesmaven.url) { + authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key) + } + + // This is just the pom data for the maven repo + 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' } + } + } + } + } } } else { logger.info('Publishing to repo folder') - - 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' } - } - } + + mavenDeployer { + pom.version = "${project.minecraft.version}-${project.version}" + repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) } } }