riiablo/mpqviewer/build.gradle
Collin Smith f32356ccfb 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
2020-11-23 17:01:15 -08:00

51 lines
1.6 KiB
Groovy

apply plugin: 'java'
apply plugin: 'application'
import org.gradle.internal.os.OperatingSystem
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
project.ext.visuiVersion = '1.4.2'
dependencies {
implementation project(':core')
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
implementation "commons-cli:commons-cli:$cliVersion"
implementation "com.kotcrab.vis:vis-ui:$visuiVersion"
}
application {
mainClass = 'com.riiablo.mpq.MPQViewer'
}
run {
setIgnoreExitValue(true)
// Required to run LWJGL3 java apps on MacOS
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
jvmArgs += "-XstartOnFirstThread"
}
}
jar {
archiveBaseName = project.name
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)
}
}