diff --git a/build.gradle b/build.gradle index ec7edb5..0114fcb 100644 --- a/build.gradle +++ b/build.gradle @@ -7,16 +7,16 @@ buildscript { } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' + classpath "net.minecraftforge.gradle:ForgeGradle:${forgegradle_version}" } } + apply plugin: 'net.minecraftforge.gradle.forge' - -version = "0.1-1.9.4" -group= "mmm" -archivesBaseName = "mmm" +version = "${mod_version}-${mc_version}" +group= "${mod_name}" +archivesBaseName = "${mod_name}" sourceSets { main { @@ -34,35 +34,28 @@ targetCompat = JavaVersion.VERSION_1_8 minecraft { - version = "1.9.4-12.17.0.1962" + version = "${mc_version}-${forge_version}" runDir = "run" - - // the mappings can be changed at any time, and must be in the following format. - // snapshot_YYYYMMDD snapshot are built nightly. - // stable_# stables are built at the discretion of the MCP team. - // Use non-default mappings at your own risk. they may not allways work. - // simply re-run your setup task after changing the mappings to update your workspace. - mappings = "snapshot_20160518" + mappings = "${mappings_version}" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } 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' } } + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..284a1e4 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,8 @@ +forgegradle_version= 2.2-SNAPSHOT + +mod_name= mmm +mod_version= 0.1 + +mc_version= 1.9.4 +forge_version= 12.17.0.1963 +mappings_version= snapshot_20160518 \ No newline at end of file