Removed atlas outputs
6
.gitignore
vendored
@ -47,6 +47,12 @@ config/
|
|||||||
/core/assets/basepartnames
|
/core/assets/basepartnames
|
||||||
version.properties
|
version.properties
|
||||||
|
|
||||||
|
#sprites
|
||||||
|
|
||||||
|
#core/assets/sprites/sprites*
|
||||||
|
#core/assets/sprites/fallback/
|
||||||
|
#core/assets/sprites/block_colors.png
|
||||||
|
|
||||||
.attach_*
|
.attach_*
|
||||||
## Java
|
## Java
|
||||||
|
|
||||||
|
@ -152,3 +152,10 @@ task run(type: Exec){
|
|||||||
def adb = path + "/platform-tools/adb"
|
def adb = path + "/platform-tools/adb"
|
||||||
commandLine "$adb", 'shell', 'am', 'start', '-n', 'io.anuke.mindustry/mindustry.android.AndroidLauncher'
|
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"
|
return "v$buildVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hasSprites = {
|
||||||
|
return new File(rootDir, "core/assets/sprites/sprites.atlas").exists()
|
||||||
|
}
|
||||||
|
|
||||||
getModifierString = {
|
getModifierString = {
|
||||||
if(versionModifier != "release"){
|
if(versionModifier != "release"){
|
||||||
return "[${versionModifier.toUpperCase()}]"
|
return "[${versionModifier.toUpperCase()}]"
|
||||||
|
Before Width: | Height: | Size: 831 B |
Before Width: | Height: | Size: 563 KiB |
Before Width: | Height: | Size: 660 KiB |
Before Width: | Height: | Size: 901 KiB |
Before Width: | Height: | Size: 667 KiB |
Before Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 372 KiB |
Before Width: | Height: | Size: 440 KiB |
Before Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 3.0 MiB |
Before Width: | Height: | Size: 187 KiB |
Before Width: | Height: | Size: 354 KiB |
Before Width: | Height: | Size: 438 KiB |
Before Width: | Height: | Size: 1.4 MiB |
@ -1,7 +1,5 @@
|
|||||||
import com.badlogicgames.packr.*
|
import com.badlogicgames.packr.Packr
|
||||||
|
import com.badlogicgames.packr.PackrConfig
|
||||||
import java.nio.*
|
|
||||||
import java.security.*
|
|
||||||
|
|
||||||
sourceSets.main.java.srcDirs = [ "src/" ]
|
sourceSets.main.java.srcDirs = [ "src/" ]
|
||||||
|
|
||||||
@ -11,27 +9,6 @@ project.ext.assetsDir = new File("../core/assets")
|
|||||||
def enableTemplates = true
|
def enableTemplates = true
|
||||||
def JDK_DIR = "$System.env.JDK_DIR"
|
def JDK_DIR = "$System.env.JDK_DIR"
|
||||||
def ICON_DIR = new File("$rootDir/core/assets/icons/icon.icns")
|
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){
|
task run(dependsOn: classes, type: JavaExec){
|
||||||
main = project.mainClassName
|
main = project.mainClassName
|
||||||
@ -46,13 +23,6 @@ task run(dependsOn: classes, type: JavaExec){
|
|||||||
|
|
||||||
jvmArgs += "-XX:+ShowCodeDetailsInExceptionMessages"
|
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")){
|
if(project.hasProperty("args")){
|
||||||
args Eval.me(project.getProperties()["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){
|
task steamtest(dependsOn: dist){
|
||||||
doLast{
|
doLast{
|
||||||
copy{
|
copy{
|
||||||
|
@ -22,6 +22,8 @@ task deploy{
|
|||||||
dependsOn createIPA
|
dependsOn createIPA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//must pack before deployment, as iOS does never has the latest sprites.
|
||||||
|
copyAssets.dependsOn ":tools:pack"
|
||||||
launchIPhoneSimulator.dependsOn build
|
launchIPhoneSimulator.dependsOn build
|
||||||
launchIPadSimulator.dependsOn build
|
launchIPadSimulator.dependsOn build
|
||||||
launchIOSDevice.dependsOn build
|
launchIOSDevice.dependsOn build
|
||||||
|