Setting up workspace now sets a permanent username

This username can be defined in a `gradle.properties` file. For the purposes of this project, use your global property file in `USERHOME\.gradle\gradle.properties`. If no username is set there, it will default to `BloodMagicDev`.

This should help with dev so you don't start with a brand new username each time you load up the game (without manually setting it otherwise)
This commit is contained in:
Nick 2016-02-18 20:05:53 -08:00
parent a056835a31
commit 2f9e59ac56

View file

@ -23,6 +23,11 @@ def build_number = 'CUSTOM'
if (System.getenv('BUILD_NUMBER') != null)
build_number = System.getenv('BUILD_NUMBER')
def username = 'BloodMagicDev'
if (project.hasProperty('dev_username'))
username = "${dev_username}"
group = package_group
archivesBaseName = mod_name
version = "${mc_version}-${mod_version}-${build_number}"
@ -66,7 +71,8 @@ minecraft {
replace "@VERSION@", project.version
replaceIn "Constants.java"
replaceIn "BloodMagicAPI.java"
clientRunArgs += "--username=${username}"
if (project.hasProperty('mappings_version'))
mappings = project.mappings_version