-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build.gradle: Update jME to v3.7.0-stable
- Loading branch information
Showing
1 changed file
with
29 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,65 @@ | ||
plugins { | ||
id 'java' | ||
id 'java-library' | ||
} | ||
|
||
description = 'prototypical JMonkeyEngine application' | ||
|
||
// select one source-code (JDK) option | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
ext.jmeVersion = '3.6.1-stable' // from mavenCentral | ||
java { | ||
// select one source-code (JDK) option | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
gradle.projectsEvaluated { | ||
tasks.withType(JavaCompile) { // compile-time options: | ||
options.compilerArgs << '-Xdiags:verbose' | ||
options.compilerArgs << '-Xlint:unchecked' | ||
options.deprecation = true | ||
options.encoding = 'UTF-8' | ||
} | ||
tasks.withType(JavaExec) { // runtime options: | ||
args = [] | ||
classpath sourceSets.main.runtimeClasspath | ||
//debug true | ||
enableAssertions true | ||
//jvmArgs '-verbose:gc' | ||
//jvmArgs '-Xbatch' | ||
//jvmArgs '-Xms512m', '-Xmx512m' | ||
//jvmArgs '-XX:+PrintCompilation' | ||
//jvmArgs '-XX:+UseConcMarkSweepGC' | ||
jvmArgs '-XX:+UseG1GC', '-XX:MaxGCPauseMillis=10' | ||
} | ||
project.ext { | ||
jmeVersion = '3.7.0-stable' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
|
||
// jMonkeyEngine | ||
implementation 'org.jmonkeyengine:jme3-core:' + jmeVersion | ||
implementation 'org.jmonkeyengine:jme3-desktop:' + jmeVersion | ||
implementation 'org.jmonkeyengine:jme3-effects:' + jmeVersion | ||
runtimeOnly 'org.jmonkeyengine:jme3-awt-dialogs:' + jmeVersion | ||
|
||
// PhysicsEngine | ||
implementation 'com.github.stephengold:Minie:8.1.0+big4' | ||
// Mac OS with LWJGL 3 doesn't allow AWT/Swing | ||
if (!System.getProperty("os.name").toLowerCase().contains("mac")) { | ||
runtimeOnly 'org.jmonkeyengine:jme3-awt-dialogs:' + jmeVersion | ||
} | ||
|
||
// Physics | ||
implementation 'com.github.stephengold:Minie:8.2.0+big4' | ||
|
||
// select one version of LWJGL | ||
//runtimeOnly 'org.jmonkeyengine:jme3-lwjgl:' + jmeVersion // LWJGL 2.x | ||
runtimeOnly 'org.jmonkeyengine:jme3-lwjgl3:' + jmeVersion // LWJGL 3.x | ||
runtimeOnly 'org.jmonkeyengine:jme3-lwjgl:' + jmeVersion // LWJGL 2.x | ||
//runtimeOnly 'org.jmonkeyengine:jme3-lwjgl3:' + jmeVersion // LWJGL 3.x | ||
|
||
runtimeOnly 'org.jmonkeyengine:jme3-jogg:' + jmeVersion | ||
runtimeOnly 'org.jmonkeyengine:jme3-plugins:' + jmeVersion | ||
|
||
//runtimeOnly 'org.jmonkeyengine:jme3-testdata:' + jmeVersion | ||
runtimeOnly 'org.jmonkeyengine:jme3-testdata:3.4.0-alpha6' | ||
|
||
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 | ||
implementation 'org.apache.commons:commons-lang3:3.15.0' | ||
} | ||
|
||
// cleanup tasks | ||
wrapper { | ||
gradleVersion = '8.4' | ||
} | ||
|
||
// Register cleanup tasks: | ||
|
||
clean.dependsOn('cleanDLLs', 'cleanDyLibs', 'cleanLogs', 'cleanSOs') | ||
task cleanDLLs(type: Delete) { | ||
|
||
tasks.register('cleanDLLs', Delete) { // extracted Windows native libraries | ||
delete fileTree(dir: '.', include: '*.dll') | ||
} | ||
task cleanDyLibs(type: Delete) { | ||
tasks.register('cleanDyLibs', Delete) { // extracted macOS native libraries | ||
delete fileTree(dir: '.', include: '*.dylib') | ||
} | ||
task cleanLogs(type: Delete) { | ||
tasks.register('cleanLogs', Delete) { // JVM crash logs | ||
delete fileTree(dir: '.', include: 'hs_err_pid*.log') | ||
} | ||
task cleanSOs(type: Delete) { | ||
tasks.register('cleanSOs', Delete) { // extracted Linux and Android native libraries | ||
delete fileTree(dir: '.', include: '*.so') | ||
} |