aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2021-12-31 15:22:31 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2021-12-31 15:22:31 +0700
commit503bbd969e929c42221d835c7f124940648100f2 (patch)
treed2dd2f827ddb4a6556e237d3fe4a102d12412e05 /build.gradle
parentfa0f88fff7e617d522d69ae3989477c43a5f35e7 (diff)
downloadChatting-503bbd969e929c42221d835c7f124940648100f2.tar.gz
Chatting-503bbd969e929c42221d835c7f124940648100f2.tar.bz2
Chatting-503bbd969e929c42221d835c7f124940648100f2.zip
Text Render Type
update to mixin 0.8 (may break dev env)
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle55
1 files changed, 33 insertions, 22 deletions
diff --git a/build.gradle b/build.gradle
index 673e9d4..9c45bec 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
+//file:noinspection GradlePackageUpdate
plugins {
id "net.minecraftforge.gradle.forge" version "6f53277"
id "com.github.johnrengelman.shadow" version "6.1.0"
- id 'org.spongepowered.mixin' version "d5f9873"
id 'org.jetbrains.kotlin.jvm' version "1.6.10"
id "net.kyori.blossom" version "1.3.0"
id "java"
@@ -48,8 +48,20 @@ dependencies {
include ('gg.essential:loader-launchwrapper:1.1.3') {
transitive = false
}
- implementation 'gg.essential:essential-1.8.9-forge:1626+release-launch'
- annotationProcessor 'org.spongepowered:mixin:0.7.11-SNAPSHOT'
+ compileOnly 'gg.essential:essential-1.8.9-forge:1725'
+ compileOnly 'org.spongepowered:mixin:0.8.4'
+ annotationProcessor 'org.spongepowered:mixin:0.8.4:processor'
+
+ // dependencies for mixin that aren't applied
+ annotationProcessor 'com.google.code.gson:gson:2.2.4'
+ annotationProcessor 'com.google.guava:guava:21.0'
+ annotationProcessor 'org.ow2.asm:asm-tree:6.2'
+ annotationProcessor 'org.apache.logging.log4j:log4j-core:2.0-beta9'
+}
+
+ext {
+ mixinSrg = new File(project.buildDir, 'tmp/mixins/mixins.srg')
+ mixinRefMap = new File(project.buildDir, "tmp/mixins/mixins.${mod_id}.refmap.json")
}
/**
@@ -87,30 +99,13 @@ jar {
enabled = false
}
-/**
- * This task simply moves resources so they can be accessed at runtime, Forge is quite weird isn't it
- */
-task moveResources {
- doLast {
- ant.move file: "${buildDir}/resources/main",
- todir: "${buildDir}/classes/kotlin"
- }
-}
-
-moveResources.dependsOn processResources
-classes.dependsOn moveResources
-
-mixin {
- disableRefMapWarning = true
- defaultObfuscationEnv searge
- add sourceSets.main, "mixins.${mod_id}.refmap.json"
-}
// This adds support to ("include") libraries into our JAR
shadowJar {
archiveClassifier.set('')
configurations = [project.configurations.include]
duplicatesStrategy DuplicatesStrategy.EXCLUDE
+ from files(project.mixinRefMap.canonicalPath)
}
reobf {
@@ -124,6 +119,22 @@ sourceSets {
dummy
main {
compileClasspath += dummy.output
- ext.refMap = "mixins.${mod_id}.refmap.json"
+ output.resourcesDir = file("${buildDir}/classes/kotlin/main")
}
}
+
+compileJava {
+ options.compilerArgs += [
+ "-AoutSrgFile=${project.mixinSrg.canonicalPath}",
+ "-AoutRefMapFile=${project.mixinRefMap.canonicalPath}",
+ "-AreobfSrgFile=${project.file('build/mcp-srg.srg').canonicalPath}"
+ ]
+}
+
+task copySrg(type: Copy, dependsOn: 'genSrgs') {
+ from { project.tasks.genSrgs.mcpToSrg }
+ into 'build'
+}
+compileJava.dependsOn copySrg
+
+reobfJar.addSecondarySrgFile project.mixinSrg