configurations { texturePacker } dependencies { texturePacker "com.badlogicgames.gdx:gdx-tools:$gdxVersion" } defaultTasks 'build' task packLoading(type: JavaExec) { main = 'com.badlogic.gdx.tools.texturepacker.TexturePacker' classpath = configurations.texturePacker args = ['loading', 'data', 'loading'] } task build() { description "Builds the skin at various DPIs" } build.dependsOn { tasks.findAll { task -> task.name.startsWith('pack') } }