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-2018.09.12.04.11.00@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: 'java-library' 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 { mavenLocal() 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 clientRun { main = 'net.minecraftforge.fml.LaunchTesting' environment = [ target: 'fmldevclient' ] properties = [ target: 'fmldevclient', assetDirectory: downloadAssets.output ] } serverRun { main = 'net.minecraftforge.fml.LaunchTesting' environment = [ target: 'fmldevserver' ] } mcVersion = '1.13' } applyPatches { canonicalizeAccess true canonicalizeWhitespace true maxFuzz 3 } dependencies { api 'net.minecraft:client:1.13:extra' api 'cpw.mods:modlauncher:0.1.0-rc.3' //Pinned until cpw fixes getCommonSupertype api 'net.minecraftforge:accesstransformers:0.10+:shadowed' api 'net.minecraftforge:eventbus:0.1+:service' api 'net.minecraftforge:forgespi:0.1+' api 'net.minecraftforge:coremods:0.1+' api 'com.electronwill.night-config:core:3.4.0' api 'com.electronwill.night-config:toml:3.4.0' api 'org.jline:jline:3.5.1' api 'org.apache.maven:maven-artifact:3.5.3' api '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', '-proceedOnError', '-preserveAllLocals', '-parameters'] } } task runclient(type: JavaExec, dependsOn: [":forge:downloadAssets", ":forge:extractNatives"]) { doFirst { mkdir 'runclient' } doFirst { copy { from sourceSets.main.resources into "$buildDir/classes/java/main" } } // jvmArgs = ['-verbose:class'] classpath sourceSets.main.runtimeClasspath main 'net.minecraftforge.fml.LaunchTesting' systemProperties = [ "org.lwjgl.util.Debug": "true", "org.lwjgl.util.DebugLoader": "true" ] environment += [ target:'fmldevclient', assetDirectory: file("${gradle.getGradleUserHomeDir()}/caches/forge_gradle/assets/"), nativesDirectory: extractNatives.output ] workingDir 'runclient' } task runserver(type: JavaExec) { doFirst { mkdir 'runserver' } classpath sourceSets.main.runtimeClasspath main 'net.minecraftforge.fml.LaunchTesting' args 'nogui' environment 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 }