diff --git a/build.gradle b/build.gradle index aeb1d94fb..61fd27d75 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,6 @@ +import groovy.json.JsonSlurper +import groovy.json.JsonOutput + buildscript { repositories { mavenCentral() @@ -115,8 +118,22 @@ task incrementBuildNumber(dependsOn: 'reobfJar') << { file('web/versions.ini').append("\n${version}=${minecraft.version}") file("${config.dir_repo}/version/${minecraft.version}.txt").write("${version}") + + def updateJsonFile = file('version/update.json') + def updateJson = new JsonSlurper().parse(updateJsonFile) as Map + + // Add to version section + updateJson."${minecraft.version}"."${version}" = "See https://github.com/williewillus/Botania/releases/${version}" + + // Update promos + updateJson.promos."${minecraft.version}-latest" = "${version}" + updateJson.promos."${minecraft.version}-recommended" = "${version}" + + + updateJsonFile.write(JsonOutput.prettyPrint(JsonOutput.toJson(updateJson))) } +/* Unused - Forgecraft and web server stuff // I have no idea what I'm doing task wtfGradle2(type: Copy) { from(jar.destinationDir) @@ -154,9 +171,7 @@ task sort(type: Delete) { delete "${config.dir_output}/${deobfJar.archiveName}", "${config.dir_output}/wtf" } -/** - * This is the upload task from the build.xml - */ +// This is the upload task from the build.xml task upload() << { scp('/files') { fileset(file: jar.archivePath) @@ -172,9 +187,7 @@ task upload() << { } } -/** - * This is deply_web task - */ +// This is deploy_web task task deployWeb << { scp('/') { fileset(dir: 'web') //everything from the web directory @@ -202,6 +215,7 @@ def scp(String dir, Closure antFileset = {}) { } } } +*/ def parseConfig(File config) { config.withReader { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9397848f1..ca2b663a0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Sep 14 12:28:28 PDT 2015 +#Sat May 28 11:56:22 CDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-all.zip