Skip to content

Commit f32356c

Browse files
committed
Reformatted :desktop and :mpqviewer build scripts
Reformatted :desktop and :mpqviewer build scripts Moved :mpqviewer resources into src/main/resources Enabled EXCLUDE flag for duplicate dependencies for jar task Excluded many local assets from :desktop:jar
1 parent ff12375 commit f32356c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+25
-24
lines changed

desktop/build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,17 @@ run {
3434

3535
jar {
3636
archiveBaseName = appName
37+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
3738
// These can be excluded because they add to the jar size but libGDX 1.9.11 can't use them.
3839
// If your libGDX version is 1.9.10 or earlier, or is 1.9.12-SNAPSHOT or later, you can leave
3940
// the following line commented; if you use 1.9.11 exactly, or if you use 1.9.12-SNAPSHOT but
4041
// don't need ARM Linux support, you can uncomment it safely.
4142
// It's always safe to keep that line commented out; it only affects JAR size.
4243
// exclude('linux/arm32/**', 'linux/arm64/**')
44+
exclude('data/global/excel/*.bin') // generated bins
45+
exclude('data/*.ods') // source files for excel tables
46+
exclude('lang/*.txt') // source files for i18n tables
47+
exclude('test/**') // test resources
4348
dependsOn configurations.runtimeClasspath
4449
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
4550
manifest {

mpqviewer/build.gradle

+20-24
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ import org.gradle.internal.os.OperatingSystem
55

66
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
77

8-
sourceSets.main.resources.srcDirs += [ file('assets').path ]
9-
10-
project.ext {
11-
visuiVersion = '1.4.2'
12-
}
8+
project.ext.visuiVersion = '1.4.2'
139

1410
dependencies {
1511
implementation project(':core')
@@ -25,30 +21,30 @@ application {
2521
}
2622

2723
run {
28-
workingDir = rootProject.file('assets').path
2924
setIgnoreExitValue(true)
3025

3126
// Required to run LWJGL3 java apps on MacOS
32-
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
33-
jvmArgs += "-XstartOnFirstThread"
34-
}
27+
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
28+
jvmArgs += "-XstartOnFirstThread"
29+
}
3530
}
3631

3732
jar {
3833
archiveBaseName = project.name
39-
// These can be excluded because they add to the jar size but libGDX 1.9.11 can't use them.
40-
// If your libGDX version is 1.9.10 or earlier, or is 1.9.12-SNAPSHOT or later, you can leave
41-
// the following line commented; if you use 1.9.11 exactly, or if you use 1.9.12-SNAPSHOT but
42-
// don't need ARM Linux support, you can uncomment it safely.
43-
// It's always safe to keep that line commented out; it only affects JAR size.
44-
// exclude('linux/arm32/**', 'linux/arm64/**')
45-
dependsOn configurations.runtimeClasspath
46-
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
47-
manifest {
48-
attributes 'Main-Class': application.mainClass
49-
}
50-
51-
doLast {
52-
file(archiveFile).setExecutable(true, false)
53-
}
34+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
35+
// These can be excluded because they add to the jar size but libGDX 1.9.11 can't use them.
36+
// If your libGDX version is 1.9.10 or earlier, or is 1.9.12-SNAPSHOT or later, you can leave
37+
// the following line commented; if you use 1.9.11 exactly, or if you use 1.9.12-SNAPSHOT but
38+
// don't need ARM Linux support, you can uncomment it safely.
39+
// It's always safe to keep that line commented out; it only affects JAR size.
40+
// exclude('linux/arm32/**', 'linux/arm64/**')
41+
dependsOn configurations.runtimeClasspath
42+
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
43+
manifest {
44+
attributes 'Main-Class': application.mainClass
45+
}
46+
47+
doLast {
48+
file(archiveFile).setExecutable(true, false)
49+
}
5450
}
File renamed without changes.

0 commit comments

Comments
 (0)