Compare commits

...
6 Commits
Author SHA1 Message Date
ah-OOG-ah 12c6c962b0 Update GasStation's license
It was relicensed to standard LGPL at some point
2025-06-06 20:23:46 -04:00
ah-OOG-ah e34254cd1e Consolidate build
Don't alter the group or artifact ID of the main module when publishing locally. Also update the NH maven so it builds.
2025-04-08 16:15:17 -04:00
ah-OOG-ahandRaven Szewczyk 1cbd6a0ecd Bump mixin to UniMix 0.15.4 (#39)
* Bump mixin

* Update github actions

---------

Co-authored-by: Raven Szewczyk <git@eigenraven.me>
2025-03-02 13:41:48 +00:00
ah-OOG-ah a97b3ce85c Update actions/upload-artifact (#40) 2025-02-19 08:41:45 -05:00
Jason Mitchell 56a008ce92 Update release.yml
V3 is being deprecated
2024-11-05 16:43:35 -08:00
Jason Mitchell 02a9a1a10d Move GTNH LateMixins to pre-init and fix compat with some mods that are triggering FMLConstructionEvent to load too early 2024-10-29 16:37:16 -07:00
9 changed files with 58 additions and 44 deletions

No files matched your search

+12 -5
View File
@@ -8,17 +8,24 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
validate-wrappers: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set up Gradle build
@@ -37,11 +44,11 @@ jobs:
mv build/tmp/ci-dev/* build/tmp/ci
rm build/tmp/ci/*-common-*.jar
mv build/tmp/ci/*-sources.jar build/tmp/ci-sources
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Package
path: build/tmp/ci
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Package-sources
path: build/tmp/ci-sources
+12 -5
View File
@@ -16,19 +16,26 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
validate-wrappers: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set up Gradle build
@@ -47,11 +54,11 @@ jobs:
mv build/tmp/ci-dev/* build/tmp/ci
rm build/tmp/ci/*-common-*.jar
mv build/tmp/ci/*-sources.jar build/tmp/ci-sources
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Package
path: build/tmp/ci
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Package-sources
path: build/tmp/ci-sources
+1 -1
View File
@@ -18,7 +18,7 @@ LICENSE: LGPLv2.1
## GasStation
Directory: module-gasstation
LICENSE: LGPLv3+SNEED
LICENSE: LGPLv3
## GTNHMixins
+1
View File
@@ -127,6 +127,7 @@ The project needs to be compiled using Java 8. For example: `JAVA_HOME=/path/to/
* `-Plocal`: use the locally built version of `unimix` when building the Mixin module.
* Invoke `./gradlew publishToMavenLocal` in the UniMix repo first to install a local build.
* `-PenableAltMixin`: build alternate flavors of the Mixin module, not just UniMix.
* `-PpublishAll`: publish all modules, not just the combined one.
### Roadmap
+19 -17
View File
@@ -45,7 +45,7 @@ allprojects {
}
maven {
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
url = "https://nexus.gtnewhorizons.com/nexus/content/groups/public/"
allowInsecureProtocol = true
}
maven {
@@ -61,25 +61,25 @@ allprojects {
// TODO only include IFMLLoadingPlugin, Mod and ComparableVersion
compileOnly "net.minecraftforge:forge:1.12.2-14.23.5.2860:universal"
}
// When publishing locally, publish every module and use the -1.7.10 suffix.
// Otherwise (for GTNH maven) only publish the -all module and don't use the suffix or the -all name or the unimixins group.
ext.localPublish = System.getenv("MAVEN_USER") == null;
ext.publishModuleToMaven = project.name == "module-all" || localPublish
ext.mavenIdSuffix = localPublish ? "-1.7.10" : ""
ext.mavenGroupId = localPublish ? project.group : project.group.replace(".unimixins", "")
if(project.name.startsWith("module-") && project.name != "module-mixin" && project.name != "module-common") {
if(project.name != "module-all") {
task sourcesJar(type: Jar) {
// The all module is published without any suffix, and to the normal group
// Other modules are published if publishAll is set, to io.github.legacymoddingmc.unimixins, with a -1.7.10 suffix
boolean publishAll = project.hasProperty("publishAll")
ext.mainModule = project.name == "module-all"
ext.publishModuleToMaven = mainModule || publishAll
ext.mavenGroupId = !mainModule ? project.group : project.group.replace(".unimixins", "")
if (project.name.startsWith("module-") && project.name != "module-mixin" && project.name != "module-common") {
if (project.name != "module-all") {
tasks.register('sourcesJar', Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
}
afterEvaluate {
if(project.name != "module-all") {
task devJar(type: Jar) {
if (!mainModule) {
tasks.register('devJar', Jar) {
classifier = 'dev'
def jarTask = (jar.enabled ? jar : shadowJar)
from zipTree(jarTask.getOutputs().getFiles().getSingleFile())
@@ -96,14 +96,17 @@ allprojects {
archives tasks."devJar"
}
if(publishModuleToMaven) {
if (publishModuleToMaven) {
publishing {
publications {
create("maven", MavenPublication) {
artifact jar.enabled ? jar : shadowJar
artifact source: tasks."sourcesJar", classifier: 'sources'
artifact source: tasks."devJar", classifier: 'dev'
artifactId = archivesBaseName.substring(1).replace("-1.7.10", mavenIdSuffix).replace("-all", localPublish ? "-all" : "")
if (mainModule)
artifactId = "unimixins"
else
artifactId = archivesBaseName.substring(1)
version = projectVersion
groupId = mavenGroupId
}
@@ -112,7 +115,7 @@ allprojects {
}
project.tasks.forEach {
if(it.name.startsWith("publish") && it.name.contains("PublicationTo")) {
if (it.name.startsWith("publish") && it.name.contains("PublicationTo")) {
it.dependsOn reobf
}
}
@@ -124,7 +127,6 @@ allprojects {
if (System.getenv("MAVEN_USER") != null) {
maven {
url = System.getenv("MAVEN_URL")
allowInsecureProtocol = System.getenv("MAVEN_URL").startsWith("http://") // Mostly for the GTNH maven
credentials {
username = System.getenv("MAVEN_USER") ?: "NONE"
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
@@ -6,11 +6,12 @@ import com.gtnewhorizon.gtnhmixins.ILateMixinLoader;
import com.gtnewhorizon.gtnhmixins.LateMixin;
import com.gtnewhorizon.gtnhmixins.Reflection;
import cpw.mods.fml.common.LoadController;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.LoaderState;
import cpw.mods.fml.common.ModClassLoader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.discovery.ASMDataTable;
import cpw.mods.fml.common.event.FMLConstructionEvent;
import net.minecraft.launchwrapper.Launch;
import org.apache.commons.lang3.reflect.FieldUtils;
@@ -32,18 +33,14 @@ import java.util.Map.Entry;
import java.util.Set;
@Mixin(value = FMLConstructionEvent.class, remap = false)
@Mixin(value = LoadController.class, remap = false)
public class LateMixinOrchestrationMixin {
private static boolean finished=false;
@Inject(method = "<init>", at = @At(value = "RETURN"))
private void beforeConstructing(Object[] eventData, CallbackInfo ci) throws Throwable {
// We would normally target something in LoadController, but FastCraft causes that class to be loaded too early to mixin,
// so we instead hijack the very first FMLConstructionEvent that's constructed and run the logic there.
if (finished)
@Inject(method = "distributeStateMessage(Lcpw/mods/fml/common/LoaderState;[Ljava/lang/Object;)V", at = @At(value = "HEAD"))
private void beforeConstructing(LoaderState state, Object[] eventData, CallbackInfo ci) throws Throwable {
// This state is where Forge adds mod files to ModClassLoader
if (state != LoaderState.CONSTRUCTING) {
return;
finished = true;
}
GTNHMixins.LOGGER.info("Instantiating all @LateMixin annotated and ILateMixinLoader implemented classes...");
@@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8.3-GTNH",
"compatibilityLevel": "JAVA_8",
"target": "@env(DEFAULT)",
"target": "@env(PREINIT)",
"package": "com.gtnewhorizon.gtnhmixins.mixins",
"refmap": "mixins.gtnhmixins.refmap.json",
"injectors": {
@@ -11,4 +11,4 @@
"mixins": [
"LateMixinOrchestrationMixin"
]
}
}
+2 -2
View File
@@ -266,14 +266,14 @@ flavors.each {
jar.dependsOn("shadowSourcesJar$_flavor")
if(publishModuleToMaven){
if (publishModuleToMaven){
publishing {
publications {
create("maven$_flavor", MavenPublication) {
artifact tasks."shadowJar$_flavor"
artifact tasks."shadowSourcesJar$_flavor"
artifactId = archivesBaseName.substring(1).replace("-1.7.10", mavenIdSuffix) + (mixinFlavor == "unimix" ? "" : "-" + mixinFlavor)
artifactId = archivesBaseName.substring(1) + (mixinFlavor == "unimix" ? "" : "-" + mixinFlavor)
groupId = mavenGroupId
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
fabricMixinVersion=0.15.3+mixin.0.8.7
unimixMixinVersion=0.15.3+mixin.0.8.7
unimixMixinVersion=0.15.4+mixin.0.8.7
spongepoweredMixinVersion=0.8.7
gtnhMixinVersion=0.8.7-GTNH-2
gasmixMixinVersion=0.8.7-gasstation_7