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) { ...@@ -251,22 +251,11 @@ task prepareGraphicAssets(dependsOn: prepareAssets) {
} }
} }
} }
}
}
def hasAtlasDir(File file) { //optimizing for uploading
for(File f : file.listFiles()) {
if(f.isDirectory()) return true;
}
return false;
}
task zipAssets(dependsOn: [prepareSoundAssets, prepareGraphicAssets, prepareJsonAssets]) {
doLast {
if (project.hasProperty('TABLEXIA_ASSETS_OPTIMIZE') && Boolean.valueOf(TABLEXIA_ASSETS_OPTIMIZE).booleanValue()) { if (project.hasProperty('TABLEXIA_ASSETS_OPTIMIZE') && Boolean.valueOf(TABLEXIA_ASSETS_OPTIMIZE).booleanValue()) {
println "Atlases Optimizing: ENABLED." println "ASSETS OPTIMIZATION: ENABLED."
def assetsDir = new File("${buildDir}/${assetsDirName}/") println "ASSETS OPTIMIZATION: START."
println "Atlases Optimizing: START."
new File("${assetsDir.absolutePath}/${assetsDestinationDirName}/").eachDir() { dir -> new File("${assetsDir.absolutePath}/${assetsDestinationDirName}/").eachDir() { dir ->
dir.eachFileRecurse() { file -> dir.eachFileRecurse() { file ->
if (file.name.endsWith(".png") && !file.absolutePath.contains("excluded")) { if (file.name.endsWith(".png") && !file.absolutePath.contains("excluded")) {
...@@ -275,12 +264,23 @@ task zipAssets(dependsOn: [prepareSoundAssets, prepareGraphicAssets, prepareJson ...@@ -275,12 +264,23 @@ task zipAssets(dependsOn: [prepareSoundAssets, prepareGraphicAssets, prepareJson
} }
} }
} }
println "Atlases Optimizing: FINISH." println "ASSETS OPTIMIZATION: FINISH."
} }
} else { } 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 -> new File(project(":core").projectDir.absolutePath + "/${assetsDirName}").eachDir() { dir ->
if (!dir.name.equals('common')) { 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