added contents

This commit is contained in:
Mark Minas
2024-09-18 17:04:31 +02:00
parent d28b17eba5
commit 71a4ac8d12
176 changed files with 51198 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
plugins {
// Support convention plugins written in Groovy. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build.
id 'groovy-gradle-plugin'
}
repositories {
// Use the plugin portal to apply community plugins in convention plugins.
gradlePluginPortal()
}

View File

@@ -0,0 +1 @@
rootProject.name = 'buildSrc'

View File

@@ -0,0 +1,7 @@
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'
}

View File

@@ -0,0 +1,21 @@
plugins {
// Apply the java Plugin to add support for Java.
id 'java'
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
testImplementation libs.junit4
}
java {
compileJava.options.encoding = 'UTF-8'
}
test {
useJUnit()
}

View File

@@ -0,0 +1,7 @@
plugins {
// Apply the common convention plugin for shared build configuration between library and application projects.
id 'buildlogic.java-common-conventions'
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
}

View File

@@ -0,0 +1,29 @@
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']
}