Removed atlas outputs
6
.gitignore
vendored
@ -47,6 +47,12 @@ config/
|
||||
/core/assets/basepartnames
|
||||
version.properties
|
||||
|
||||
#sprites
|
||||
|
||||
#core/assets/sprites/sprites*
|
||||
#core/assets/sprites/fallback/
|
||||
#core/assets/sprites/block_colors.png
|
||||
|
||||
.attach_*
|
||||
## Java
|
||||
|
||||
|
@ -152,3 +152,10 @@ task run(type: Exec){
|
||||
def adb = path + "/platform-tools/adb"
|
||||
commandLine "$adb", 'shell', 'am', 'start', '-n', 'io.anuke.mindustry/mindustry.android.AndroidLauncher'
|
||||
}
|
||||
|
||||
if(!project.ext.hasSprites()){
|
||||
println "Re-packing sprites."
|
||||
run.dependsOn ":tools:pack"
|
||||
assembleRelease.dependsOn ":tools:pack"
|
||||
assembleDebug.dependsOn ":tools:pack"
|
||||
}
|
@ -83,6 +83,10 @@ allprojects{
|
||||
return "v$buildVersion"
|
||||
}
|
||||
|
||||
hasSprites = {
|
||||
return new File(rootDir, "core/assets/sprites/sprites.atlas").exists()
|
||||
}
|
||||
|
||||
getModifierString = {
|
||||
if(versionModifier != "release"){
|
||||
return "[${versionModifier.toUpperCase()}]"
|
||||
|
Before (image error) Size: 831 B |
Before (image error) Size: 563 KiB |
Before (image error) Size: 660 KiB |
Before (image error) Size: 901 KiB |
Before (image error) Size: 667 KiB |
Before (image error) Size: 186 KiB |
Before (image error) Size: 372 KiB |
Before (image error) Size: 440 KiB |
Before (image error) Size: 1.4 MiB |
Before (image error) Size: 3.0 MiB |
Before (image error) Size: 187 KiB |
Before (image error) Size: 354 KiB |
Before (image error) Size: 438 KiB |
Before (image error) Size: 1.4 MiB |
@ -1,7 +1,5 @@
|
||||
import com.badlogicgames.packr.*
|
||||
|
||||
import java.nio.*
|
||||
import java.security.*
|
||||
import com.badlogicgames.packr.Packr
|
||||
import com.badlogicgames.packr.PackrConfig
|
||||
|
||||
sourceSets.main.java.srcDirs = [ "src/" ]
|
||||
|
||||
@ -11,27 +9,6 @@ project.ext.assetsDir = new File("../core/assets")
|
||||
def enableTemplates = true
|
||||
def JDK_DIR = "$System.env.JDK_DIR"
|
||||
def ICON_DIR = new File("$rootDir/core/assets/icons/icon.icns")
|
||||
def spriteHashFile = new File(project.rootDir, "build/spritehash")
|
||||
|
||||
def hashDirectory = {
|
||||
def root = new File(project.rootDir, "core/assets-raw/sprites/")
|
||||
MessageDigest digest = MessageDigest.getInstance("MD5")
|
||||
ByteBuffer buffer = ByteBuffer.allocate(16)
|
||||
def files = []
|
||||
root.eachFileRecurse{ file ->
|
||||
if(!file.name.startsWith(".")) files += file
|
||||
}
|
||||
|
||||
files.sort()
|
||||
|
||||
for(File file : files){
|
||||
buffer.position(0)
|
||||
buffer.putLong(file.lastModified())
|
||||
digest.update(buffer.array())
|
||||
}
|
||||
|
||||
return digest.digest().encodeHex()
|
||||
}
|
||||
|
||||
task run(dependsOn: classes, type: JavaExec){
|
||||
main = project.mainClassName
|
||||
@ -46,13 +23,6 @@ task run(dependsOn: classes, type: JavaExec){
|
||||
|
||||
jvmArgs += "-XX:+ShowCodeDetailsInExceptionMessages"
|
||||
|
||||
/*spriteHashFile.parentFile.mkdirs()
|
||||
String spriteHash = hashDirectory()
|
||||
if(spriteHashFile.exists() && spriteHashFile.text != spriteHash){
|
||||
dependsOn ":tools:pack"
|
||||
}
|
||||
spriteHashFile.text = spriteHash*/
|
||||
|
||||
if(project.hasProperty("args")){
|
||||
args Eval.me(project.getProperties()["args"])
|
||||
}
|
||||
@ -80,6 +50,12 @@ task dist(type: Jar, dependsOn: configurations.runtimeClasspath){
|
||||
}
|
||||
}
|
||||
|
||||
if(!project.ext.hasSprites()){
|
||||
println "Re-packing sprites."
|
||||
run.dependsOn ":tools:pack"
|
||||
dist.dependsOn ":tools:pack"
|
||||
}
|
||||
|
||||
task steamtest(dependsOn: dist){
|
||||
doLast{
|
||||
copy{
|
||||
|
@ -22,6 +22,8 @@ task deploy{
|
||||
dependsOn createIPA
|
||||
}
|
||||
|
||||
//must pack before deployment, as iOS does never has the latest sprites.
|
||||
copyAssets.dependsOn ":tools:pack"
|
||||
launchIPhoneSimulator.dependsOn build
|
||||
launchIPadSimulator.dependsOn build
|
||||
launchIOSDevice.dependsOn build
|
||||
|