Reformated build.gradle
This commit is contained in:
parent
19569e490f
commit
6bc18ce2dd
3 changed files with 63 additions and 69 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -16,3 +16,4 @@
|
||||||
/out
|
/out
|
||||||
/.idea
|
/.idea
|
||||||
/*.iml
|
/*.iml
|
||||||
|
/atlassian-ide-plugin.xml
|
||||||
|
|
35
build.gradle
35
build.gradle
|
@ -20,7 +20,7 @@ configFile.withReader {
|
||||||
// read config. it shall from now on be referenced as simply config or as project.config
|
// read config. it shall from now on be referenced as simply config or as project.config
|
||||||
def prop = new Properties()
|
def prop = new Properties()
|
||||||
prop.load(it)
|
prop.load(it)
|
||||||
project.ext.config = new ConfigSlurper().parse prop
|
ext.config = new ConfigSlurper().parse prop
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.pahimar.ee3"
|
group = "com.pahimar.ee3"
|
||||||
|
@ -36,8 +36,7 @@ minecraft {
|
||||||
replace "@FINGERPRINT@", project.ee3_signature
|
replace "@FINGERPRINT@", project.ee3_signature
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources
|
processResources {
|
||||||
{
|
|
||||||
// replace stuff in the files we want.
|
// replace stuff in the files we want.
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
include 'mcmod.info'
|
include 'mcmod.info'
|
||||||
|
@ -52,28 +51,27 @@ processResources
|
||||||
exclude 'mcmod.info'
|
exclude 'mcmod.info'
|
||||||
exclude 'version.properties'
|
exclude 'version.properties'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BEYOND THIS POINT..
|
// BEYOND THIS POINT..
|
||||||
// IS STUFF THATS FOR RELEASING...
|
// IS STUFF THATS FOR RELEASING...
|
||||||
|
|
||||||
// verify the properties exist.. or initialize.
|
// verify the properties exist.. or initialize.
|
||||||
if (!project.hasProperty("keystore_location")) // keystore stuff
|
if (!project.hasProperty("keystore_location")) // keystore stuff
|
||||||
ext.keystore_location = ".";
|
ext.keystore_location = "."
|
||||||
|
|
||||||
if (!project.hasProperty("ee3_keystore_alias")) // keystore stuff
|
if (!project.hasProperty("ee3_keystore_alias")) // keystore stuff
|
||||||
ext.ee3_keystore_alias = "";
|
ext.ee3_keystore_alias = ""
|
||||||
|
|
||||||
if (!project.hasProperty("keystore_password")) // keystore stuff
|
if (!project.hasProperty("keystore_password")) // keystore stuff
|
||||||
ext.keystore_password = "";
|
ext.keystore_password = ""
|
||||||
|
|
||||||
if (!project.hasProperty("ee3_release_loc")) // release loc
|
if (!project.hasProperty("ee3_release_loc")) // release loc
|
||||||
ext.ee3_release_loc = ".";
|
ext.ee3_release_loc = "."
|
||||||
else
|
else
|
||||||
ee3_release_loc = ee3_release_loc.replace('{MC}', minecraft.version).replace('{MODVER}', config.mod_version).replace('{BUILD}', config.build_number)
|
ee3_release_loc = ee3_release_loc.replace('{MC}', minecraft.version).replace('{MODVER}', config.mod_version).replace('{BUILD}', config.build_number)
|
||||||
|
|
||||||
task("signJar", dependsOn: "reobf")
|
task signJar(dependsOn: "reobf") {
|
||||||
{
|
|
||||||
inputs.file jar.getArchivePath()
|
inputs.file jar.getArchivePath()
|
||||||
inputs.file keystore_location
|
inputs.file keystore_location
|
||||||
inputs.property "ee3_keystore_alias", ee3_keystore_alias
|
inputs.property "ee3_keystore_alias", ee3_keystore_alias
|
||||||
|
@ -95,12 +93,9 @@ task("signJar", dependsOn: "reobf")
|
||||||
storepass: keystore_password
|
storepass: keystore_password
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task("incrementBuildNumber")
|
task incrementBuildNumber() {
|
||||||
{
|
|
||||||
// increment build number
|
|
||||||
doFirst {
|
|
||||||
// increment
|
// increment
|
||||||
config.build_number = (config.build_number.toString().toInteger()) + 1
|
config.build_number = (config.build_number.toString().toInteger()) + 1
|
||||||
|
|
||||||
|
@ -108,11 +103,9 @@ task("incrementBuildNumber")
|
||||||
configFile.withWriter {
|
configFile.withWriter {
|
||||||
config.toProperties().store(it, "")
|
config.toProperties().store(it, "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
task("release", type: Copy)
|
task release(type: Copy) {
|
||||||
{
|
|
||||||
dependsOn "incrementBuildNumber"
|
dependsOn "incrementBuildNumber"
|
||||||
dependsOn "signJar"
|
dependsOn "signJar"
|
||||||
|
|
||||||
|
@ -120,8 +113,8 @@ task("release", type: Copy)
|
||||||
logger.info "copying ${file}"
|
logger.info "copying ${file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
// only if the release location isnt empty.
|
// only if the release location isn't empty.
|
||||||
onlyIf {
|
onlyIf {
|
||||||
return project.ee3_release_loc != "."
|
return project.ee3_release_loc != "."
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
#
|
#
|
||||||
#Sat Dec 14 19:57:18 EST 2013
|
#Tue Dec 17 19:56:56 EST 2013
|
||||||
minecraft_version=1.6.4
|
minecraft_version=1.6.4
|
||||||
forge_version=9.11.1.964
|
forge_version=9.11.1.964
|
||||||
mod_version=0.0
|
mod_version=0.0
|
||||||
build_number=28
|
build_number=30
|
||||||
|
|
Loading…
Reference in a new issue