first
This commit is contained in:
12
.gitattributes
vendored
Normal file
12
.gitattributes
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# Linux start script should use lf
|
||||
/gradlew text eol=lf
|
||||
|
||||
# These are Windows script files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
# Binary files should be left untouched
|
||||
*.jar binary
|
||||
|
||||
146
.github/workflows/build.yml
vendored
Normal file
146
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
name: Build and Package
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-jar:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
cache: gradle
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Upload Fat JAR
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifacts-portable
|
||||
path: dist/portable/*-portable.jar
|
||||
retention-days: 7
|
||||
|
||||
build-native:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
platform: linux
|
||||
- os: windows-latest
|
||||
platform: windows
|
||||
- os: macos-latest
|
||||
platform: macos
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up GraalVM
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'graalvm'
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
native-image-job-reports: 'true'
|
||||
|
||||
- name: Build Installer for ${{ matrix.platform }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ matrix.platform }}" == "linux" ]]; then
|
||||
sudo apt-get install -y rpm
|
||||
fi
|
||||
./gradlew buildInstaller
|
||||
ls -R dist
|
||||
|
||||
- name: Build Native Executable for ${{ matrix.platform }}
|
||||
shell: bash
|
||||
run: |
|
||||
./gradlew buildNativeExecutable
|
||||
ls -R dist
|
||||
|
||||
- name: Prepare artifacts for ${{ matrix.platform }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ matrix.platform }}" == "windows" ]]; then
|
||||
choco install -y zip
|
||||
fi
|
||||
echo "Listing build artifacts for ${{ matrix.platform }}"
|
||||
ls -R dist
|
||||
mkdir -p dist/artifacts
|
||||
artifactsDir="$PWD/dist/artifacts/"
|
||||
cd dist
|
||||
for platformDir in *.buildNative *.setup; do
|
||||
if [ -d "$platformDir" ]; then
|
||||
platform=${platformDir%.*}
|
||||
cd "$platformDir"
|
||||
if [[ "${{ matrix.platform }}" == "macos" ]]; then
|
||||
ditto -c -k --sequesterRsrc --keepParent . "$artifactsDir/$platform.zip"
|
||||
else
|
||||
zip -r "$artifactsDir/$platform.zip" *
|
||||
fi
|
||||
cd ..
|
||||
fi
|
||||
done
|
||||
ls -R
|
||||
|
||||
- name: Upload Artifacts for ${{ matrix.platform }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifacts-${{ matrix.platform }}
|
||||
path: dist/artifacts/*
|
||||
retention-days: 7
|
||||
|
||||
publish-release:
|
||||
needs: [build-jar, build-native]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Rename and prepare artifacts
|
||||
run: |
|
||||
mkdir -p release
|
||||
ls -R artifacts
|
||||
|
||||
releaseDir="$PWD/release"
|
||||
|
||||
for artifactDir in artifacts/artifacts-*; do
|
||||
baseDir="$PWD"
|
||||
cd "$artifactDir"
|
||||
for artifact in *; do
|
||||
cp "$artifact" "$releaseDir/"
|
||||
done
|
||||
cd "$baseDir"
|
||||
done
|
||||
|
||||
- name: Upload release artifact to github actions
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release
|
||||
path: release/*
|
||||
retention-days: 60
|
||||
|
||||
- name: Upload Release to GitHub
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: release/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
bin
|
||||
dist
|
||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
||||
24
LICENSE
Normal file
24
LICENSE
Normal file
@@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <https://unlicense.org>
|
||||
8
README.md
Normal file
8
README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
An app template for Nostr Game Engine.
|
||||
|
||||
|
||||
Check out the documentation at [ngengine.org/docs/getting-started](https://ngengine.org/docs/getting-started/);
|
||||
|
||||
|
||||

|
||||
273
app/build.gradle
Normal file
273
app/build.gradle
Normal file
@@ -0,0 +1,273 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* This generated file contains a sample Java application project to get you started.
|
||||
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.13/userguide/building_java_projects.html in the Gradle documentation.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id 'application'
|
||||
id 'org.graalvm.buildtools.native' version '0.10.6'
|
||||
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url 'https://maven.rblb.it/NostrGameEngine/nge-platforms' }
|
||||
maven { url 'https://maven.rblb.it/NostrGameEngine/nostr4j' }
|
||||
maven { url 'https://maven.rblb.it/NostrGameEngine/ngengine' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation libs.junit
|
||||
|
||||
implementation "org.ngengine:nge-app:${ngeVersion}"
|
||||
implementation "org.ngengine:nge-app-jvm:${ngeVersion}"
|
||||
implementation "org.ngengine:nge-auth:${ngeVersion}"
|
||||
implementation "org.ngengine:nge-core:${ngeVersion}"
|
||||
implementation "org.ngengine:nge-gui:${ngeVersion}"
|
||||
implementation "org.ngengine:nge-networking:${ngeVersion}"
|
||||
|
||||
implementation "org.ngengine:jme3-desktop:${ngeVersion}"
|
||||
implementation "org.ngengine:jme3-effects:${ngeVersion}"
|
||||
implementation "org.ngengine:jme3-jogg:${ngeVersion}"
|
||||
implementation "org.ngengine:jme3-lwjgl3:${ngeVersion}"
|
||||
implementation "org.ngengine:jme3-plugins:${ngeVersion}"
|
||||
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
vendor = JvmVendorSpec.ADOPTIUM
|
||||
implementation = JvmImplementation.VENDOR_SPECIFIC
|
||||
}
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = project.findProperty('mainClass')
|
||||
}
|
||||
|
||||
|
||||
shadowJar {
|
||||
archiveBaseName = "${rootProject.name}"
|
||||
archiveClassifier = 'portable'
|
||||
archiveVersion = "${project.version}"
|
||||
destinationDirectory = file("${rootProject.projectDir}/dist/portable")
|
||||
manifest {
|
||||
attributes 'Main-Class': application.mainClass.get()
|
||||
}
|
||||
mergeServiceFiles()
|
||||
}
|
||||
|
||||
|
||||
build.dependsOn shadowJar
|
||||
|
||||
graalvmNative {
|
||||
toolchainDetection = true
|
||||
metadataRepository {
|
||||
enabled = true
|
||||
}
|
||||
binaries {
|
||||
main {
|
||||
def buildName = "${rootProject.name}";
|
||||
imageName = buildName
|
||||
def initAtRuntime = file("${project.projectDir}/graal.initialize-at-runtime.conf")
|
||||
.text
|
||||
.split("\\r?\\n")
|
||||
.findAll { it && !it.startsWith('#') && !it.trim().isEmpty() }
|
||||
.join(',')
|
||||
|
||||
mainClass = application.mainClass.get()
|
||||
def arguments = [
|
||||
'--report-unsupported-elements-at-runtime',
|
||||
'--install-exit-handlers',
|
||||
'--add-exports=java.desktop/sun.awt=ALL-UNNAMED',
|
||||
'--add-exports=java.desktop/sun.java2d=ALL-UNNAMED',
|
||||
'--add-exports=java.base/sun.nio.ch=ALL-UNNAMED',
|
||||
'-H:+ReportExceptionStackTraces',
|
||||
'-H:+PrintClassInitialization',
|
||||
'--initialize-at-run-time=' + initAtRuntime,
|
||||
'--no-server',
|
||||
'--enable-url-protocols=http,https,file',
|
||||
'--link-at-build-time',
|
||||
'-H:+UnlockExperimentalVMOptions',
|
||||
'--enable-native-access=ALL-UNNAMED',
|
||||
'-H:+StaticExecutableWithDynamicLibC',
|
||||
'-march=compatibility',
|
||||
'-Djava.awt.headless=true',
|
||||
'-H:IncludeResources=.*',
|
||||
'-H:Name=' + buildName,
|
||||
"-H:ConfigurationFileDirectories=${project.projectDir}/trace"
|
||||
]
|
||||
|
||||
// Add G1 GC only if linux
|
||||
if (org.gradle.internal.os.OperatingSystem.current().isLinux()) {
|
||||
arguments.add('--gc=G1')
|
||||
}
|
||||
|
||||
buildArgs.addAll(arguments)
|
||||
sharedLibrary = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
nativeImageCompileOnly {
|
||||
canBeResolved = true
|
||||
}
|
||||
}
|
||||
|
||||
def getOsName(){
|
||||
def osName = org.gradle.internal.os.OperatingSystem.current().getName().toLowerCase()
|
||||
|
||||
if (org.gradle.internal.os.OperatingSystem.current().isWindows()){
|
||||
osName = "windows"
|
||||
} else if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
|
||||
osName = "macos"
|
||||
} else if (org.gradle.internal.os.OperatingSystem.current().isLinux()) {
|
||||
osName = "linux"
|
||||
}
|
||||
|
||||
return osName
|
||||
}
|
||||
|
||||
|
||||
task traceNative(type: JavaExec) {
|
||||
group = 'graalvm'
|
||||
description = 'Trace reflection and resource usage'
|
||||
mainClass = application.mainClass.get()
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
jvmArgs = [
|
||||
"-agentlib:native-image-agent=config-merge-dir=${project.projectDir}/trace",
|
||||
'-Djava.awt.headless=true', '-XstartOnFirstThread'
|
||||
]
|
||||
systemProperty 'java.awt.headless', 'false'
|
||||
systemProperty 'testMode', 'true'
|
||||
doFirst {
|
||||
println "Tracing to: ${project.projectDir}/trace"
|
||||
println "Run the application and exercise ALL features:"
|
||||
println "- Load different asset types (textures, models, sounds)"
|
||||
println "- Use UI components"
|
||||
println "- Trigger network operations"
|
||||
println "- Test different game states"
|
||||
println "Then close the application normally."
|
||||
}
|
||||
doLast {
|
||||
println "Tracing complete! Generated/updated files:"
|
||||
fileTree("${project.projectDir}/trace").each { file ->
|
||||
if (file.isFile()) {
|
||||
println " - ${file.name} (${file.length()} bytes)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task buildNativeExecutable {
|
||||
group = 'graalvm'
|
||||
description = 'Build native executable for current platform'
|
||||
dependsOn 'nativeCompile'
|
||||
doLast {
|
||||
def buildDirNative = "${project.buildDir}/native/nativeCompile"
|
||||
def executableName = graalvmNative.binaries.main.imageName.get()
|
||||
if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
|
||||
executableName += '.exe'
|
||||
}
|
||||
|
||||
def osName = getOsName()
|
||||
def osArch = System.getProperty("os.arch").toLowerCase()
|
||||
def buildName = "${rootProject.name}-${project.version}-${osName}-${osArch}";
|
||||
|
||||
def distDir = file("${rootProject.projectDir}/dist/${buildName}.buildNative")
|
||||
distDir.mkdirs()
|
||||
|
||||
copy {
|
||||
from buildDirNative
|
||||
into distDir
|
||||
exclude '**/reports/**'
|
||||
exclude '**/*.report'
|
||||
exclude '**/*.dmp'
|
||||
exclude '**/*.log'
|
||||
}
|
||||
|
||||
println "Native executable built: ${buildDirNative}/${executableName}"
|
||||
println "All native build files copied to: ${distDir}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
def jpackage(installerType, distDir){
|
||||
def os = org.gradle.internal.os.OperatingSystem.current()
|
||||
|
||||
|
||||
|
||||
def jarFile = shadowJar.archiveFile.get().asFile
|
||||
def jarDir = jarFile.parentFile
|
||||
def mainClass = application.mainClass.get()
|
||||
|
||||
|
||||
def shadowJarFile = shadowJar.archiveFile.get().asFile
|
||||
|
||||
def commandLine = [
|
||||
'jpackage',
|
||||
'--input', jarDir.absolutePath,
|
||||
'--main-jar', jarFile.name,
|
||||
'--main-class', mainClass,
|
||||
'--name', rootProject.name,
|
||||
'--app-version', project.version,
|
||||
'--type', installerType,
|
||||
'--dest', distDir,
|
||||
'--java-options', project.findProperty('javaOptions') ?: '',
|
||||
'--copyright', project.findProperty('copyright')
|
||||
]
|
||||
|
||||
// Optional: platform-specific flags
|
||||
if (os.isWindows()) {
|
||||
commandLine += ['--win-menu', '--win-shortcut']
|
||||
} else if (os.isMacOsX()) {
|
||||
commandLine += ['--icon', "${rootProject.projectDir}/icon.icns"]
|
||||
} else if (os.isLinux()) {
|
||||
commandLine += ['--icon', "${rootProject.projectDir}/icon.png"]
|
||||
}
|
||||
return commandLine
|
||||
}
|
||||
|
||||
task buildInstaller(type: DefaultTask) {
|
||||
group = 'distribution'
|
||||
description = 'Create native installer using jpackage'
|
||||
dependsOn shadowJar
|
||||
|
||||
def os = org.gradle.internal.os.OperatingSystem.current()
|
||||
def osName = getOsName()
|
||||
def osArch = System.getProperty("os.arch").toLowerCase()
|
||||
def buildName = "${rootProject.name}-${project.version}-${osName}-${osArch}-SETUP";
|
||||
def distDir = file("${rootProject.projectDir}/dist/${buildName}.setup")
|
||||
|
||||
|
||||
doLast {
|
||||
if (distDir.exists()) {
|
||||
println "Deleting existing output directory: ${distDir}"
|
||||
delete distDir
|
||||
}
|
||||
|
||||
if(os.isWindows()){
|
||||
exec {
|
||||
commandLine jpackage('exe', distDir)
|
||||
}
|
||||
} else if(os.isMacOsX()){
|
||||
exec {
|
||||
commandLine jpackage('dmg', distDir)
|
||||
}
|
||||
} else if(os.isLinux()){
|
||||
exec {
|
||||
commandLine jpackage('deb', distDir)
|
||||
}
|
||||
exec {
|
||||
commandLine jpackage('rpm', distDir)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
app/graal.initialize-at-runtime.conf
Normal file
9
app/graal.initialize-at-runtime.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
org.lwjgl
|
||||
com.jme3.network.message
|
||||
org.ngengine.network
|
||||
java.awt.image.ColorModel
|
||||
javax.imageio.ImageIO
|
||||
java.awt.Toolkit
|
||||
java.awt.GraphicsEnvironment
|
||||
sun.awt.X11.XToolkit
|
||||
com.jme3.texture.plugins.AWTLoader
|
||||
118
app/src/main/java/org/example/MainComponent.java
Normal file
118
app/src/main/java/org/example/MainComponent.java
Normal file
@@ -0,0 +1,118 @@
|
||||
package org.example;
|
||||
|
||||
import org.ngengine.AsyncAssetManager;
|
||||
import org.ngengine.components.Component;
|
||||
import org.ngengine.components.ComponentManager;
|
||||
import org.ngengine.components.fragments.AsyncAssetLoadingFragment;
|
||||
import org.ngengine.components.fragments.InputHandlerFragment;
|
||||
import org.ngengine.components.fragments.MainViewPortFragment;
|
||||
import org.ngengine.gui.components.NLabel;
|
||||
import org.ngengine.gui.components.containers.NRow;
|
||||
import org.ngengine.gui.win.NWindowManagerComponent;
|
||||
import org.ngengine.gui.win.std.NHud;
|
||||
import org.ngengine.runner.Runner;
|
||||
import org.ngengine.store.DataStoreProvider;
|
||||
|
||||
import com.jme3.asset.AssetManager;
|
||||
import com.jme3.environment.EnvironmentProbeControl;
|
||||
import com.jme3.input.KeyInput;
|
||||
import com.jme3.input.event.KeyInputEvent;
|
||||
import com.jme3.material.Material;
|
||||
import com.jme3.material.Materials;
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector3f;
|
||||
import com.jme3.post.FilterPostProcessor;
|
||||
import com.jme3.post.filters.ToneMapFilter;
|
||||
import com.jme3.renderer.ViewPort;
|
||||
import com.jme3.scene.Geometry;
|
||||
import com.jme3.scene.Node;
|
||||
import com.jme3.scene.Spatial;
|
||||
import com.jme3.scene.shape.Box;
|
||||
import com.jme3.util.SkyFactory;
|
||||
import com.jme3.util.SkyFactory.EnvMapType;
|
||||
|
||||
public class MainComponent implements Component<Object>, AsyncAssetLoadingFragment, MainViewPortFragment, InputHandlerFragment{
|
||||
// In a real-world application, you should probably split this into multiple components
|
||||
|
||||
private Spatial sky;
|
||||
private EnvironmentProbeControl evp;
|
||||
private Node rootNode;
|
||||
private Node characterNode;
|
||||
|
||||
@Override
|
||||
public void loadAssetsAsync(AsyncAssetManager assetManager) {
|
||||
// load resources
|
||||
sky = SkyFactory.createSky(assetManager, "Sky/citrus_orchard_puresky_4k.hdr", EnvMapType.EquirectMap);
|
||||
evp = new EnvironmentProbeControl(assetManager, 256);
|
||||
|
||||
// Tag sky for environment baking
|
||||
EnvironmentProbeControl.tagGlobal(sky);
|
||||
|
||||
// load character model
|
||||
characterNode = new Node("CharacterNode");
|
||||
Geometry characterGeom = new Geometry("MyCharacter", new Box(1f,1f,1f));
|
||||
characterNode.attachChild(characterGeom);
|
||||
|
||||
// set up material for character
|
||||
Material characterMat = new Material(assetManager, Materials.PBR);
|
||||
characterMat.setColor("BaseColor", ColorRGBA.White);
|
||||
characterMat.setFloat("Metallic", 1.0f);
|
||||
characterMat.setFloat("Roughness", 0.0f);
|
||||
characterGeom.setMaterial(characterMat);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void receiveMainViewPort(ViewPort viewPort) {
|
||||
rootNode = getRootNode(viewPort);
|
||||
viewPort.getCamera().lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadMainViewPortFilterPostprocessor(AssetManager assetManager, FilterPostProcessor fpp) {
|
||||
ToneMapFilter toneMapFilter = new ToneMapFilter(Vector3f.UNIT_XYZ.mult(1.6f));
|
||||
fpp.addFilter(toneMapFilter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable(ComponentManager mng, Runner runner, DataStoreProvider dataStore, boolean firstTime, Object arg) {
|
||||
// Compose the scene
|
||||
rootNode.attachChild(sky);
|
||||
rootNode.addControl(evp);
|
||||
rootNode.attachChild(characterNode);
|
||||
|
||||
NWindowManagerComponent windowManager = mng.getComponent(NWindowManagerComponent.class);
|
||||
windowManager.showWindow(NHud.class, (win,err)->{
|
||||
if(err != null) {
|
||||
System.err.println("Error showing HUD window: " + err.getMessage());
|
||||
return;
|
||||
}
|
||||
NRow topRow = win.getTop();
|
||||
NLabel label = new NLabel("Use WASD to move the cube");
|
||||
topRow.addChild(label);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKeyEvent(KeyInputEvent evt) {
|
||||
if(evt.getKeyCode() == KeyInput.KEY_W){
|
||||
characterNode.move(0, 0, -0.1f); // Move character forward
|
||||
} else if(evt.getKeyCode() == KeyInput.KEY_S) {
|
||||
characterNode.move(0, 0, 0.1f); // Move character backward
|
||||
} else if(evt.getKeyCode() == KeyInput.KEY_A) {
|
||||
characterNode.move(-0.1f, 0, 0); // Move character left
|
||||
} else if(evt.getKeyCode() == KeyInput.KEY_D) {
|
||||
characterNode.move(0.1f, 0, 0); // Move character right
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable(ComponentManager mng, Runner runner, DataStoreProvider dataStore) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
43
app/src/main/java/org/example/NGEAppMain.java
Normal file
43
app/src/main/java/org/example/NGEAppMain.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This source file was generated by the Gradle 'init' task
|
||||
*/
|
||||
package org.example;
|
||||
|
||||
import org.ngengine.NGEApplication;
|
||||
import org.ngengine.components.ComponentManager;
|
||||
import org.ngengine.gui.win.NWindowManagerComponent;
|
||||
import org.ngengine.player.PlayerManagerComponent;
|
||||
import com.jme3.system.AppSettings;
|
||||
|
||||
public class NGEAppMain {
|
||||
public static void main(String[] args) {
|
||||
AppSettings settings = new AppSettings(true);
|
||||
settings.setRenderer(AppSettings.LWJGL_OPENGL32);
|
||||
settings.setWidth(1280);
|
||||
settings.setHeight(720);
|
||||
settings.setGammaCorrection(true);
|
||||
settings.setSamples(4);
|
||||
settings.setStencilBits(8);
|
||||
settings.setDepthBits(24);
|
||||
settings.setVSync(true);
|
||||
settings.setGraphicsDebug(false);
|
||||
settings.setTitle("Nostr Game Engine Demo");
|
||||
|
||||
|
||||
Runnable appBuilder = NGEApplication.createApp(
|
||||
settings,
|
||||
app -> {
|
||||
ComponentManager mng = app.getComponentManager();
|
||||
mng.addAndEnableComponent(new PlayerManagerComponent());
|
||||
mng.addAndEnableComponent(new NWindowManagerComponent());
|
||||
|
||||
// Add more components as needed
|
||||
// ...
|
||||
|
||||
mng.addComponent(new MainComponent(), NWindowManagerComponent.class, PlayerManagerComponent.class);
|
||||
mng.enableComponent(MainComponent.class);
|
||||
}
|
||||
);
|
||||
appBuilder.run();
|
||||
}
|
||||
}
|
||||
BIN
app/src/main/resources/Sky/citrus_orchard_puresky_4k.hdr
Normal file
BIN
app/src/main/resources/Sky/citrus_orchard_puresky_4k.hdr
Normal file
Binary file not shown.
13
app/src/test/java/org/example/TestNGEAppMain.java
Normal file
13
app/src/test/java/org/example/TestNGEAppMain.java
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This source file was generated by the Gradle 'init' task
|
||||
*/
|
||||
package org.example;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class TestNGEAppMain {
|
||||
@Test public void okTest() {
|
||||
assertTrue("This test should always pass", true);
|
||||
}
|
||||
}
|
||||
590
app/trace/jni-config.json
Normal file
590
app/trace/jni-config.json
Normal file
@@ -0,0 +1,590 @@
|
||||
[
|
||||
{
|
||||
"name":"[Lsun.java2d.loops.GraphicsPrimitive;"
|
||||
},
|
||||
{
|
||||
"name":"java.awt.AWTEvent",
|
||||
"fields":[
|
||||
{"name":"bdata"},
|
||||
{"name":"consumed"},
|
||||
{"name":"id"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.AlphaComposite",
|
||||
"fields":[
|
||||
{"name":"extraAlpha"},
|
||||
{"name":"rule"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.Color",
|
||||
"fields":[{"name":"value"}],
|
||||
"methods":[{"name":"getRGB","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.Component",
|
||||
"fields":[
|
||||
{"name":"appContext"},
|
||||
{"name":"background"},
|
||||
{"name":"foreground"},
|
||||
{"name":"graphicsConfig"},
|
||||
{"name":"height"},
|
||||
{"name":"isPacked"},
|
||||
{"name":"name"},
|
||||
{"name":"peer"},
|
||||
{"name":"width"},
|
||||
{"name":"x"},
|
||||
{"name":"y"}
|
||||
],
|
||||
"methods":[
|
||||
{"name":"getLocationOnScreen_NoTreeLock","parameterTypes":[] },
|
||||
{"name":"getParent_NoClientCode","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.DisplayMode",
|
||||
"methods":[{"name":"<init>","parameterTypes":["int","int","int","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.Font",
|
||||
"fields":[
|
||||
{"name":"pData"},
|
||||
{"name":"size"},
|
||||
{"name":"style"}
|
||||
],
|
||||
"methods":[
|
||||
{"name":"getFamily_NoClientCode","parameterTypes":[] },
|
||||
{"name":"getFontPeer","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.GraphicsEnvironment",
|
||||
"methods":[{"name":"isHeadless","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.Insets",
|
||||
"fields":[
|
||||
{"name":"bottom"},
|
||||
{"name":"left"},
|
||||
{"name":"right"},
|
||||
{"name":"top"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.Rectangle",
|
||||
"methods":[{"name":"<init>","parameterTypes":["int","int","int","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.event.InputEvent",
|
||||
"fields":[{"name":"modifiers"}]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.event.KeyEvent",
|
||||
"fields":[
|
||||
{"name":"isProxyActive"},
|
||||
{"name":"keyChar"},
|
||||
{"name":"keyCode"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.geom.AffineTransform",
|
||||
"fields":[
|
||||
{"name":"m00"},
|
||||
{"name":"m01"},
|
||||
{"name":"m02"},
|
||||
{"name":"m10"},
|
||||
{"name":"m11"},
|
||||
{"name":"m12"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.geom.GeneralPath",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":[] },
|
||||
{"name":"<init>","parameterTypes":["int","byte[]","int","float[]","int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.geom.Path2D",
|
||||
"fields":[
|
||||
{"name":"numTypes"},
|
||||
{"name":"pointTypes"},
|
||||
{"name":"windingRule"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.geom.Path2D$Float",
|
||||
"fields":[{"name":"floatCoords"}]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.geom.Point2D$Float",
|
||||
"fields":[
|
||||
{"name":"x"},
|
||||
{"name":"y"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":["float","float"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.geom.Rectangle2D$Float",
|
||||
"fields":[
|
||||
{"name":"height"},
|
||||
{"name":"width"},
|
||||
{"name":"x"},
|
||||
{"name":"y"}
|
||||
],
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":[] },
|
||||
{"name":"<init>","parameterTypes":["float","float","float","float"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.image.BufferedImage",
|
||||
"fields":[
|
||||
{"name":"colorModel"},
|
||||
{"name":"imageType"},
|
||||
{"name":"raster"}
|
||||
],
|
||||
"methods":[
|
||||
{"name":"getRGB","parameterTypes":["int","int","int","int","int[]","int","int"] },
|
||||
{"name":"setRGB","parameterTypes":["int","int","int","int","int[]","int","int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.image.ColorModel",
|
||||
"fields":[
|
||||
{"name":"colorSpace"},
|
||||
{"name":"colorSpaceType"},
|
||||
{"name":"isAlphaPremultiplied"},
|
||||
{"name":"is_sRGB"},
|
||||
{"name":"nBits"},
|
||||
{"name":"numComponents"},
|
||||
{"name":"pData"},
|
||||
{"name":"supportsAlpha"},
|
||||
{"name":"transparency"}
|
||||
],
|
||||
"methods":[{"name":"getRGBdefault","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.image.DirectColorModel",
|
||||
"methods":[{"name":"<init>","parameterTypes":["int","int","int","int","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.image.IndexColorModel",
|
||||
"fields":[
|
||||
{"name":"allgrayopaque"},
|
||||
{"name":"colorData"},
|
||||
{"name":"map_size"},
|
||||
{"name":"rgb"},
|
||||
{"name":"transparent_index"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.image.Raster",
|
||||
"fields":[
|
||||
{"name":"dataBuffer"},
|
||||
{"name":"height"},
|
||||
{"name":"minX"},
|
||||
{"name":"minY"},
|
||||
{"name":"numBands"},
|
||||
{"name":"numDataElements"},
|
||||
{"name":"sampleModel"},
|
||||
{"name":"sampleModelTranslateX"},
|
||||
{"name":"sampleModelTranslateY"},
|
||||
{"name":"width"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.image.SampleModel",
|
||||
"fields":[
|
||||
{"name":"height"},
|
||||
{"name":"width"}
|
||||
],
|
||||
"methods":[
|
||||
{"name":"getPixels","parameterTypes":["int","int","int","int","int[]","java.awt.image.DataBuffer"] },
|
||||
{"name":"setPixels","parameterTypes":["int","int","int","int","int[]","java.awt.image.DataBuffer"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.image.SinglePixelPackedSampleModel",
|
||||
"fields":[
|
||||
{"name":"bitMasks"},
|
||||
{"name":"bitOffsets"},
|
||||
{"name":"bitSizes"},
|
||||
{"name":"maxBitSize"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Boolean",
|
||||
"methods":[{"name":"getBoolean","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.System",
|
||||
"methods":[
|
||||
{"name":"load","parameterTypes":["java.lang.String"] },
|
||||
{"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Thread",
|
||||
"methods":[{"name":"yield","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.util.ArrayList",
|
||||
"methods":[{"name":"add","parameterTypes":["java.lang.Object"] }]
|
||||
},
|
||||
{
|
||||
"name":"org.lwjgl.system.CallbackI",
|
||||
"methods":[{"name":"callback","parameterTypes":["long","long"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.SunHints",
|
||||
"fields":[{"name":"INTVAL_STROKE_PURE"}]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.SunToolkit",
|
||||
"methods":[
|
||||
{"name":"awtLock","parameterTypes":[] },
|
||||
{"name":"awtLockNotify","parameterTypes":[] },
|
||||
{"name":"awtLockNotifyAll","parameterTypes":[] },
|
||||
{"name":"awtLockWait","parameterTypes":["long"] },
|
||||
{"name":"awtUnlock","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11.XBaseWindow",
|
||||
"fields":[{"name":"window"}],
|
||||
"methods":[{"name":"getWindow","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11.XContentWindow"
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11.XErrorHandlerUtil",
|
||||
"methods":[
|
||||
{"name":"globalErrorHandler","parameterTypes":["long","long"] },
|
||||
{"name":"init","parameterTypes":["long"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11.XFramePeer"
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11.XToolkit",
|
||||
"fields":[
|
||||
{"name":"modLockIsShiftLock"},
|
||||
{"name":"numLockMask"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11.XWindow",
|
||||
"fields":[
|
||||
{"name":"drawState"},
|
||||
{"name":"graphicsConfig"},
|
||||
{"name":"target"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11GraphicsConfig",
|
||||
"fields":[
|
||||
{"name":"aData"},
|
||||
{"name":"bitsPerPixel"},
|
||||
{"name":"screen"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11GraphicsDevice",
|
||||
"fields":[{"name":"screen"}],
|
||||
"methods":[{"name":"addDoubleBufferVisual","parameterTypes":["int"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11InputMethodBase",
|
||||
"fields":[{"name":"pData"}]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.image.BufImgSurfaceData$ICMColorData",
|
||||
"fields":[{"name":"pData"}],
|
||||
"methods":[{"name":"<init>","parameterTypes":["long"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.image.ByteComponentRaster",
|
||||
"fields":[
|
||||
{"name":"data"},
|
||||
{"name":"dataOffsets"},
|
||||
{"name":"pixelStride"},
|
||||
{"name":"scanlineStride"},
|
||||
{"name":"type"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.image.ImageRepresentation",
|
||||
"fields":[
|
||||
{"name":"numSrcLUT"},
|
||||
{"name":"srcLUTtransIndex"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.image.IntegerComponentRaster",
|
||||
"fields":[
|
||||
{"name":"data"},
|
||||
{"name":"dataOffsets"},
|
||||
{"name":"pixelStride"},
|
||||
{"name":"scanlineStride"},
|
||||
{"name":"type"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.CharToGlyphMapper",
|
||||
"methods":[{"name":"charToGlyph","parameterTypes":["int"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.Font2D",
|
||||
"methods":[
|
||||
{"name":"canDisplay","parameterTypes":["char"] },
|
||||
{"name":"charToGlyph","parameterTypes":["int"] },
|
||||
{"name":"charToVariationGlyph","parameterTypes":["int","int"] },
|
||||
{"name":"getMapper","parameterTypes":[] },
|
||||
{"name":"getTableBytes","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.FontStrike",
|
||||
"methods":[{"name":"getGlyphMetrics","parameterTypes":["int"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.FreetypeFontScaler",
|
||||
"methods":[{"name":"invalidateScaler","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.GlyphList",
|
||||
"fields":[
|
||||
{"name":"images"},
|
||||
{"name":"lcdRGBOrder"},
|
||||
{"name":"lcdSubPixPos"},
|
||||
{"name":"len"},
|
||||
{"name":"positions"},
|
||||
{"name":"usePositions"},
|
||||
{"name":"x"},
|
||||
{"name":"y"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.PhysicalStrike",
|
||||
"fields":[{"name":"pScalerContext"}],
|
||||
"methods":[
|
||||
{"name":"adjustPoint","parameterTypes":["java.awt.geom.Point2D$Float"] },
|
||||
{"name":"getGlyphPoint","parameterTypes":["int","int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.StrikeMetrics",
|
||||
"methods":[{"name":"<init>","parameterTypes":["float","float","float","float","float","float","float","float","float","float"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.TrueTypeFont",
|
||||
"methods":[
|
||||
{"name":"readBlock","parameterTypes":["java.nio.ByteBuffer","int","int"] },
|
||||
{"name":"readBytes","parameterTypes":["int","int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.font.Type1Font",
|
||||
"methods":[{"name":"readFile","parameterTypes":["java.nio.ByteBuffer"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.Disposer",
|
||||
"methods":[{"name":"addRecord","parameterTypes":["java.lang.Object","long","long"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.InvalidPipeException"
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.NullSurfaceData"
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.SunGraphics2D",
|
||||
"fields":[
|
||||
{"name":"clipRegion"},
|
||||
{"name":"composite"},
|
||||
{"name":"eargb"},
|
||||
{"name":"lcdTextContrast"},
|
||||
{"name":"pixel"},
|
||||
{"name":"strokeHint"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.SurfaceData",
|
||||
"fields":[
|
||||
{"name":"pData"},
|
||||
{"name":"valid"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.Blit",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.BlitBg",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.CompositeType",
|
||||
"fields":[
|
||||
{"name":"AnyAlpha"},
|
||||
{"name":"Src"},
|
||||
{"name":"SrcNoEa"},
|
||||
{"name":"SrcOver"},
|
||||
{"name":"SrcOverNoEa"},
|
||||
{"name":"Xor"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.DrawGlyphList",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.DrawGlyphListAA",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.DrawGlyphListLCD",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.DrawLine",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.DrawParallelogram",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.DrawPath",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.DrawPolygons",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.DrawRect",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.FillParallelogram",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.FillPath",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.FillRect",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.FillSpans",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.GraphicsPrimitive",
|
||||
"fields":[{"name":"pNativePrim"}]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.GraphicsPrimitiveMgr",
|
||||
"methods":[{"name":"register","parameterTypes":["sun.java2d.loops.GraphicsPrimitive[]"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.MaskBlit",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.MaskFill",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.ScaledBlit",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.SurfaceType",
|
||||
"fields":[
|
||||
{"name":"Any3Byte"},
|
||||
{"name":"Any4Byte"},
|
||||
{"name":"AnyByte"},
|
||||
{"name":"AnyColor"},
|
||||
{"name":"AnyInt"},
|
||||
{"name":"AnyShort"},
|
||||
{"name":"ByteBinary1Bit"},
|
||||
{"name":"ByteBinary2Bit"},
|
||||
{"name":"ByteBinary4Bit"},
|
||||
{"name":"ByteGray"},
|
||||
{"name":"ByteIndexed"},
|
||||
{"name":"ByteIndexedBm"},
|
||||
{"name":"FourByteAbgr"},
|
||||
{"name":"FourByteAbgrPre"},
|
||||
{"name":"Index12Gray"},
|
||||
{"name":"Index8Gray"},
|
||||
{"name":"IntArgb"},
|
||||
{"name":"IntArgbBm"},
|
||||
{"name":"IntArgbPre"},
|
||||
{"name":"IntBgr"},
|
||||
{"name":"IntRgb"},
|
||||
{"name":"IntRgbx"},
|
||||
{"name":"OpaqueColor"},
|
||||
{"name":"ThreeByteBgr"},
|
||||
{"name":"Ushort4444Argb"},
|
||||
{"name":"Ushort555Rgb"},
|
||||
{"name":"Ushort555Rgbx"},
|
||||
{"name":"Ushort565Rgb"},
|
||||
{"name":"UshortGray"},
|
||||
{"name":"UshortIndexed"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.TransformHelper",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","sun.java2d.loops.SurfaceType","sun.java2d.loops.CompositeType","sun.java2d.loops.SurfaceType"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.loops.XORComposite",
|
||||
"fields":[
|
||||
{"name":"alphaMask"},
|
||||
{"name":"xorColor"},
|
||||
{"name":"xorPixel"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.pipe.Region",
|
||||
"fields":[
|
||||
{"name":"bands"},
|
||||
{"name":"endIndex"},
|
||||
{"name":"hix"},
|
||||
{"name":"hiy"},
|
||||
{"name":"lox"},
|
||||
{"name":"loy"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.pipe.RegionIterator",
|
||||
"fields":[
|
||||
{"name":"curIndex"},
|
||||
{"name":"numXbands"},
|
||||
{"name":"region"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.xr.XRBackendNative",
|
||||
"fields":[
|
||||
{"name":"FMTPTR_A8"},
|
||||
{"name":"FMTPTR_ARGB32"},
|
||||
{"name":"MASK_XIMG"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.xr.XRSurfaceData",
|
||||
"fields":[
|
||||
{"name":"picture"},
|
||||
{"name":"xid"}
|
||||
]
|
||||
}
|
||||
]
|
||||
8
app/trace/predefined-classes-config.json
Normal file
8
app/trace/predefined-classes-config.json
Normal file
@@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"type":"agent-extracted",
|
||||
"classes":[
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
2
app/trace/proxy-config.json
Normal file
2
app/trace/proxy-config.json
Normal file
@@ -0,0 +1,2 @@
|
||||
[
|
||||
]
|
||||
4645
app/trace/reachability-metadata.json
Normal file
4645
app/trace/reachability-metadata.json
Normal file
File diff suppressed because it is too large
Load Diff
371
app/trace/reflect-config.json
Normal file
371
app/trace/reflect-config.json
Normal file
@@ -0,0 +1,371 @@
|
||||
[
|
||||
{
|
||||
"name":"[Lcom.jme3.app.state.AppState;"
|
||||
},
|
||||
{
|
||||
"name":"[Lcom.jme3.app.state.ConstantVerifierState$Checker;"
|
||||
},
|
||||
{
|
||||
"name":"[Lcom.jme3.input.RawInputListener;"
|
||||
},
|
||||
{
|
||||
"name":"[Lcom.jme3.material.MatParamOverride;"
|
||||
},
|
||||
{
|
||||
"name":"[Lcom.jme3.scene.Spatial;"
|
||||
},
|
||||
{
|
||||
"name":"[Lcom.jme3.scene.VertexBuffer;"
|
||||
},
|
||||
{
|
||||
"name":"[Lcom.jme3.scene.control.Control;"
|
||||
},
|
||||
{
|
||||
"name":"[Ljava.awt.event.MouseMotionListener;"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.asset.cache.SimpleAssetCache",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.asset.cache.WeakRefCloneAssetCache",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.asset.plugins.ClasspathLocator",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.audio.lwjgl.LwjglAL",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.audio.lwjgl.LwjglALC",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.audio.lwjgl.LwjglEFX",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.audio.plugins.OGGLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.audio.plugins.WAVLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.cursors.plugins.CursorLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.export.binary.BinaryLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.font.plugins.BitmapFontLoader",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.material.TechniqueDef",
|
||||
"methods":[{"name":"clone","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.material.logic.DefaultTechniqueDefLogic",
|
||||
"methods":[{"name":"<init>","parameterTypes":["com.jme3.material.TechniqueDef"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.material.plugins.J3MLoader",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.material.plugins.ShaderNodeDefinitionLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.math.ColorRGBA",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.MTLLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.OBJLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.fbx.FbxLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.gltf.BinLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.gltf.GlbLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.gltf.GltfLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.ogre.MaterialLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.ogre.MeshLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.ogre.SceneLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.scene.plugins.ogre.SkeletonLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.shader.plugins.GLSLLoader",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.system.JmeDesktopSystem",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.system.JmeDialogsFactoryImpl",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.system.lwjgl.LwjglDisplay",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.texture.TextureProcessor",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
|
||||
{
|
||||
"name":"com.jme3.texture.plugins.DDSLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.texture.plugins.HDRLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.texture.plugins.PFMLoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.texture.plugins.TGALoader"
|
||||
},
|
||||
{
|
||||
"name":"com.jme3.util.LWJGLBufferAllocator$ConcurrentLWJGLBufferAllocator",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.awt.SequencedEvent"
|
||||
},
|
||||
{
|
||||
"name":"java.awt.event.KeyEvent",
|
||||
"fields":[
|
||||
{"name":"VK_A"},
|
||||
{"name":"VK_BACK_SLASH"},
|
||||
{"name":"VK_BACK_SPACE"},
|
||||
{"name":"VK_C"},
|
||||
{"name":"VK_CONTEXT_MENU"},
|
||||
{"name":"VK_COPY"},
|
||||
{"name":"VK_CUT"},
|
||||
{"name":"VK_DELETE"},
|
||||
{"name":"VK_DOWN"},
|
||||
{"name":"VK_END"},
|
||||
{"name":"VK_ENTER"},
|
||||
{"name":"VK_ESCAPE"},
|
||||
{"name":"VK_F10"},
|
||||
{"name":"VK_H"},
|
||||
{"name":"VK_HOME"},
|
||||
{"name":"VK_INSERT"},
|
||||
{"name":"VK_KP_DOWN"},
|
||||
{"name":"VK_KP_LEFT"},
|
||||
{"name":"VK_KP_RIGHT"},
|
||||
{"name":"VK_KP_UP"},
|
||||
{"name":"VK_LEFT"},
|
||||
{"name":"VK_O"},
|
||||
{"name":"VK_PAGE_DOWN"},
|
||||
{"name":"VK_PAGE_UP"},
|
||||
{"name":"VK_PASTE"},
|
||||
{"name":"VK_RIGHT"},
|
||||
{"name":"VK_SLASH"},
|
||||
{"name":"VK_SPACE"},
|
||||
{"name":"VK_UP"},
|
||||
{"name":"VK_V"},
|
||||
{"name":"VK_X"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.nio.Buffer",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.ByteBuffer",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectByteBuffer",
|
||||
"allDeclaredFields":true,
|
||||
"unsafeAllocated":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectCharBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectDoubleBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectFloatBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectIntBufferU",
|
||||
"allDeclaredFields":true,
|
||||
"unsafeAllocated":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectLongBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.DirectShortBufferU",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.nio.MappedByteBuffer",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"java.security.AccessController"
|
||||
},
|
||||
{
|
||||
"name":"java.security.MessageDigestSpi"
|
||||
},
|
||||
{
|
||||
"name":"javax.imageio.spi.ImageReaderSpi"
|
||||
},
|
||||
{
|
||||
"name":"javax.imageio.spi.ImageReaderWriterSpi",
|
||||
"methods":[
|
||||
{"name":"getFileSuffixes","parameterTypes":[] },
|
||||
{"name":"getFormatNames","parameterTypes":[] },
|
||||
{"name":"getMIMETypes","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"javax.imageio.spi.ImageWriterSpi"
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.basic.BasicListUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.basic.BasicPanelUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.basic.BasicPopupMenuUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.basic.BasicRootPaneUI",
|
||||
"methods":[{"name":"loadActionMap","parameterTypes":["javax.swing.plaf.basic.LazyActionMap"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.basic.BasicViewportUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.metal.MetalButtonUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.metal.MetalCheckBoxUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.metal.MetalComboBoxUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.metal.MetalLabelUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.metal.MetalRootPaneUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.metal.MetalScrollBarUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.metal.MetalScrollPaneUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"javax.swing.plaf.metal.MetalTextFieldUI",
|
||||
"methods":[{"name":"createUI","parameterTypes":["javax.swing.JComponent"] }]
|
||||
},
|
||||
{
|
||||
"name":"org.lwjgl.system.CallbackI",
|
||||
"methods":[{"name":"callback","parameterTypes":["long","long"] }]
|
||||
},
|
||||
{
|
||||
"name":"org.lwjgl.system.CustomBuffer",
|
||||
"fields":[
|
||||
{"name":"capacity"},
|
||||
{"name":"container"},
|
||||
{"name":"limit"},
|
||||
{"name":"mark"},
|
||||
{"name":"position"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"org.lwjgl.system.Pointer$Default",
|
||||
"fields":[{"name":"address"}]
|
||||
},
|
||||
{
|
||||
"name":"org.lwjgl.system.jemalloc.JEmallocAllocator",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11.XToolkit",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11FontManager",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.awt.X11GraphicsEnvironment",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.java2d.marlin.DMarlinRenderingEngine",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.misc.Unsafe",
|
||||
"allDeclaredFields":true
|
||||
},
|
||||
{
|
||||
"name":"sun.security.provider.SHA",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name": "com.jme3.texture.plugins.SVGLoader"
|
||||
},
|
||||
{
|
||||
"name": "org.ngengine.webp.WebPLoader"
|
||||
},
|
||||
{
|
||||
"name": "com.jme3.texture.plugins.StbImageLoader"
|
||||
},
|
||||
{
|
||||
"name": "com.jme3.texture.plugins.AWTLoader"
|
||||
}
|
||||
]
|
||||
1
app/trace/resource-config.json
Normal file
1
app/trace/resource-config.json
Normal file
File diff suppressed because one or more lines are too long
8
app/trace/serialization-config.json
Normal file
8
app/trace/serialization-config.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"types":[
|
||||
],
|
||||
"lambdaCapturingTypes":[
|
||||
],
|
||||
"proxies":[
|
||||
]
|
||||
}
|
||||
11
dev-logging.properties
Normal file
11
dev-logging.properties
Normal file
@@ -0,0 +1,11 @@
|
||||
# Global logging level - set to a higher threshold
|
||||
.level = INFO
|
||||
|
||||
# Handler (console or file)
|
||||
handlers = java.util.logging.ConsoleHandler
|
||||
java.util.logging.ConsoleHandler.level = FINEST
|
||||
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
||||
|
||||
# Set FINEST logging only for org.ngengine.nostr4j and its children
|
||||
org.ngengine.nostr4j.level = INFO
|
||||
org.ngengine.level = FINE
|
||||
8
gradle.properties
Normal file
8
gradle.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
org.gradle.configuration-cache=false
|
||||
|
||||
ngeVersion=0.0.0-SNAPSHOT
|
||||
version=1.0.0
|
||||
projectName=ngeapp
|
||||
mainClass=org.example.NGEAppMain
|
||||
copyright=Copyright (c) 2025
|
||||
javaOptions=
|
||||
10
gradle/libs.versions.toml
Normal file
10
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
# This file was generated by the Gradle 'init' task.
|
||||
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
|
||||
|
||||
[versions]
|
||||
guava = "33.3.1-jre"
|
||||
junit = "4.13.2"
|
||||
|
||||
[libraries]
|
||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||
junit = { module = "junit:junit", version.ref = "junit" }
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
251
gradlew
vendored
Executable file
251
gradlew
vendored
Executable file
@@ -0,0 +1,251 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
94
gradlew.bat
vendored
Normal file
94
gradlew.bat
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
7
settings.gradle
Normal file
7
settings.gradle
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
plugins {
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.9.0'
|
||||
}
|
||||
|
||||
rootProject.name = settings.projectName
|
||||
include('app')
|
||||
Reference in New Issue
Block a user