Преглед изворни кода

[libgdx] Fat jar task to generate testing jar

Mario Zechner пре 1 месец
родитељ
комит
e2212b722f
1 измењених фајлова са 7 додато и 6 уклоњено
  1. 7 6
      spine-libgdx/build.gradle

+ 7 - 6
spine-libgdx/build.gradle

@@ -145,13 +145,14 @@ configure(subprojects - project("spine-libgdx")) {
 }
 
 project("spine-libgdx-tests") {
-	task runHeadlessTest(type: JavaExec) {
-		main = 'com.esotericsoftware.spine.HeadlessTest'
-		classpath = sourceSets.main.runtimeClasspath
-		workingDir = rootProject.projectDir
-		if (project.hasProperty('args')) {
-			args project.getProperty('args').split(' ')
+	task fatJar(type: Jar) {
+		manifest {
+			attributes 'Main-Class': 'com.esotericsoftware.spine.HeadlessTest'
 		}
+		archiveBaseName = 'spine-headless-test'
+		from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
+		with jar
+		duplicatesStrategy = DuplicatesStrategy.INCLUDE
 	}
 }