Last active
July 27, 2023 11:29
-
-
Save ddozzi/f0c0c407615f9eccee544def503241c8 to your computer and use it in GitHub Desktop.
gradletig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
jcenter() | |
maven { | |
name = "forge" | |
url = "http://files.minecraftforge.net/maven" | |
} | |
maven { | |
name = 'sponge' | |
url = 'https://repo.spongepowered.org/maven' | |
} | |
} | |
dependencies { | |
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT' | |
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT' | |
} | |
} | |
apply plugin: 'net.minecraftforge.gradle.tweaker-client' | |
apply plugin: 'org.spongepowered.mixin' | |
apply plugin: 'java' | |
version = "1.0" | |
group= "me.ddozzi" // http://maven.apache.org/guides/mini/guide-naming-conventions.html | |
archivesBaseName = "ExampleClient" | |
sourceCompatibility = targetCompatibility = 1.8 | |
compileJava.options.encoding = 'UTF-8' | |
minecraft { | |
version = "1.8.9" | |
tweakClass = "me.ddozzi.exampleclient.mixins.ExampleClientTweaker" | |
runDir = "run" | |
mappings = "stable_20" | |
makeObfSourceJar = false | |
} | |
repositories { | |
maven { url "https://jitpack.io" } | |
maven { | |
name = 'sponge' | |
url = 'https://repo.spongepowered.org/maven/' | |
} | |
mavenCentral() | |
jcenter() | |
} | |
configurations { | |
embed | |
compile.extendsFrom(embed) | |
} | |
dependencies { | |
embed('org.spongepowered:mixin:0.7.11-SNAPSHOT') { | |
exclude module: 'launchwrapper' | |
exclude module: 'guava' | |
exclude module: 'gson' | |
exclude module: 'commons-io' | |
} | |
compile('org.spongepowered:mixin:0.7.11-SNAPSHOT') | |
} | |
mixin { | |
defaultObfuscationEnv notch | |
add sourceSets.main, "mixins.exampleclient.refmap.json" | |
} | |
processResources { | |
inputs.files "src/main/resources" | |
outputs.dir "build/classes/main" | |
copy { | |
from("src/main/resources") | |
into("build/classes/main") | |
} | |
} | |
jar { | |
dependsOn configurations.compile | |
from { | |
configurations.embed.collect { | |
it.isDirectory() ? it : zipTree(it) | |
} | |
} | |
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA' | |
} | |
jar { | |
manifest.attributes( | |
"MixinConfigs": 'mixins.exampleclient.json', | |
"TweakClass": "me.ddozzi.exampleclient.mixins.ExampleClientTweaker", | |
"TweakOrder": 0, | |
"Manifest-Version": 1.0 | |
) | |
configurations.embed.each { dep -> | |
from(project.zipTree(dep)) { | |
exclude 'META-INF', 'META-INF/**' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment