aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-05-11 16:59:21 +0900
committerGitHub <noreply@github.com>2023-05-11 09:59:21 +0200
commit3d3605a1f20bfcf164290b29c7632d3bdca00fe5 (patch)
tree88b251616cae8d2da2f19369f387d55913cd1bd7
parent76810fa8addf9f7a2cdb9e861798d315d0893581 (diff)
downloadGT5-Unofficial-3d3605a1f20bfcf164290b29c7632d3bdca00fe5.tar.gz
GT5-Unofficial-3d3605a1f20bfcf164290b29c7632d3bdca00fe5.tar.bz2
GT5-Unofficial-3d3605a1f20bfcf164290b29c7632d3bdca00fe5.zip
Fix MetaTEs not being registered at all in non-dev env (#9)
* Fix MetaTEs not being registered at all in non-dev env * Specify AT file name
-rw-r--r--addon.gradle7
-rw-r--r--build.gradle39
-rw-r--r--dependencies.gradle4
-rw-r--r--gradle.properties6
-rw-r--r--repositories.gradle27
-rw-r--r--src/main/java/net/glease/ggfab/GigaGramFab.java2
6 files changed, 43 insertions, 42 deletions
diff --git a/addon.gradle b/addon.gradle
index 94f0829400..6f39b0c545 100644
--- a/addon.gradle
+++ b/addon.gradle
@@ -1,10 +1,3 @@
-idea {
- module {
- inheritOutputDirs = false
- outputDir = compileJava.destinationDir
- testOutputDir = compileTestJava.destinationDir
- }
-}
test {
useJUnitPlatform()
testLogging {
diff --git a/build.gradle b/build.gradle
index 17e7501a27..3fa171e0dd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,4 +1,4 @@
-//version: 1682616243
+//version: 1683705740
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -69,8 +69,11 @@ plugins {
id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
- id 'com.gtnewhorizons.retrofuturagradle' version '1.3.7'
+ id 'com.gtnewhorizons.retrofuturagradle' version '1.3.11'
}
+
+print("You might want to check out './gradlew :faq' if your build fails.\n")
+
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
if (settingsupdated)
@@ -219,6 +222,8 @@ if (enableModernJavaSyntax.toBoolean()) {
dependencies {
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0'
+ // workaround for https://github.com/bsideup/jabel/issues/174
+ annotationProcessor 'net.java.dev.jna:jna-platform:5.13.0'
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') {
transitive = false // We only care about the 1 annotation class
}
@@ -564,9 +569,10 @@ repositories {
def mixinProviderGroup = "io.github.legacymoddingmc"
def mixinProviderModule = "unimixins"
-def mixinProviderVersion = "0.1.6"
+def mixinProviderVersion = "0.1.7.1"
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
+ext.mixinProviderSpec = mixinProviderSpec
dependencies {
if (usesMixins.toBoolean()) {
@@ -817,6 +823,18 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
}
this.classpath(project.java17DependenciesCfg)
}
+
+ public void setup(Project project) {
+ super.setup(project)
+ if (project.usesMixins.toBoolean()) {
+ this.extraJvmArgs.addAll(project.provider(() -> {
+ def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec))
+ mixinCfg.canBeConsumed = false
+ mixinCfg.transitive = false
+ enableHotswap ? ["-javaagent:" + mixinCfg.singleFile.absolutePath] : []
+ }))
+ }
+ }
}
def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Distribution.CLIENT, "runClient")
@@ -1252,6 +1270,21 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA
}
}
+// If you want to add more cases to this task, implement them as arguments if total amount to print gets too large
+tasks.register('faq') {
+ group = 'GTNH Buildscript'
+ description = 'Prints frequently asked questions about building a project'
+
+ doLast {
+ print("If your build fails to fetch dependencies, they might have been deleted and replaced by newer " +
+ "versions.\nCheck if the versions you try to fetch are still on the distributing sites.\n" +
+ "The links can be found in repositories.gradle and build.gradle:repositories, " +
+ "not build.gradle:buildscript.repositories - this one is for gradle plugin metadata.\n\n" +
+ "If your build fails to recognize the syntax of new Java versions, enable Jabel in your " +
+ "gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties.")
+ }
+}
+
static URL availableBuildScriptUrl() {
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle")
}
diff --git a/dependencies.gradle b/dependencies.gradle
index 246b463df3..011845387d 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -1,8 +1,8 @@
// Add your dependencies here
dependencies {
+ api("com.github.GTNewHorizons:GT5-Unofficial:5.09.43.26:dev")
+
testImplementation(platform('org.junit:junit-bom:5.8.2'))
testImplementation('org.junit.jupiter:junit-jupiter')
- compile("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
- compile("com.github.GTNewHorizons:GT5-Unofficial:5.09.43.07:dev")
}
diff --git a/gradle.properties b/gradle.properties
index 9f8a68d39a..2ba431d3a7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -39,7 +39,7 @@ apiPackage =
# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
-accessTransformersFile =
+accessTransformersFile = ggfab_at.cfg
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
@@ -59,4 +59,8 @@ forceEnableMixins = true
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = false
+
+# Uncomment this to disable spotless checks
+# This should only be uncommented to keep it easier to sync with upstream/other forks.
+# That is, if there is no other active fork/upstream, NEVER change this.
disableSpotless = true
diff --git a/repositories.gradle b/repositories.gradle
index 21017d1455..c227b16ec2 100644
--- a/repositories.gradle
+++ b/repositories.gradle
@@ -1,31 +1,4 @@
// Add any additional repositories for your dependencies here
repositories {
- maven {
- name = "GTNH"
- url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
- }
- maven {
- name = "ic2"
- url = "https://maven.ic2.player.to/"
- metadataSources {
- mavenPom()
- artifact()
- }
- }
- maven {
- name = "ic2"
- url = "https://maven2.ic2.player.to/"
- metadataSources {
- mavenPom()
- artifact()
- }
- }
- maven {
- url "https://cursemaven.com"
- }
- maven {
- name = "jitpack.io"
- url = "https://jitpack.io"
- }
}
diff --git a/src/main/java/net/glease/ggfab/GigaGramFab.java b/src/main/java/net/glease/ggfab/GigaGramFab.java
index 02d28fbbcb..b05703ef2e 100644
--- a/src/main/java/net/glease/ggfab/GigaGramFab.java
+++ b/src/main/java/net/glease/ggfab/GigaGramFab.java
@@ -6,7 +6,6 @@ import gregtech.api.GregTech_API;
import net.glease.ggfab.mte.MTE_AdvAssLine;
import net.glease.ggfab.mte.MTE_LinkedInputBus;
import net.glease.ggfab.nei.IMCForNEI;
-import net.minecraft.launchwrapper.Launch;
@Mod(modid = GGConstants.MODID, version = GGConstants.VERSION, name = GGConstants.MODNAME, acceptedMinecraftVersions = "[1.7.10]", dependencies = "required-after:IC2;required-before:gregtech")
public class GigaGramFab {
@@ -18,7 +17,6 @@ public class GigaGramFab {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
- if ((Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"))
GregTech_API.sAfterGTPreload.add(() -> {
GGItemList.AdvAssLine.set(new MTE_AdvAssLine(13532, "ggfab.machine.adv_assline", "Advanced Assembly Line").getStackForm(1));
GGItemList.LinkedInputBus.set(new MTE_LinkedInputBus(13533, "ggfab.machine.linked_input_bus", "Linked Input Bus", 5).getStackForm(1));