Skip to content

Commit

Permalink
Embed Mixin, remove SpongeMixins dependency
Browse files Browse the repository at this point in the history
This seemed to not work properly for me until I ran a `./gradlew clean`
  • Loading branch information
makamys committed Sep 9, 2021
1 parent 2505725 commit 05b36e5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Thumbs.db
## Jars
*.jar
!/gradle/wrapper/gradle-wrapper.jar
!/libs/*.jar
!/tools/mixin-0.8-SNAPSHOT.jar

### OSX (adds a lot of garbage)###
.DS_Store
Expand Down
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ repositories {
}
}

configurations {
embed
compile.extendsFrom(embed)
}

apply plugin: 'forge'

// Bump this every new code update after a version release, even if not releasing yet, that
Expand All @@ -37,7 +42,6 @@ compileJava {
dependencies {
// Can use `compileOnly` instead of `compile` if you want to require it at build time,
// but not require it in `runClient`/`runServer`
compileOnly files("libs/SpongeMixins-1.3.0-dev.jar")
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
Expand Down Expand Up @@ -137,7 +141,7 @@ repositories {
}

dependencies {
compile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
embed('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
// Mixin includes a lot of dependencies that are too up-to-date
exclude module: 'launchwrapper'
exclude module: 'guava'
Expand All @@ -159,6 +163,12 @@ jar {
attributes.put("ForceLoadAsMod", true)
attributes.put("MixinConfigs", yourMixinConfig)
}

// embed libraries in jar
from configurations.embed.collect {
exclude '**/LICENSE.txt'
it.isDirectory() ? it : zipTree(it)
}
}

reobf {
Expand Down
Binary file removed libs/SpongeMixins-1.3.0-dev.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/ganymedes01/etfuturum/lib/Reference.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class Reference {
public static final String MOD_ID = "etfuturum";
public static final String MOD_NAME = "Et Futurum Requiem";
public static final String MOD_URL = "https://www.curseforge.com/minecraft/mc-mods/et-futurum-requiem";
public static final String DEPENDENCIES = "required-after:Forge@[10.13.4.1558,);required-after:spongemixins@[1.2.0,);after:Thaumcraft@[4.2.3.5,);after:TwilightForest;after:HardcoreEnderExpansion;";
public static final String DEPENDENCIES = "required-after:Forge@[10.13.4.1558,);after:Thaumcraft@[4.2.3.5,);after:TwilightForest;after:HardcoreEnderExpansion;";
public static final String VERSION_NUMBER = "2.2.2";


Expand Down
Binary file added tools/mixin-0.8-SNAPSHOT.jar
Binary file not shown.

0 comments on commit 05b36e5

Please sign in to comment.