Skip to content

Commit d0daeaa

Browse files
authored
Merge branch 'master' into wip/issue1290
2 parents 11a5532 + 4dfeeb1 commit d0daeaa

File tree

404 files changed

+1973
-1446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404 files changed

+1973
-1446
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# is running the build.
2727
# >> Configure JAVADOC
2828
# JAVADOC_GHPAGES_REPO="riccardoblsandbox/javadoc.jmonkeyengine.org.git"
29-
# Generate a deloy key
29+
# Generate a deploy key
3030
# ssh-keygen -t rsa -b 4096 -C "[email protected]" -f javadoc_deploy
3131
# Set
3232
# JAVADOC_GHPAGES_DEPLOY_PRIVKEY="......."

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ jMonkeyEngine
44
[![Build Status](https://github.com/jMonkeyEngine/jmonkeyengine/workflows/Build%20jMonkeyEngine/badge.svg)](https://github.com/jMonkeyEngine/jmonkeyengine/actions)
55

66
jMonkeyEngine is a 3-D game engine for adventurous Java developers. It’s open-source, cross-platform, and cutting-edge.
7+
v3.4.0 is the latest stable version of the Engine.
78
v3.3.2 is the latest stable version of the jMonkeyEngine SDK.
89

910
The engine is used by several commercial game studios and computer-science courses. Here's a taste:
@@ -25,6 +26,7 @@ The engine is used by several commercial game studios and computer-science cours
2526
- [Leap](https://gamejolt.com/games/leap/313308)
2627
- [Jumping Jack Flag](http://timealias.bplaced.net/jack/)
2728
- [PapaSpace Flight Simulation](https://www.papaspace.at/)
29+
- [Cubic Nightmare](https://jaredbgreat.itch.io/cubic-nightmare)
2830

2931
## Getting started
3032

build.gradle

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
}
1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:3.5.3'
13+
classpath 'com.android.tools.build:gradle:4.2.0'
1414
classpath 'me.tatarka:gradle-retrolambda:3.7.1'
1515
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.5.1"
1616
}
@@ -21,6 +21,9 @@ allprojects {
2121
mavenCentral()
2222
google()
2323
}
24+
tasks.withType(Jar) {
25+
duplicatesStrategy = 'include'
26+
}
2427
}
2528

2629
// Set the license for IDEs that understand this
@@ -69,7 +72,7 @@ task libDist(dependsOn: subprojects.build, description: 'Builds and copies the e
6972
File sourceFolder = mkdir("$buildDir/libDist/sources")
7073
File javadocFolder = mkdir("$buildDir/libDist/javadoc")
7174
subprojects.each {project ->
72-
if(project.ext.mainClass == ''){
75+
if(!project.hasProperty('mainClassName')){
7376
project.tasks.withType(Jar).each {archiveTask ->
7477
if(archiveTask.classifier == "sources"){
7578
copy {
@@ -97,7 +100,9 @@ task libDist(dependsOn: subprojects.build, description: 'Builds and copies the e
97100
}
98101

99102
task createZipDistribution(type:Zip,dependsOn:["dist","libDist"], description:"Package the nightly zip distribution"){
100-
archiveName "jME" + jmeFullVersion + ".zip"
103+
archiveFileName = provider {
104+
"jME" + jmeFullVersion + ".zip"
105+
}
101106
into("/") {
102107
from {"./dist"}
103108
}
@@ -181,18 +186,18 @@ gradle.rootProject.ext.set("usePrebuildNatives", buildNativeProjects!="true");
181186
if (skipPrebuildLibraries != "true" && buildNativeProjects != "true") {
182187
String rootPath = rootProject.projectDir.absolutePath
183188

184-
Properties nativesSnasphotProp = new Properties()
185-
File nativesSnasphotPropF = new File("${rootPath}/natives-snapshot.properties");
189+
Properties nativesSnapshotProp = new Properties()
190+
File nativesSnapshotPropF = new File("${rootPath}/natives-snapshot.properties");
186191

187-
if (nativesSnasphotPropF.exists()) {
192+
if (nativesSnapshotPropF.exists()) {
188193

189-
nativesSnasphotPropF.withInputStream { nativesSnasphotProp.load(it) }
194+
nativesSnapshotPropF.withInputStream { nativesSnapshotProp.load(it) }
190195

191-
String nativesSnasphot = nativesSnasphotProp.getProperty("natives.snapshot");
192-
String nativesUrl = PREBUILD_NATIVES_URL.replace('${natives.snapshot}', nativesSnasphot)
196+
String nativesSnapshot = nativesSnapshotProp.getProperty("natives.snapshot");
197+
String nativesUrl = PREBUILD_NATIVES_URL.replace('${natives.snapshot}', nativesSnapshot)
193198
println "Use natives snapshot: " + nativesUrl
194199

195-
String nativesZipFile = "${rootPath}" + File.separator + "build" + File.separator + nativesSnasphot + "-natives.zip"
200+
String nativesZipFile = "${rootPath}" + File.separator + "build" + File.separator + nativesSnapshot + "-natives.zip"
196201
String nativesPath = "${rootPath}" + File.separator + "build" + File.separator + "native"
197202

198203

@@ -269,7 +274,7 @@ if (skipPrebuildLibraries != "true" && buildNativeProjects != "true") {
269274
//}
270275

271276
wrapper {
272-
gradleVersion = '5.6.4'
277+
gradleVersion = '6.9.1'
273278
}
274279

275280

common.gradle

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// This file is to be applied to every subproject.
33
//
44

5-
apply plugin: 'java'
5+
apply plugin: 'java-library'
66
apply plugin: 'groovy'
7-
apply plugin: 'maven'
87
apply plugin: 'maven-publish'
98
apply plugin: 'signing'
109

@@ -16,8 +15,7 @@ sourceCompatibility = '1.8'
1615

1716
if(JavaVersion.current() >= JavaVersion.VERSION_1_9) {
1817
compileJava {
19-
options.compilerArgs.addAll(['--release', '8'])
20-
//Replace previous with "options.release = 8" if updated to gradle 6.6 or newer
18+
options.release = 8
2119
}
2220
}
2321

@@ -29,19 +27,16 @@ gradle.projectsEvaluated {
2927

3028
repositories {
3129
mavenCentral()
32-
maven {
33-
url "http://nifty-gui.sourceforge.net/nifty-maven-repo"
34-
}
3530
flatDir {
3631
dirs rootProject.file('lib')
3732
}
3833
}
3934

4035
dependencies {
4136
// Adding dependencies here will add the dependencies to each subproject.
42-
testCompile 'junit:junit:4.13.2'
43-
testCompile 'org.mockito:mockito-core:3.8.0'
44-
testCompile 'org.codehaus.groovy:groovy-all:3.0.7'
37+
testImplementation 'junit:junit:4.13.2'
38+
testImplementation 'org.mockito:mockito-core:3.8.0'
39+
testImplementation 'org.codehaus.groovy:groovy-all:3.0.7'
4540
}
4641

4742

@@ -117,28 +112,12 @@ ext.pomConfig = {
117112
}
118113
}
119114

120-
// workaround to be able to use same custom pom with 'maven' and 'bintray' plugin
121-
task writeFullPom {
122-
ext.pomFile = "$mavenPomDir/${project.name}-${project.version}.pom"
123-
outputs.file pomFile
124-
doLast {
125-
pom {
126-
project pomConfig
127-
}.writeTo(pomFile)
128-
}
129-
}
130-
131-
assemble.dependsOn(writeFullPom)
132-
install.dependsOn(writeFullPom)
133-
uploadArchives.dependsOn(writeFullPom)
134-
135115
artifacts {
136116
archives jar
137117
archives sourcesJar
138118
if (buildJavaDoc == "true") {
139119
archives javadocJar
140120
}
141-
archives writeFullPom.outputs.files[0]
142121
}
143122

144123
publishing {
@@ -190,6 +169,13 @@ publishing {
190169
}
191170
}
192171

172+
publishToMavenLocal.doLast {
173+
println 'published ' + project.getName() + ' to mavenLocal'
174+
}
175+
task('install') {
176+
dependsOn 'publishToMavenLocal'
177+
}
178+
193179
signing {
194180
def signingKey = gradle.rootProject.findProperty('signingKey')
195181
def signingPassword = gradle.rootProject.findProperty('signingPassword')

gradle/wrapper/gradle-wrapper.jar

3.5 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ esac
8282

8383
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
8484

85+
8586
# Determine the Java command to use to start the JVM.
8687
if [ -n "$JAVA_HOME" ] ; then
8788
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -129,6 +130,7 @@ fi
129130
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
132134
JAVACMD=`cygpath --unix "$JAVACMD"`
133135

134136
# We build the pattern for arguments to be converted via cygpath
@@ -154,19 +156,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
154156
else
155157
eval `echo args$i`="\"$arg\""
156158
fi
157-
i=$((i+1))
159+
i=`expr $i + 1`
158160
done
159161
case $i in
160-
(0) set -- ;;
161-
(1) set -- "$args0" ;;
162-
(2) set -- "$args0" "$args1" ;;
163-
(3) set -- "$args0" "$args1" "$args2" ;;
164-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170172
esac
171173
fi
172174

@@ -175,14 +177,9 @@ save () {
175177
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176178
echo " "
177179
}
178-
APP_ARGS=$(save "$@")
180+
APP_ARGS=`save "$@"`
179181

180182
# Collect all arguments for the java command, following the shell quoting and substitution rules
181183
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182184

183-
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184-
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185-
cd "$(dirname "$0")"
186-
fi
187-
188185
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
2929
set APP_BASE_NAME=%~n0
3030
set APP_HOME=%DIRNAME%
3131

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
3235
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
3336
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
3437

@@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
3740

3841
set JAVA_EXE=java.exe
3942
%JAVA_EXE% -version >NUL 2>&1
40-
if "%ERRORLEVEL%" == "0" goto init
43+
if "%ERRORLEVEL%" == "0" goto execute
4144

4245
echo.
4346
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -51,7 +54,7 @@ goto fail
5154
set JAVA_HOME=%JAVA_HOME:"=%
5255
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5356

54-
if exist "%JAVA_EXE%" goto init
57+
if exist "%JAVA_EXE%" goto execute
5558

5659
echo.
5760
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -61,28 +64,14 @@ echo location of your Java installation.
6164

6265
goto fail
6366

64-
:init
65-
@rem Get command-line arguments, handling Windows variants
66-
67-
if not "%OS%" == "Windows_NT" goto win9xME_args
68-
69-
:win9xME_args
70-
@rem Slurp the command line arguments.
71-
set CMD_LINE_ARGS=
72-
set _SKIP=2
73-
74-
:win9xME_args_slurp
75-
if "x%~1" == "x" goto execute
76-
77-
set CMD_LINE_ARGS=%*
78-
7967
:execute
8068
@rem Setup the command line
8169

8270
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8371

72+
8473
@rem Execute Gradle
85-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
8675

8776
:end
8877
@rem End local scope for the variables with windows NT shell

jme3-android-examples/build.gradle

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ android {
4545
}
4646

4747
dependencies {
48-
compile fileTree(dir: 'libs', include: ['*.jar'])
49-
testCompile 'junit:junit:4.12'
50-
compile 'com.android.support:appcompat-v7:28.0.0'
51-
52-
compile project(':jme3-core')
53-
compile project(':jme3-android')
54-
compile project(':jme3-android-native')
55-
compile project(':jme3-effects')
56-
compile project(':jme3-jbullet')
57-
compile project(':jme3-networking')
58-
compile project(':jme3-niftygui')
59-
compile project(':jme3-plugins')
60-
compile project(':jme3-terrain')
61-
compile fileTree(dir: '../jme3-examples/build/libs', include: ['*.jar'], exclude: ['*sources*.*'])
48+
implementation fileTree(dir: 'libs', include: ['*.jar'])
49+
testImplementation 'junit:junit:4.12'
50+
implementation 'com.android.support:appcompat-v7:28.0.0'
51+
52+
implementation project(':jme3-core')
53+
implementation project(':jme3-android')
54+
implementation project(':jme3-android-native')
55+
implementation project(':jme3-effects')
56+
implementation project(':jme3-jbullet')
57+
implementation project(':jme3-networking')
58+
implementation project(':jme3-niftygui')
59+
implementation project(':jme3-plugins')
60+
implementation project(':jme3-terrain')
61+
implementation fileTree(dir: '../jme3-examples/build/libs', include: ['*.jar'], exclude: ['*sources*.*'])
6262
// compile project(':jme3-examples')
6363
}

jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ private boolean checkClassName(String className) {
263263
boolean include = true;
264264
/* check to see if the class in inside the rootPackage package */
265265
if (className.startsWith(rootPackage)) {
266-
/* check to see if the class contains any of the exlusion strings */
266+
/* check to see if the class contains any of the exclusion strings */
267267
for (int i = 0; i < exclusions.size(); i++) {
268268
if (className.contains(exclusions.get(i))) {
269269
Log.d(TAG, "Skipping Class " + className + ". Includes exclusion string: " + exclusions.get(i) + ".");
@@ -364,7 +364,7 @@ public void onTextChanged(CharSequence cs, int startPos, int beforePos, int coun
364364
setSelection(-1);
365365
}
366366

367-
public void afterTextChanged(Editable edtbl) {
367+
public void afterTextChanged(Editable editable) {
368368
}
369369

370370
@Override

0 commit comments

Comments
 (0)