mirror of
https://github.com/LegacyModdingMC/UniMixins.git
synced 2026-10-25 20:32:33 +00:00
Mixin module works now I think
This commit is contained in:
1 parent
ba1f02d541
commit
b5891061e0
6 files changed
+49
-39
No files matched your search
+3
-16
@@ -12,9 +12,6 @@ buildscript {
|
||||
url = "https://jitpack.io"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.11'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
@@ -26,18 +23,6 @@ plugins {
|
||||
id("com.gtnewhorizons.retrofuturagradle") version "1.3.19"
|
||||
}
|
||||
|
||||
// Set the toolchain version to decouple the Java we run Gradle with from the Java used to compile and run the mod
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(8))
|
||||
// Azul covers the most platforms for Java 8 toolchains, crucially including MacOS arm64
|
||||
vendor.set(org.gradle.jvm.toolchain.JvmVendorSpec.AZUL)
|
||||
}
|
||||
// Generate sources and javadocs jars when building and publishing
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: 'maven-publish'
|
||||
@@ -77,6 +62,8 @@ allprojects {
|
||||
}
|
||||
|
||||
if(project.name.startsWith("module-") && project.name != "module-mixin" && project.name != "module-common") {
|
||||
// TODO rfg: figure out source and dev jars
|
||||
/*
|
||||
if(project.name != "module-all") {
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allSource
|
||||
@@ -118,7 +105,7 @@ allprojects {
|
||||
it.dependsOn reobf
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Put license, credits and readme in jar
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
apply from: "${rootDir}/module-conventions.gradle"
|
||||
|
||||
archivesBaseName = archivesBaseName.replace("-1.7.10", "-common-1.7.10" )
|
||||
|
||||
// Shadow considers the shadow jar the output of this subproject when it gets
|
||||
// shadowed elsewhere, so we have to set it up
|
||||
shadowJar {
|
||||
archiveClassifier = 'dev'
|
||||
configurations = []
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Stuff that should get set in every module. Because putting it in allprojects
|
||||
// doesn't work for some reason!
|
||||
|
||||
// Set the toolchain version to decouple the Java we run Gradle with from the Java used to compile and run the mod
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(8))
|
||||
// Azul covers the most platforms for Java 8 toolchains, crucially including MacOS arm64
|
||||
vendor.set(org.gradle.jvm.toolchain.JvmVendorSpec.AZUL)
|
||||
}
|
||||
// TODO rfg: figure out source and dev jars
|
||||
// Generate sources and javadocs jars when building and publishing
|
||||
//withSourcesJar()
|
||||
//withJavadocJar()
|
||||
}
|
||||
+12
-13
@@ -1,12 +1,11 @@
|
||||
apply from: "${rootDir}/module-conventions.gradle"
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
|
||||
}
|
||||
}
|
||||
|
||||
def versionBase = version
|
||||
@@ -120,11 +119,11 @@ flavors.each {
|
||||
|
||||
// We want to *not* relocate ASM in the bridge classes. So we use a multi-step
|
||||
// build procedure:
|
||||
|
||||
|
||||
// 1. Create relocated Mixin jar, without the bridge classes
|
||||
task("mixinJar$_flavor", type: ShadowJar) {
|
||||
destinationDirectory = file("build/tmp")
|
||||
classifier = "tmpMixin$_flavor"
|
||||
archiveClassifier = "tmpMixin$_flavor"
|
||||
configurations = [project.configurations."shadow$_flavor"]
|
||||
|
||||
relocate 'org.objectweb.asm', 'org.spongepowered.asm.lib'
|
||||
@@ -161,7 +160,7 @@ flavors.each {
|
||||
// 2. Create Mixin jar without relocation, with *only* the bridge classes
|
||||
task("bridgeJar$_flavor", type: ShadowJar) {
|
||||
destinationDirectory = file("build/tmp")
|
||||
classifier = "tmpBridge$_flavor"
|
||||
archiveClassifier = "tmpBridge$_flavor"
|
||||
configurations = [project.configurations."shadowBridge$_flavor"]
|
||||
|
||||
include '*.jar'
|
||||
@@ -170,7 +169,7 @@ flavors.each {
|
||||
|
||||
// 3. Combine the two jars
|
||||
task("shadowJar$_flavor", type: ShadowJar) {
|
||||
version = versionBase + "+" + mixinFlavorClassifier
|
||||
archiveVersion = versionBase + "+" + mixinFlavorClassifier
|
||||
from(sourceSets.main.output) {
|
||||
exclude "mcmod.info"
|
||||
}
|
||||
@@ -216,8 +215,8 @@ flavors.each {
|
||||
exclude "mcmod.info"
|
||||
}
|
||||
|
||||
version = versionBase + "+" + mixinFlavorClassifier
|
||||
classifier = ''
|
||||
archiveVersion = versionBase + "+" + mixinFlavorClassifier
|
||||
archiveClassifier = ''
|
||||
configurations = [project.configurations."shadow$_flavor"]
|
||||
|
||||
relocate 'io.github.legacymoddingmc.unimixins.common', 'io.github.legacymoddingmc.unimixins.mixin.repackage.common'
|
||||
@@ -259,8 +258,8 @@ flavors.each {
|
||||
task("shadowSourcesJar$_flavor", type: ShadowJar) {
|
||||
from sourceSets.main.allSource
|
||||
|
||||
version = versionBase + "+" + mixinFlavorClassifier
|
||||
classifier = "sources"
|
||||
archiveVersion = versionBase + "+" + mixinFlavorClassifier
|
||||
archiveClassifier = "sources"
|
||||
configurations = [project.configurations."shadowSources$_flavor"]
|
||||
}
|
||||
|
||||
@@ -273,13 +272,13 @@ flavors.each {
|
||||
artifact tasks."shadowSourcesJar$_flavor"
|
||||
|
||||
artifactId = archivesBaseName.substring(1)
|
||||
version = tasks."shadowJar$_flavor".version
|
||||
version = tasks."shadowJar$_flavor".archiveVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Obfuscation is useless because we're not compiling code referencing Minecraft classes
|
||||
reobf.enabled = false
|
||||
reobfJar.enabled = false
|
||||
|
||||
jar.enabled = false
|
||||
Whitespace-only changes.
+10
-10
@@ -16,14 +16,14 @@ pluginManagement {
|
||||
}
|
||||
}
|
||||
|
||||
/*include 'module-mixin'
|
||||
include 'module-compat'
|
||||
include 'module-devcompat'
|
||||
include 'module-mixingasm'
|
||||
include 'module-spongemixins'
|
||||
include 'module-mixinbooterlegacy'
|
||||
include 'module-gasstation'
|
||||
include 'module-gtnhmixins'
|
||||
include 'module-mixinextras'
|
||||
include 'module-all'*/
|
||||
include 'module-mixin'
|
||||
// include 'module-compat'
|
||||
// include 'module-devcompat'
|
||||
// include 'module-mixingasm'
|
||||
// include 'module-spongemixins'
|
||||
// include 'module-mixinbooterlegacy'
|
||||
// include 'module-gasstation'
|
||||
// include 'module-gtnhmixins'
|
||||
// include 'module-mixinextras'
|
||||
// include 'module-all'
|
||||
include 'module-common'
|
||||
Reference in new issue
Block a user