Update userdev and runconfigs for ForgeGradle changes.

This commit is contained in:
LexManos 2019-01-08 00:29:36 -08:00
parent 169d4ce67b
commit b063c1c80a

View file

@ -1,17 +1,9 @@
buildscript { buildscript {
repositories { repositories {
mavenLocal()
maven { url = 'https://files.minecraftforge.net/maven' } maven { url = 'https://files.minecraftforge.net/maven' }
jcenter() jcenter()
mavenCentral() 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 { dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true 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 group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'modid' archivesBaseName = 'modid'
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft { minecraft {
// the mappings can be changed at any time, and must be in the following format. // the mappings can be changed at any time, and must be in the following format.
@ -42,22 +31,14 @@ minecraft {
// default run configurations. // default run configurations.
// these can be tweaked, removed, or duplicated as needed. // these can be tweaked, removed, or duplicated as needed.
runConfig { runs {
name= "Minecraft Client" client = {
main= "net.minecraftforge.userdev.UserdevLauncher" workingDirectory project.file('run').canonicalPath
ideaModuleName = "${project.name}_main" source sourceSets.main
workingDirectory = project.file("run").canonicalPath }
environment "target", "fmldevclient" server = {
environment "assetDirectory", downloadAssets.output.absolutePath workingDirectory project.file('run').canonicalPath
} }
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
} }
} }
@ -65,7 +46,7 @@ dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // 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. // 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. // 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 // you may put jars on which you depend on in ./libs
// or you may define them like so.. // 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. // 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' //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, // These dependencies get remapped to your current MCP mappings
// except that these dependencies get remapped to your current MCP mappings //deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// for more info... // for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html