diff --git a/build.gradle b/build.gradle index a6e9b95..ee4428e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,9 @@ buildscript { repositories { - mavenLocal() maven { url = 'https://files.minecraftforge.net/maven' } jcenter() mavenCentral() } - // This is only here while i'm activly developing FG, Remind me to remove when we publically release - configurations { - classpath.resolutionStrategy { - cacheDynamicVersionsFor 10, 'seconds' - cacheChangingModulesFor 0, 'seconds' - } - } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } @@ -24,10 +16,7 @@ version = '1.0' group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'modid' -sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. -compileJava { - sourceCompatibility = targetCompatibility = '1.8' -} +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. minecraft { // the mappings can be changed at any time, and must be in the following format. @@ -42,22 +31,14 @@ minecraft { // default run configurations. // these can be tweaked, removed, or duplicated as needed. - runConfig { - name= "Minecraft Client" - main= "net.minecraftforge.userdev.UserdevLauncher" - ideaModuleName = "${project.name}_main" - workingDirectory = project.file("run").canonicalPath - environment "target", "fmldevclient" - environment "assetDirectory", downloadAssets.output.absolutePath - } - - runConfig { - name= "Minecraft Server" - main= "net.minecraftforge.userdev.UserdevLauncher" - ideaModuleName = "${project.name}_main" - workingDirectory = project.file("run").canonicalPath - environment "target", "fmldevserver" - environment "assetDirectory", downloadAssets.output.absolutePath + runs { + client = { + workingDirectory project.file('run').canonicalPath + source sourceSets.main + } + server = { + workingDirectory project.file('run').canonicalPath + } } } @@ -65,7 +46,7 @@ dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. - minecraft '@FORGE_GROUP@:userdev:@FORGE_VERSION@' + minecraft '@FORGE_GROUP@:@FORGE_NAME@:@FORGE_VERSION@' // you may put jars on which you depend on in ./libs // or you may define them like so.. @@ -79,10 +60,8 @@ dependencies { // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' - // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, - // except that these dependencies get remapped to your current MCP mappings - //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' - //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' + // These dependencies get remapped to your current MCP mappings + //deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html