@@ -21,26 +21,22 @@ apply plugin: 'org.spongepowered.mixin'
2121
2222repositories {
2323 maven { url = " https://jitpack.io" }
24- maven {
25- name = ' sonatype'
26- url = ' http://oss.sonatype.org/content/repositories/public/'
27- }
24+ maven { url = ' http://oss.sonatype.org/content/repositories/public/' }
2825 maven { url = " http://repo.spongepowered.org/maven" }
2926}
3027
3128configurations {
3229 embed
33- coreShadow
34- compile. extendsFrom(embed)
30+ implementation. extendsFrom(embed)
3531}
3632
3733dependencies {
3834 embed ' com.flowpowered:flow-math:1.0.3'
3935 embed ' org.jgrapht:jgrapht-core:1.1.0'
4036 embed ' com.github.DimensionalDevelopment:poly2tri.java:master-SNAPSHOT'
37+ embed(" org.spongepowered:mixin:0.7.8-SNAPSHOT" ) { transitive = false }
4138 compileOnly ' com.github.DimensionalDevelopment:AnnotatedNBT:-SNAPSHOT'
42- compile(" org.spongepowered:mixin:0.7.8-SNAPSHOT" ) { transitive = false }
43- deobfProvided ' io.github.opencubicchunks:cubicchunks:1.12.2-0.0.819.0-SNAPSHOT'
39+ compileOnly ' io.github.opencubicchunks:cubicchunks:1.12.2-0.0.819.0-SNAPSHOT'
4440}
4541
4642// Mod version
@@ -67,14 +63,14 @@ ext.mcversion = "1.12.2"
6763ext. forgeversion = " 14.23.2.2623"
6864String mcpversion = " snapshot_20180227"
6965
66+ // Configuration
7067minecraft {
7168 version = " $mcversion -$forgeversion "
7269 runDir = " run"
7370 mappings = mcpversion
7471 replace ' ${version}' , fullVersion
7572 makeObfSourceJar = false
76- // noinspection GroovyUnusedAssignment
77- def args = [
73+ ext. args = [
7874 " -Dfml.noGrab=false" ,
7975 " -Dfml.coreMods.load=org.dimdev.vanillafix.VanillaFixCoreMod" ,
8076 " -Dmixin.env.compatLevel=JAVA_8" ,
@@ -85,8 +81,10 @@ minecraft {
8581 ]
8682}
8783
88- mixin {
89- add sourceSets. main, " org.dimdev.vanillafix.mixins.refmap.json"
84+ sourceSets {
85+ main {
86+ ext. refMap = " mixins.vanillafix.refmap.json"
87+ }
9088}
9189
9290// Tasks
@@ -96,16 +94,14 @@ compileJava {
9694
9795jar {
9896 archiveName = archivesBaseName + " -" + jarVersion + " .jar"
99- from configurations. embed. collect { it. isDirectory() ? it : zipTree(it) }
100- manifest {
101- attributes(
102- " TweakClass" : " org.spongepowered.asm.launch.MixinTweaker" ,
103- " FMLCorePlugin" : " org.dimdev.vanillafix.VanillaFixCoreMod" ,
104- " TweakOrder" : 0 ,
105- " MixinConfigs" : " org.dimdev.vanillafix.mixins.json" ,
106- " ForceLoadAsMod" : " true"
107- )
97+ from(configurations. embed. collect { it. isDirectory() ? it : zipTree(it) }) {
98+ exclude " LICENSE.txt" , " META-INF/MANIFSET.MF" , " META-INF/maven/**" , " META-INF/*.RSA" , " META-INF/*.SF"
10899 }
100+ manifest. attributes(
101+ " TweakClass" : " org.spongepowered.asm.launch.MixinTweaker" ,
102+ " MixinConfigs" : " mixins.vanillafix.json" ,
103+ " FMLCorePlugin" : " org.dimdev.vanillafix.VanillaFixCoreMod"
104+ )
109105}
110106
111107task sourcesJar (type : Jar , dependsOn : classes) {
@@ -126,7 +122,6 @@ processResources {
126122 // Replace stuff in mcmod.info, nothing else
127123 from(sourceSets. main. resources. srcDirs) {
128124 include ' mcmod.info'
129- // replace version and mcversion
130125 expand ' version' : project. version, ' mcversion' : project. minecraft. version
131126 }
132127
@@ -140,6 +135,5 @@ task generatePocketSchematics(dependsOn: jar, type: JavaExec, group: "dimdoors")
140135 classpath = files(' build/libs/' + jar. archiveName)
141136 classpath + = sourceSets. main. runtimeClasspath
142137 main = " org.dimdev.dimdoors.shared.tools.SchematicGenerator"
143- // noinspection GroovyAssignabilityCheck (IntelliJ is wrong)
144- args " src/main/resources/assets/dimdoors/pockets/schematic"
138+ args = [" src/main/resources/assets/dimdoors/pockets/schematic" ]
145139}
0 commit comments