Skip to content

Commit

Permalink
Add capability to set running MC version differently to built version
Browse files Browse the repository at this point in the history
  • Loading branch information
LunNova committed Jun 27, 2016
1 parent 28658d9 commit 33f58bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ configurations {
}

ext.mcVersion = "1.10"
ext.runMcVersion = mcVersion
ext.forgeVersion = "12.18.0.1996-1.10.0"
ext.forgeMappings = "snapshot_20160518"
group = "nallar.tickprofiler" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "TickProfiler"

def calculateVersion() {
def ver = project.mcVersion
def ver = project.runMcVersion
if (System.env.BUILD_NUMBER != null)
return ver + ".jenkins." + System.env.BUILD_NUMBER
if (project.hasProperty("release"))
Expand Down Expand Up @@ -68,7 +69,7 @@ minecraft {
mappings = project.forgeMappings

replace "@MOD_VERSION@", project.version
replace "@MC_VERSION@", version
replace "@MC_VERSION@", runMcVersion
}

processResources {
Expand All @@ -77,7 +78,7 @@ processResources {
inputs.property "mcversion", project.minecraft.version

filesMatching("mcmod.info") {
expand 'version': project.version, 'mcversion': project.minecraft.version
expand 'version': project.version, 'mcversion': runMcVersion
}
filesMatching("modpatcher.version") {
expand 'version': project.version
Expand Down

0 comments on commit 33f58bc

Please sign in to comment.