Removed direct usage of texture packer, buildscript cleanup

This commit is contained in:
Anuken 2018-01-26 15:09:13 -05:00
parent 3b4ebff349
commit 6c30fe9fcf
4 changed files with 11 additions and 7 deletions

View File

@ -9,6 +9,7 @@ buildscript {
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "com.badlogicgames.gdx:gdx-tools:1.9.8"
}
}

View File

@ -3,14 +3,18 @@ sourceCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = ["src/"]
def TEXPACK_DIR = "$System.env.TEXPACK_DIR"
import com.badlogic.gdx.tools.texturepacker.TexturePacker
task packSprites(type: Exec){
commandLine "java", "-cp", TEXPACK_DIR, "com.badlogic.gdx.tools.texturepacker.TexturePacker", "assets-raw/sprites/", "assets/sprites/", "sprites.atlas"
task packSprites(){
doLast {
TexturePacker.process("core/assets-raw/sprites/", "core/assets/sprites/", "sprites.atlas")
}
}
task packUI(type: Exec){
commandLine "java", "-cp", TEXPACK_DIR, "com.badlogic.gdx.tools.texturepacker.TexturePacker", "assets-raw/ui/", "assets/ui/", "uiskin.atlas"
task packUI(){
doLast {
TexturePacker.process("core/assets-raw/ui/", "core/assets/ui/", "uiskin.atlas")
}
}
task pack(){

View File

@ -6,7 +6,7 @@ sourceSets.main.java.srcDirs = [ "src/" ]
project.ext.mainClassName = "io.anuke.mindustry.desktop.DesktopLauncher"
project.ext.assetsDir = new File("../core/assets");
def PACKR_DIR = System.getenv('HOME') + "/Documents/Packr/"
def PACKR_DIR = "$System.env.PACKR_DIR"
def ICON_DIR = new File("core/assets/sprites/icon.icns")
task run(dependsOn: classes, type: JavaExec) {

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "https://raw.githubusercontent.com/gwtproject/gwt/master/distro-source/core/src/gwt-module.dtd">
<module rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.ai' />