mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 10:29:43 +01:00
30 lines
834 B
Groovy
30 lines
834 B
Groovy
|
import org.gradle.internal.os.OperatingSystem
|
||
|
|
||
|
plugins {
|
||
|
// Apply the common convention plugin for shared build configuration between library and application projects.
|
||
|
id 'buildlogic.java-common-conventions'
|
||
|
|
||
|
// Apply the application plugin to add support for building a CLI application in Java.
|
||
|
id 'application'
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Check whether jme3-lwjgl (i.e., version 2) should be used instead of jme3-lwjgl3.
|
||
|
* This is controlled by existence of the file 'use/lwjgl2'
|
||
|
*/
|
||
|
def use_lwjgl2() {
|
||
|
return file("${rootProject.projectDir}/use/lwjgl2").exists()
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
if (use_lwjgl2())
|
||
|
runtimeOnly libs.jme3.lwjgl
|
||
|
else
|
||
|
runtimeOnly libs.jme3.lwjgl3
|
||
|
}
|
||
|
|
||
|
application {
|
||
|
if (OperatingSystem.current().isMacOsX() && !use_lwjgl2())
|
||
|
applicationDefaultJvmArgs = ['-XstartOnFirstThread']
|
||
|
}
|