Jonah Bauer 79f4ea3fe1 improved libGDX client performance
added automatic texture packing
2021-11-19 17:55:46 +01:00

22 lines
730 B
Plaintext

val texturePackerSource = "src/main/textures"
val texturePackerResources = "$buildDir/generated/sources/texturePacker/resources/main"
val texturePackerGeneratedSources = "$buildDir/generated/sources/texturePacker/java/main"
sourceSets.main.get().java.srcDir(texturePackerGeneratedSources)
sourceSets.main.get().resources.srcDir(texturePackerResources)
tasks {
val packTextures = register<TexturePackerTask>("packTextures") {
input.set(file(texturePackerSource))
resourceOutput.set(file(texturePackerResources))
generatedSourceOutput.set(file(texturePackerGeneratedSources))
}
processResources {
dependsOn(packTextures)
}
compileJava {
dependsOn(packTextures)
}
}