Skip to content
Permalink
Browse files

Fix for minor version bug with Bukkit build

Signed-off-by: Dries007 <admin@dries007.net>
  • Loading branch information...
dries007 committed Jan 28, 2018
1 parent 0286702 commit 05480913cd520c8eac035a22a1e74e97e767b543
Showing with 38 additions and 40 deletions.
  1. +2 −1 Bukkit/build.gradle
  2. +3 −2 README.md
  3. +33 −37 build.gradle
@@ -23,7 +23,7 @@ import org.apache.tools.ant.filters.ReplaceTokens

processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
filter ReplaceTokens, tokens: [version: rootProject.version]
}
}

@@ -34,6 +34,7 @@ curseforge {
releaseType = 'beta'
changelog = rootProject.getChangeLog() + '\n[Automatic build]'
addGameVersion '1.8'
addGameVersion '1.8.1'
addGameVersion '1.9'
addGameVersion '1.10'
addGameVersion '1.10'
@@ -33,8 +33,9 @@ Copyright &copy; 2017 - 2018 Dries007. **All rights reserved.**
2. Official builds can be distributed on any freely accessible platform.
1. List of official build sources:
1. [The MCLink website](https://mclink.dries007.net/)
2. CurseForge [1](https://www.curseforge.com/minecraft/mc-mods/mclink) or [2](https://minecraft.curseforge.com/projects/mclink)
3. [The build server](https://jenkins.dries007.net/job/MCLink/)
2. CurseForge: [1](https://www.curseforge.com/minecraft/mc-mods/mclink) or [2](https://minecraft.curseforge.com/projects/mclink)
3. Bukkit: [1](https://www.curseforge.com/minecraft/bukkit-plugins/mclink) or [2](https://dev.bukkit.org/projects/mclink)
4. [The build server](https://jenkins.dries007.net/job/MCLink/)
2. You are allowed to _privately_ use a modified version while developing a Pull Request.
3. A freely accessible platform is defined as a platform requiring no payment for access.
So called "Premium" access (for example payment in exchange for removal of advertisements or faster downloads) is allowed.
@@ -86,44 +86,40 @@ subprojects {
jarTask.appendix = 'Forge-' + project.minecraft.version
}

processResources
{
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
}

from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}

doLast {
//noinspection GroovyAssignabilityCheck
def updateFile = new File(project.archivesBaseName.toLowerCase() + '.json')
def json
if (updateFile.exists()) {
json = new JsonSlurper().parseText(updateFile.getText())
} else {
def builder = new JsonBuilder()
json = builder(
homepage: "https://mclink.dries007.net",
promos: new HashMap<>()
)
}
//noinspection GroovyAssignabilityCheck
json['promos'][project.minecraft.version + '-latest'] = project.version
//noinspection GroovyAssignabilityCheck
json['promos'][project.minecraft.version + '-recommended'] = project.version
if (!json.containsKey(project.minecraft.version)) json.put(project.minecraft.version, new HashMap<>())
//noinspection GroovyAssignabilityCheck
def version = json[project.minecraft.version]
version.put(project.version, getChangeLog())
updateFile.write JsonOutput.prettyPrint(JsonOutput.toJson(json))
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
}

from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}

doLast {
//noinspection GroovyAssignabilityCheck
def updateFile = new File(project.archivesBaseName.toLowerCase() + '.json')
def json
if (updateFile.exists()) {
json = new JsonSlurper().parseText(updateFile.getText())
} else {
def builder = new JsonBuilder()
json = builder(homepage: "https://mclink.dries007.net", promos: new HashMap<>())
}
//noinspection GroovyAssignabilityCheck
json['promos'][project.minecraft.version + '-latest'] = project.version
//noinspection GroovyAssignabilityCheck
json['promos'][project.minecraft.version + '-recommended'] = project.version
if (!json.containsKey(project.minecraft.version)) json.put(project.minecraft.version, new HashMap<>())
//noinspection GroovyAssignabilityCheck
def version = json[project.minecraft.version]
version.put(project.version, getChangeLog())
updateFile.write JsonOutput.prettyPrint(JsonOutput.toJson(json))
}
}

rootProject.setupDecompWorkspace.dependsOn setupDecompWorkspace
rootProject.setupDevWorkspace.dependsOn setupDevWorkspace

0 comments on commit 0548091

Please sign in to comment.
You can’t perform that action at this time.