2020-03-17 16:10:32 +00:00
|
|
|
// forge's stuff
|
2019-12-15 05:04:52 +00:00
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
maven {
|
|
|
|
name = 'forge'
|
|
|
|
url = 'http://files.minecraftforge.net/maven'
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = 'SpongePowered'
|
|
|
|
url = 'http://repo.spongepowered.org/maven'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
2020-03-04 14:39:30 +00:00
|
|
|
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
|
|
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3'
|
2019-12-15 05:04:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
|
|
|
apply plugin: 'org.spongepowered.mixin'
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
|
|
|
|
version project.modVersion
|
|
|
|
group project.modGroup // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
|
|
|
|
|
|
|
sourceCompatibility = targetCompatibility = '1.8'
|
|
|
|
compileJava {
|
|
|
|
sourceCompatibility = targetCompatibility = '1.8'
|
|
|
|
}
|
|
|
|
|
|
|
|
minecraft {
|
|
|
|
version = project.forgeVersion
|
|
|
|
runDir = 'run'
|
|
|
|
mappings = project.mcpVersion
|
|
|
|
coreMod = 'me.zeroeightsix.kami.mixin.MixinLoaderForge'
|
|
|
|
makeObfSourceJar = false
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = 'spongepowered-repo'
|
|
|
|
url = 'http://repo.spongepowered.org/maven/'
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = 'impactdevelopment-repo'
|
|
|
|
url = 'https://impactdevelopment.github.io/maven/'
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = 'swt-repo'
|
|
|
|
url = "http://maven-eclipse.github.io/maven"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = "jitpack.io"
|
|
|
|
url = "https://jitpack.io"
|
|
|
|
}
|
|
|
|
mavenCentral()
|
2020-03-04 14:39:30 +00:00
|
|
|
jcenter()
|
2019-12-15 05:04:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-03-06 22:37:13 +00:00
|
|
|
// mixin needs to be distributed with the mod, very important
|
|
|
|
compile("org.spongepowered:mixin:0.7.8-SNAPSHOT") { // do NOT update this to 8.0 or above, it breaks compatibility with future client
|
2019-12-15 05:04:52 +00:00
|
|
|
exclude module: 'launchwrapper'
|
|
|
|
exclude module: 'guava'
|
|
|
|
exclude module: 'gson'
|
|
|
|
exclude module: 'commons-io'
|
|
|
|
}
|
2020-03-04 14:39:30 +00:00
|
|
|
compile "com.github.ZeroMemes:Alpine:1.7"
|
2019-12-15 05:04:52 +00:00
|
|
|
compile group: 'net.jodah', name: 'typetools', version: '0.5.0'
|
2020-03-04 14:39:30 +00:00
|
|
|
compile group: 'org.yaml', name: 'snakeyaml', version: '1.25'
|
|
|
|
compile(group: 'org.reflections', name: 'reflections', version: '0.9.12') {
|
2019-12-15 05:04:52 +00:00
|
|
|
exclude group: 'com.google.guava', module: 'guava'
|
|
|
|
}
|
2020-01-21 15:38:55 +00:00
|
|
|
compile 'club.minnced:java-discord-rpc:v2.0.1'
|
2019-12-15 05:04:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
// this will ensure that this task is redone when the versions change.
|
|
|
|
inputs.property 'version', project.version
|
|
|
|
inputs.property 'mcversion', project.minecraft.version
|
|
|
|
|
|
|
|
// replace stuff in mcmod.info, nothing else
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include 'mcmod.info'
|
|
|
|
|
|
|
|
// replace version and mcversion
|
|
|
|
expand 'version': project.version, 'mcversion': project.minecraft.version
|
|
|
|
}
|
|
|
|
|
|
|
|
// copy everything else, thats not the mcmod.info
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude 'mcmod.info'
|
|
|
|
}
|
|
|
|
|
|
|
|
// move _at.cfg into META-INF
|
|
|
|
rename '(.+_at.cfg)', 'META-INF/$1'
|
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
dependencies {
|
|
|
|
include(dependency('org.spongepowered:mixin'))
|
|
|
|
include(dependency('com.github.ZeroMemes:Alpine'))
|
2020-01-23 16:50:33 +00:00
|
|
|
include(dependency('club.minnced:java-discord-rpc'))
|
2019-12-15 05:04:52 +00:00
|
|
|
include(dependency('net.jodah:typetools'))
|
|
|
|
include(dependency('org.yaml:snakeyaml'))
|
|
|
|
include(dependency('org.reflections:reflections'))
|
|
|
|
include(dependency('org.javassist:javassist'))
|
|
|
|
}
|
2020-01-23 16:50:33 +00:00
|
|
|
exclude 'dummyThing' // can someone explain why this is here
|
2019-12-15 05:04:52 +00:00
|
|
|
classifier = 'release'
|
|
|
|
}
|
|
|
|
|
|
|
|
mixin {
|
|
|
|
defaultObfuscationEnv searge
|
|
|
|
add sourceSets.main, 'mixins.kami.refmap.json'
|
|
|
|
}
|
|
|
|
|
|
|
|
reobf {
|
|
|
|
shadowJar {
|
|
|
|
mappingType = 'SEARGE'
|
|
|
|
classpath = sourceSets.main.compileClasspath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes(
|
|
|
|
'MixinConfigs': 'mixins.kami.json',
|
|
|
|
'tweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
|
|
|
|
'TweakOrder': 0,
|
|
|
|
'FMLCorePluginContainsFMLMod': 'true',
|
|
|
|
'FMLCorePlugin': 'me.zeroeightsix.kami.mixin.MixinLoaderForge',
|
|
|
|
'ForceLoadAsMod': 'true',
|
|
|
|
'FMLAT': 'kami_at.cfg'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
build.dependsOn(shadowJar)
|