Commit d4bd0211 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

#896 fixed optimization being invoked after checksumm is computed.

parent 431e2fb1
......@@ -251,22 +251,11 @@ task prepareGraphicAssets(dependsOn: prepareAssets) {
}
}
}
}
}
def hasAtlasDir(File file) {
for(File f : file.listFiles()) {
if(f.isDirectory()) return true;
}
return false;
}
task zipAssets(dependsOn: [prepareSoundAssets, prepareGraphicAssets, prepareJsonAssets]) {
doLast {
//optimizing for uploading
if (project.hasProperty('TABLEXIA_ASSETS_OPTIMIZE') && Boolean.valueOf(TABLEXIA_ASSETS_OPTIMIZE).booleanValue()) {
println "Atlases Optimizing: ENABLED."
def assetsDir = new File("${buildDir}/${assetsDirName}/")
println "Atlases Optimizing: START."
println "ASSETS OPTIMIZATION: ENABLED."
println "ASSETS OPTIMIZATION: START."
new File("${assetsDir.absolutePath}/${assetsDestinationDirName}/").eachDir() { dir ->
dir.eachFileRecurse() { file ->
if (file.name.endsWith(".png") && !file.absolutePath.contains("excluded")) {
......@@ -275,12 +264,23 @@ task zipAssets(dependsOn: [prepareSoundAssets, prepareGraphicAssets, prepareJson
}
}
}
println "Atlases Optimizing: FINISH."
println "ASSETS OPTIMIZATION: FINISH."
}
} else {
println "Atlases Optimizing: DISABLED."
println "ASSETS OPTIMIZATION NOT CONFIGURED -> SKIPPING OPTIMIZATION"
}
}
}
def hasAtlasDir(File file) {
for(File f : file.listFiles()) {
if(f.isDirectory()) return true;
}
return false;
}
task zipAssets(dependsOn: [prepareSoundAssets, prepareGraphicAssets, prepareJsonAssets]) {
doLast {
new File(project(":core").projectDir.absolutePath + "/${assetsDirName}").eachDir() { dir ->
if (!dir.name.equals('common')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment