Added gradle task of Atlas texture packing for Android build (#8208)

* Added gradle task of Atlas texture packing for Android build

* ImagePackers check also for creation date

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
This commit is contained in:
vegeta1k95
2022-12-23 13:49:08 +01:00
committed by GitHub
parent dd5a242743
commit 0aa7c0e79b
4 changed files with 155 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import com.unciv.build.BuildConfig
import java.util.*
import com.unciv.build.AndroidImagePacker
plugins {
id("com.android.application")
@ -75,6 +76,12 @@ android {
buildToolsVersion = "32.0.0"
}
task("texturePacker") {
doFirst {
logger.info("Calling TexturePacker")
AndroidImagePacker.packImages(projectDir.path,false)
}
}
// called every time gradle gets executed, takes the native dependencies of
// the natives configuration, and extracts them to the proper libs/ folders
@ -96,6 +103,7 @@ task("copyAndroidNatives") {
}
}
}
dependsOn("texturePacker")
}
tasks.whenTaskAdded {