diff --git a/build.gradle b/build.gradle index 31f568fef7..c7778f9297 100644 --- a/build.gradle +++ b/build.gradle @@ -29,13 +29,14 @@ plugins { id 'eclipse' id 'idea' id 'de.undercouch.download' version '5.4.0' - id 'net.minecraftforge.gradle.patcher' version '[6.0.11,6.2)' apply false - id 'net.minecraftforge.gradle.mcp' version '[6.0.11,6.2)' apply false + id 'net.minecraftforge.gradle.patcher' version '[6.0.52,6.2)' apply false + id 'net.minecraftforge.gradle.mcp' version '[6.0.52,6.2)' apply false } Util.init() //Init all our extension methods! ext { + HAS_CLEAN = findProject(':clean') != null JAR_SIGNER = null if (project.hasProperty('keystore')) { JAR_SIGNER = [ @@ -227,7 +228,7 @@ project(':mcp') { } } -if (!System.env.TEAMCITY_VERSION) { +if (HAS_CLEAN) { project(':clean') { evaluationDependsOn(':mcp') apply plugin: 'net.minecraftforge.gradle.patcher' @@ -890,7 +891,7 @@ project(':fmlonly') { } project(':forge') { - evaluationDependsOn(System.env.TEAMCITY_VERSION ? ':mcp' : ':clean') + evaluationDependsOn(HAS_CLEAN ? ':clean' : ':mcp') apply plugin: 'java-library' apply plugin: 'net.minecraftforge.gradle.patcher' apply plugin: 'org.cadixdev.licenser' @@ -970,18 +971,14 @@ project(':forge') { patcher { excs.from file("$rootDir/src/main/resources/forge.exc") - parent = project(System.env.TEAMCITY_VERSION ? ':mcp' : ':clean') + parent = project(HAS_CLEAN ? ':clean' : ':mcp') patches = file("$rootDir/patches/minecraft") patchedSrc = file('src/main/java') srgPatches = true accessTransformers.from file("$rootDir/src/main/resources/META-INF/accesstransformer.cfg") sideAnnotationStrippers.from file("$rootDir/src/main/resources/forge.sas") - - // the clean project provides these. if we're not using it, we need to provide them ourselves - if (System.env.TEAMCITY_VERSION) { - mappings channel: MAPPING_CHANNEL, version: MAPPING_VERSION - mcVersion = MC_VERSION - } + mappings channel: MAPPING_CHANNEL, version: MAPPING_VERSION + mcVersion = MC_VERSION runs { forge_client { @@ -1803,7 +1800,7 @@ project(':forge') { //evaluationDependsOnChildren() task setup() { //These must be strings so that we can do lazy resolution. Else we need evaluationDependsOnChildren above - if (!System.env.TEAMCITY_VERSION) + if (HAS_CLEAN) dependsOn ':clean:extractMapped' if (symlinkValid) dependsOn ':fmlonly:extractMapped' @@ -1818,21 +1815,9 @@ task doChecks { if (symlinkValid) project.gradle.startParameter.excludedTaskNames.add(':fmlonly:genPatches') -if (!System.env.TEAMCITY_VERSION) +if (HAS_CLEAN) project.gradle.startParameter.excludedTaskNames.add(':clean:genPatches') -//Also output FMLOnly when building a version. -if (System.env.TEAMCITY_VERSION) { - //Only setup the CI environment if and only if the environment variables are set. - tasks.configureTeamCity { - doLast { - println "##teamcity[buildNumber '${project(':forge').version}']" - println "##teamcity[setParameter name='env.PUBLISHED_JAVA_ARTIFACT_VERSION' value='${project(':forge').version}']" - println "##teamcity[setParameter name='env.PUBLISHED_JAVA_FML_ARTIFACT_VERSION' value='${project(':fmlonly').version}']" - } - } -} - idea { module { // IntelliJ IDEA does not do this by itself anymore... diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index f99dfb7c72..dbff0dad0b 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -6,7 +6,7 @@ repositories { dependencies { implementation 'org.ow2.asm:asm:9.9.1' implementation 'org.ow2.asm:asm-tree:9.9.1' - implementation 'net.minecraftforge:srgutils:0.6.2' + implementation 'net.minecraftforge:srgutils:0.6.5' implementation 'commons-io:commons-io:2.12.0' implementation 'com.google.code.gson:gson:2.10.1' implementation 'org.eclipse.jgit:org.eclipse.jgit:6.5.0.202303070854-r' diff --git a/settings.gradle b/settings.gradle index 537bfa1a94..3346d0bf7e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -37,7 +37,7 @@ project(":mcp").projectDir = file("projects/mcp") project(":fmlonly").projectDir = file("projects/fmlonly") project(":forge").projectDir = file("projects/forge") -if (!System.env.TEAMCITY_VERSION) { +if (false && !'true'.equals(System.env.CI)) { include ':clean' project(":clean").projectDir = file("projects/clean") }