diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2023-04-02 00:02:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-01 18:02:47 +0200 |
commit | 6b77557e0e87cf5afd9ebd3985323ff1249e615c (patch) | |
tree | 36474042ef39f863aedc007eab81a9b09cc7aa78 /build.gradle | |
parent | 655cc902d3df19a1ac2bfaa38cc928ed629d0171 (diff) | |
download | GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.tar.gz GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.tar.bz2 GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.zip |
Recipe Adder v2 (#1770)
* add everything
* fixes
* migrate plasma forge recipes
* syntax update
* make chances array length differ a fatal error
* time constants + long eut overload
* migrate extruder recipes
* migrate electromagnetic separator recipes
* migrate wiremill recipes
* migrate forming press recipes
* migrate bender recipes
* add doc to clarify the three itemInputs
* migrate alloy smelter recipes
* migrate arc furnace recipes
* added ModIDs enum
* sort ModIDs
* migrate autoclave recipes
* migrated some assembler recipes
* split a bit more assembler recipes
* migrate canner recipes
* migrate brewing recipes
* ic2 mod check in canner recipes
* use some loops to reduce the amount of recipes to migrate
* add requested helper methods
* migrate vacuum freezer recipes
* migrate thermal centrifuge recipes
* format smelter recipes only, doesn't go through normal GT recipe
* migrated slicer recipes
* migrated sifter recipes
* Use proper enum now
* remove more constants
* cleaning cutting recipes before migration
* remove tons of dead commented recipes
* migrate pyrolyse recipes
* use ModIDs enum more
* migrate printer recipes
* add a less confusing way to specify value of specialItem
* migrate pulverizer recipes
* less confusing special item specification
* even more ModIDs enum usage
* fix auto * import confusing Minecraft enum value with Minecraft client object
* migrated blast furnace recipes
* migrated Centrifuge recipes
* migrated assembler recipes
* migrated implosion compressor recipes
* migrated extractor recipes
* migrated mixer recipes
* remove useless code
* mgrate universal chemical recipes
* refactor chemical recipes
* migrate single block only chem reactor recipes
* migrate chem reactor recipes
* reworked circuit assembler recipes before migrating them
* migrated circuit assembler recipes
* fix merge conflict for assembler recipes
* remove leftover of the merge conflicts
* fix weird translation glitch
* example of assembly line recipe using RA2
* bugfixes for assline
* remove specialValue usage in blast furnace recipes
* fix more bugs
* add nooptimize to where it make sense
* add recipe descriptions
* Materials.Superconductor -> Materials.SuperconductorUHV
* remove useless Object creations
* remove explicit long casts
* migrate assemblyline recipes
* migrate chemical bath recipes
* migrate compressor recipes
* move smelting recipe where it belongs
* migrated cutting machine recipes
* migrated fermenter recipes (unhide alcohol)
* remove explicit long casts
* migrate fluid canner recipes
* migrate fluid heater recipes
* migrated fusion recipes
* migrated lathe recipes
* migrated laser engraver recipes
* migrated packager recipes
* migrated forge hammer recipes
* migrated TPM recipes
* exit early and reduced indents
* migrated fluid extractor recipes
* migrated fluid solidifier recipes
* migrated electrolyzer recipes
* migrated crop processing recipes
* migrated default polymerization recipes
* migrate distillery recipes
* migrate matter amplifier recipes
* add metadata identifier for fusion ignition threshold
* migrate fuel recipes
* update bs
(cherry picked from commit c2d931c9b6caa0376e9d50591894cd849021104d)
* spotless
(cherry picked from commit 1060f5357fb95e28bfae1f052025f55dabc21a0f)
* guard against null itemstacks
* wrong translation
* fix empty arrays being accessed
* add 0 duration and 0 EU/t for fuel recipes
* fix typo in matter amplifier recipes
* spotless apply
---------
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 67 |
1 files changed, 41 insertions, 26 deletions
diff --git a/build.gradle b/build.gradle index 927ed20fdb..055dcee435 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1678003329 +//version: 1680120787 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -65,7 +65,7 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false id 'org.jetbrains.kotlin.kapt' version '1.8.0' apply false id 'com.google.devtools.ksp' version '1.8.0-1.0.9' apply false - id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version ,unused, available for addon.gradle + id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle id 'com.github.johnrengelman.shadow' version '7.1.2' apply false id 'com.palantir.git-version' version '0.13.0' apply false // 0.13.0 is the last jvm8 supporting version id 'de.undercouch.download' version '5.3.0' @@ -73,7 +73,7 @@ plugins { id 'com.diffplug.spotless' version '6.7.2' apply false id 'com.modrinth.minotaur' version '2.+' apply false id 'com.matthewprenger.cursegradle' version '1.4.0' apply false - id 'com.gtnewhorizons.retrofuturagradle' version '1.2.3' + id 'com.gtnewhorizons.retrofuturagradle' version '1.2.4' } boolean settingsupdated = verifySettingsGradle() settingsupdated = verifyGitAttributes() || settingsupdated @@ -160,6 +160,14 @@ java { } } +tasks.withType(JavaCompile).configureEach { + options.encoding = "UTF-8" +} + +tasks.withType(ScalaCompile).configureEach { + options.encoding = "UTF-8" +} + pluginManager.withPlugin('org.jetbrains.kotlin.jvm') { // If Kotlin is enabled in the project kotlin { @@ -397,8 +405,6 @@ minecraft { extraRunJvmArguments.add("-ea:${modGroup}") if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) { - extraTweakClasses.add("org.spongepowered.asm.launch.MixinTweaker") - if (usesMixinDebug.toBoolean()) { extraRunJvmArguments.addAll([ "-Dmixin.debug.countInjections=true", @@ -513,14 +519,6 @@ repositories { url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" allowInsecureProtocol = true } - if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) { - if (usesMixinDebug.toBoolean()) { - maven { - name = "Fabric Maven" - url = "https://maven.fabricmc.net/" - } - } - } maven { name 'sonatype' url 'https://oss.sonatype.org/content/repositories/snapshots/' @@ -559,29 +557,49 @@ repositories { } } +def mixinProviderGroup = "io.github.legacymoddingmc" +def mixinProviderModule = "unimixins" +def mixinProviderVersion = "0.1.6" +def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}" +def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev" + dependencies { if (usesMixins.toBoolean()) { annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3') annotationProcessor('com.google.guava:guava:24.1.1-jre') annotationProcessor('com.google.code.gson:gson:2.8.6') - annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.13:processor') + annotationProcessor(mixinProviderSpec) if (usesMixinDebug.toBoolean()) { runtimeOnlyNonPublishable('org.jetbrains:intellij-fernflower:1.2.1.16') } } - if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) { - implementation('com.gtnewhorizon:gtnhmixins:2.1.13') + if (usesMixins.toBoolean()) { + implementation(mixinProviderSpec) + } else if (forceEnableMixins.toBoolean()) { + runtimeOnlyNonPublishable(mixinProviderSpec) } } pluginManager.withPlugin('org.jetbrains.kotlin.kapt') { if (usesMixins.toBoolean()) { dependencies { - kapt('com.gtnewhorizon:gtnhmixins:2.1.13:processor') + kapt(mixinProviderSpec) } } } +// Replace old mixin mods with unimixins +// https://docs.gradle.org/8.0.2/userguide/resolution_rules.html#sec:substitution_with_classifier +configurations.all { + resolutionStrategy.dependencySubstitution { + substitute module('com.gtnewhorizon:gtnhmixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") + substitute module('com.github.GTNewHorizons:Mixingasm') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") + substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") + substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") + substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier") + } +} + apply from: 'dependencies.gradle' def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json' @@ -695,13 +713,13 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies" } dependencies { - def lwjgl3ifyVersion = '1.1.35' + def lwjgl3ifyVersion = '1.3.3' def asmVersion = '9.4' if (modId != 'lwjgl3ify') { java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}") } if (modId != 'hodgepodge') { - java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.0.40') + java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.4') } java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false} @@ -793,10 +811,6 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask { !file.path.contains("2.9.4-nightly-20150209") // Remove lwjgl2 } this.classpath(project.java17DependenciesCfg) - - if (!(project.usesMixins.toBoolean() || project.forceEnableMixins.toBoolean())) { - this.extraArgs.addAll("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker") - } } } @@ -1006,6 +1020,7 @@ idea { } compiler.javac { afterEvaluate { + javacAdditionalOptions = "-encoding utf8" moduleJavacAdditionalOptions = [ (project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ') ] @@ -1125,7 +1140,7 @@ if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) { } } if (usesMixins.toBoolean()) { - addModrinthDep("required", "project", "gtnhmixins") + addModrinthDep("required", "project", "unimixins") } tasks.modrinth.dependsOn(build) tasks.publish.dependsOn(tasks.modrinth) @@ -1169,7 +1184,7 @@ if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null } } if (usesMixins.toBoolean()) { - addCurseForgeRelation("requiredDependency", "gtnhmixins") + addCurseForgeRelation("requiredDependency", "unimixins") } tasks.curseforge.dependsOn(build) tasks.publish.dependsOn(tasks.curseforge) @@ -1204,7 +1219,7 @@ def addCurseForgeRelation(String type, String name) { // Updating -def buildscriptGradleVersion = "8.0.1" +def buildscriptGradleVersion = "8.0.2" tasks.named('wrapper', Wrapper).configure { gradleVersion = buildscriptGradleVersion |