Skip to content

Commit

Permalink
Reformatted :desktop and :mpqviewer build scripts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
collinsmith committed Nov 24, 2020
1 parent ff12375 commit f32356c
Show file tree
Hide file tree
Showing 44 changed files with 25 additions and 24 deletions.
5 changes: 5 additions & 0 deletions desktop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@ run {

jar {
archiveBaseName = appName
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// These can be excluded because they add to the jar size but libGDX 1.9.11 can't use them.
// If your libGDX version is 1.9.10 or earlier, or is 1.9.12-SNAPSHOT or later, you can leave
// the following line commented; if you use 1.9.11 exactly, or if you use 1.9.12-SNAPSHOT but
// don't need ARM Linux support, you can uncomment it safely.
// It's always safe to keep that line commented out; it only affects JAR size.
// exclude('linux/arm32/**', 'linux/arm64/**')
exclude('data/global/excel/*.bin') // generated bins
exclude('data/*.ods') // source files for excel tables
exclude('lang/*.txt') // source files for i18n tables
exclude('test/**') // test resources
dependsOn configurations.runtimeClasspath
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
Expand Down
44 changes: 20 additions & 24 deletions mpqviewer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import org.gradle.internal.os.OperatingSystem

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

sourceSets.main.resources.srcDirs += [ file('assets').path ]

project.ext {
visuiVersion = '1.4.2'
}
project.ext.visuiVersion = '1.4.2'

dependencies {
implementation project(':core')
Expand All @@ -25,30 +21,30 @@ application {
}

run {
workingDir = rootProject.file('assets').path
setIgnoreExitValue(true)

// Required to run LWJGL3 java apps on MacOS
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
jvmArgs += "-XstartOnFirstThread"
}
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
jvmArgs += "-XstartOnFirstThread"
}
}

jar {
archiveBaseName = project.name
// These can be excluded because they add to the jar size but libGDX 1.9.11 can't use them.
// If your libGDX version is 1.9.10 or earlier, or is 1.9.12-SNAPSHOT or later, you can leave
// the following line commented; if you use 1.9.11 exactly, or if you use 1.9.12-SNAPSHOT but
// don't need ARM Linux support, you can uncomment it safely.
// It's always safe to keep that line commented out; it only affects JAR size.
// exclude('linux/arm32/**', 'linux/arm64/**')
dependsOn configurations.runtimeClasspath
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': application.mainClass
}

doLast {
file(archiveFile).setExecutable(true, false)
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// These can be excluded because they add to the jar size but libGDX 1.9.11 can't use them.
// If your libGDX version is 1.9.10 or earlier, or is 1.9.12-SNAPSHOT or later, you can leave
// the following line commented; if you use 1.9.11 exactly, or if you use 1.9.12-SNAPSHOT but
// don't need ARM Linux support, you can uncomment it safely.
// It's always safe to keep that line commented out; it only affects JAR size.
// exclude('linux/arm32/**', 'linux/arm64/**')
dependsOn configurations.runtimeClasspath
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': application.mainClass
}

doLast {
file(archiveFile).setExecutable(true, false)
}
}
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f32356c

Please sign in to comment.