Commit 96ab3538 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

#896 added atlases optimization for HD assets.

parent a16967af
......@@ -209,6 +209,7 @@ task prepareHdAssets(dependsOn: prepareAssets) {
inputs.dir(hdSourceDir.absolutePath)
inputs.dir(sourceDir.absolutePath)
outputs.dir("${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsSourceDirName}/")
doLast {
......@@ -319,8 +320,8 @@ task prepareGraphicAssets(dependsOn: prepareAssets) {
}
}
}
println "ASSETS OPTIMIZATION: FINISH."
}
println "ASSETS OPTIMIZATION: FINISH."
} else {
println "ASSETS OPTIMIZATION NOT CONFIGURED -> SKIPPING OPTIMIZATION"
}
......@@ -405,6 +406,22 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) {
}.execute()
}
}
} //optimizing for uploading
if (project.hasProperty('TABLEXIA_ASSETS_OPTIMIZE') && Boolean.valueOf(TABLEXIA_ASSETS_OPTIMIZE).booleanValue()) {
println "HD ASSETS OPTIMIZATION: ENABLED."
println "HD ASSETS OPTIMIZATION: START."
new File("${assetsDir.absolutePath}/${assetsDestinationDirName}/").eachDir() { dir ->
dir.eachFileRecurse() { file ->
if (file.name.endsWith(".png") && !file.absolutePath.contains("excluded")) {
exec {
commandLine 'pngquant', '--ext', '.png', '-f', 256, file.absolutePath
}
}
}
}
println "HD ASSETS OPTIMIZATION: FINISH."
} else {
println "ASSETS OPTIMIZATION NOT CONFIGURED -> SKIPPING OPTIMIZATION"
}
} else {
println "HD PACK IS NOT REQUESTED"
......@@ -660,8 +677,8 @@ project(":core") {
compile "com.getsentry.raven:raven:$ravenVersion"
testCompile "junit:junit:4.11"
testCompile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
testCompile "com.badlogicgames.gdx:gdx:$gdxVersion"
testCompile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
testCompile "com.badlogicgames.gdx:gdx:$gdxVersion"
testCompile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
}
}
......
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