Fixed tests

This commit is contained in:
Anuken
2026-02-24 12:19:23 -05:00
parent 769e45e65a
commit 8d16c1768e
2 changed files with 19 additions and 13 deletions
+1
View File
@@ -396,6 +396,7 @@ project(":tests"){
testImplementation arcModule("backends:backend-headless") testImplementation arcModule("backends:backend-headless")
testImplementation "org.json:json:20230618" testImplementation "org.json:json:20230618"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
} }
tasks.withType(JavaCompile){ tasks.withType(JavaCompile){
+13 -8
View File
@@ -102,7 +102,7 @@ static void antialias(File file){
new Fi(file).writePng(out) new Fi(file).writePng(out)
} }
task antialiasImages(){ tasks.register('antialiasImages'){
doLast{ doLast{
for(def img : project.getProperty("images").split(",")){ for(def img : project.getProperty("images").split(",")){
println(project.getProperty("startdir") + "/" + img) println(project.getProperty("startdir") + "/" + img)
@@ -111,7 +111,7 @@ task antialiasImages(){
} }
} }
task tileImages(){ tasks.register('tileImages'){
doLast{ doLast{
for(def img : project.getProperty("images").split(",")){ for(def img : project.getProperty("images").split(",")){
println(project.getProperty("startdir") + "/" + img) println(project.getProperty("startdir") + "/" + img)
@@ -120,7 +120,8 @@ task tileImages(){
} }
} }
task pack(dependsOn: [classes, configurations.runtimeClasspath]){ tasks.register('pack'){
dependsOn = [classes, configurations.runtimeClasspath]
doLast{ doLast{
//cleanup old sprites //cleanup old sprites
@@ -189,7 +190,8 @@ task pack(dependsOn: [classes, configurations.runtimeClasspath]){
} }
} }
task genSprites(dependsOn: classes, type: JavaExec){ tasks.register('genSprites', JavaExec){
dependsOn classes
finalizedBy 'antialiasGen' finalizedBy 'antialiasGen'
mainClass = "mindustry.tools.ImagePacker" mainClass = "mindustry.tools.ImagePacker"
@@ -198,7 +200,8 @@ task genSprites(dependsOn: classes, type: JavaExec){
workingDir = genFolder workingDir = genFolder
} }
task fontgen(dependsOn: classes, type: JavaExec){ tasks.register('fontgen', JavaExec){
dependsOn classes
/* icon font pipeline: /* icon font pipeline:
1. take set of pre-defined icons and SVGs 1. take set of pre-defined icons and SVGs
2. use Fontello API to get a font with these 2. use Fontello API to get a font with these
@@ -242,21 +245,23 @@ task fontgen(dependsOn: classes, type: JavaExec){
} }
} }
task icongen(dependsOn: classes, type: JavaExec){ tasks.register('icongen', JavaExec){
dependsOn classes
mainClass = "mindustry.tools.IconConverter" mainClass = "mindustry.tools.IconConverter"
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath
standardInput = System.in standardInput = System.in
workingDir = "../core/assets-raw" workingDir = "../core/assets-raw"
} }
task updateScripts(dependsOn: classes, type: JavaExec){ tasks.register('updateScripts', JavaExec){
dependsOn classes
mainClass = "mindustry.tools.ScriptMainGenerator" mainClass = "mindustry.tools.ScriptMainGenerator"
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath
standardInput = System.in standardInput = System.in
workingDir = "../" workingDir = "../"
} }
task updateBundles{ tasks.register('updateBundles'){
doLast{ doLast{
def uniEscape = { String string -> def uniEscape = { String string ->
StringBuilder outBuffer = new StringBuilder() StringBuilder outBuffer = new StringBuilder()