ForgePatch/build.gradle

144 lines
3.9 KiB
Groovy

buildscript {
repositories {
mavenLocal()
maven { url = 'http://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
}
}
apply plugin: 'eclipse'
group = 'net.minecraftforge'
version = '1.0.0'
project(':mcp') {
apply plugin: 'net.minecraftforge.gradle.forgedev.mcp'
mcp {
config = 'de.oceanlabs.mcp:mcp_config:1.13@zip'
pipeline = 'joined'
}
}
project(':clean') {
evaluationDependsOn(':mcp')
apply plugin: 'eclipse'
apply plugin: 'net.minecraftforge.gradle.forgedev.patcher'
repositories {
mavenCentral()
}
patcher {
parent = project(':mcp')
patchedSrc = file('src/main/java')
mappings channel: 'snapshot', version: '20180813-1.12'
mcVersion = '1.13'
}
task runclient(type: JavaExec) {
doFirst {
mkdir 'runclient'
}
classpath sourceSets.main.runtimeClasspath
args = ['--accessToken', '0', '--version', '1.13']
main 'net.minecraft.client.main.Main'
workingDir 'runclient'
}
}
project(':forge') {
evaluationDependsOn(':clean')
apply plugin: 'eclipse'
apply plugin: 'net.minecraftforge.gradle.forgedev.patcher'
sourceSets {
main {
java {
srcDir "$rootDir/src/main/java"
}
resources {
srcDir "$rootDir/src/main/resources"
}
}
}
repositories {
mavenCentral()
}
patcher {
parent = project(':clean')
patches = file("$rootDir/patches/minecraft")
patchedSrc = file('src/main/java')
accessTransformer = file("$rootDir/src/main/resources/forge_at.cfg")
srgPatches = false
}
applyPatches {
canonicalizeAccess true
canonicalizeWhitespace true
maxFuzz 3
}
dependencies {
implementation project(':clean')
implementation 'cpw.mods:modlauncher:0.1+'
implementation 'net.minecraftforge:accesstransformers:0.10+:shadowed'
implementation 'net.minecraftforge:eventbus:0.1+:service'
implementation 'net.minecraftforge:forgespi:0.1+'
implementation 'net.minecraftforge:coremods:0.1+'
implementation 'com.electronwill.night-config:core:3.4.0'
implementation 'com.electronwill.night-config:toml:3.4.0'
implementation 'org.jline:jline:3.5.1'
implementation 'org.apache.maven:maven-artifact:3.5.3'
implementation 'java3d:vecmath:1.5.2'
}
configurations {
ecj
}
dependencies {
ecj 'org.eclipse.jdt.core.compiler:ecj:4.6.1'
}
compileJava {
options.fork = true
options.failOnError = false
options.forkOptions.with {
executable = 'java'
jvmArgs = ['-classpath', project.configurations.ecj.asPath, 'org.eclipse.jdt.internal.compiler.batch.Main', '-nowarn']
}
}
task runclient(type: JavaExec) {
doFirst {
mkdir 'runclient'
}
doFirst {
copy {
from sourceSets.main.resources
into "$buildDir/classes/java/main"
}
}
classpath sourceSets.main.runtimeClasspath
main 'net.minecraftforge.fml.LaunchTesting'
systemProperties target:'fmldevclient'
workingDir 'runclient'
}
task runserver(type: JavaExec) {
doFirst {
mkdir 'runserver'
}
classpath sourceSets.main.runtimeClasspath
main 'net.minecraftforge.fml.LaunchTesting'
args 'nogui'
systemProperties target:'fmldevserver'
workingDir 'runserver'
}
}
//evaluationDependsOnChildren()
task setup() {
dependsOn ':clean:extractMapped'
dependsOn ':forge:extractMapped' //These must be strings so that we can do lazy resolution. Else we need evaluationDependsOnChildren above
}