Skip to content

Commit 4221ce9

Browse files
committed
Build: Fix a design problem. Before this we used to install the engine into the local maven repository. This had several flaws: Apart from spamming the developers mavenLocal repository with thousands(!) of engine versions, it was hard to predict the actual engine version to use. This is because with Pull Requests or Tags and different Branches the names changed, especially when both the engine and the sdk had a tag. Controlling the engine version is now only controlled by the TRAVIS_TAG ENV-Var or manually on the engine repo (where usually master is cloned otherwise)
1 parent adec749 commit 4221ce9

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

build.gradle

+25-25
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repositories {
3333
}
3434
}
3535

36-
if (System.getenv('TRAVIS') != null) {
36+
/*if (System.getenv('TRAVIS') != null) {
3737
if (System.env.TRAVIS_TAG != null && System.env.TRAVIS_TAG != "") { // Strangely it has to be both, because it's sometimes set as TRAVIS_TAG="" when we're in travis but no tag is set
3838
// v3.3.0-stable-sdk1 becomes 3.3.0-stable
3939
// Intentionally not using lastIndexOf here, we want the second "-".
@@ -69,7 +69,7 @@ if (System.getenv('TRAVIS') != null) {
6969
7070
// This is the engine version that will be used per default on every regular commit
7171
ext.jmeEngineVersion = "3.3.0" + ext.branchSpec + "-SNAPSHOT"
72-
}
72+
}*/
7373

7474
configurations {
7575
corelibs
@@ -84,31 +84,31 @@ dependencies {
8484
corelibs dep("com.badlogicgames.gdx:gdx-ai:1.8.1", true, true)
8585
corelibs dep("javax.help:javahelp:2.0.05", false, false)
8686

87-
corelibs dep("org.jmonkeyengine:jme3-core:$jmeEngineVersion", true, true)
88-
corelibs dep("org.jmonkeyengine:jme3-desktop:$jmeEngineVersion", true, true)
89-
corelibs dep("org.jmonkeyengine:jme3-lwjgl:$jmeEngineVersion", true, true)
90-
corelibs dep("org.jmonkeyengine:jme3-effects:$jmeEngineVersion", true, true)
91-
corelibs dep("org.jmonkeyengine:jme3-blender:$jmeEngineVersion", true, true)
87+
corelibs dep("org.jmonkeyengine:jme3-core", false, false)
88+
corelibs dep("org.jmonkeyengine:jme3-desktop", false, false)
89+
corelibs dep("org.jmonkeyengine:jme3-lwjgl", false, false)
90+
corelibs dep("org.jmonkeyengine:jme3-effects", false, false)
91+
corelibs dep("org.jmonkeyengine:jme3-blender", false, false)
9292

93-
corelibs dep("org.jmonkeyengine:jme3-bullet:$jmeEngineVersion", true, true)
94-
corelibs dep("org.jmonkeyengine:jme3-bullet-native:$jmeEngineVersion", true, true)
93+
corelibs dep("org.jmonkeyengine:jme3-bullet", false, false)
94+
corelibs dep("org.jmonkeyengine:jme3-bullet-native", false, false)
9595
corelibs dep(fileTree("lib"), false, false)
96-
corelibs dep("org.jmonkeyengine:jme3-jogg:$jmeEngineVersion", true, true)
97-
98-
corelibs dep("org.jmonkeyengine:jme3-networking:$jmeEngineVersion", true, true)
99-
corelibs dep("org.jmonkeyengine:jme3-niftygui:$jmeEngineVersion", true, true)
100-
corelibs dep("org.jmonkeyengine:jme3-plugins:$jmeEngineVersion", true, true)
101-
corelibs dep("org.jmonkeyengine:jme3-terrain:$jmeEngineVersion", true, true)
102-
103-
optlibs dep("org.jmonkeyengine:jme3-jbullet:$jmeEngineVersion", true, true)
104-
optlibs dep("org.jmonkeyengine:jme3-jogl:$jmeEngineVersion", true, true)
105-
optlibs dep("org.jmonkeyengine:jme3-android:$jmeEngineVersion", true, true)
106-
optlibs dep("org.jmonkeyengine:jme3-ios:$jmeEngineVersion", true, true)
107-
optlibs dep("org.jmonkeyengine:jme3-android-native:$jmeEngineVersion", true, true)
108-
optlibs dep("org.jmonkeyengine:jme3-bullet-native-android:$jmeEngineVersion", true, true)
109-
testdatalibs dep("org.jmonkeyengine:jme3-testdata:$jmeEngineVersion", false, false)
110-
111-
examplelibs dep("org.jmonkeyengine:jme3-examples:$jmeEngineVersion", false, true)
96+
corelibs dep("org.jmonkeyengine:jme3-jogg", false, false)
97+
98+
corelibs dep("org.jmonkeyengine:jme3-networking", false, false)
99+
corelibs dep("org.jmonkeyengine:jme3-niftygui", false, false)
100+
corelibs dep("org.jmonkeyengine:jme3-plugins", false, false)
101+
corelibs dep("org.jmonkeyengine:jme3-terrain", false, false)
102+
103+
optlibs dep("org.jmonkeyengine:jme3-jbullet", false, false)
104+
optlibs dep("org.jmonkeyengine:jme3-jogl", false, false)
105+
optlibs dep("org.jmonkeyengine:jme3-android", false, false)
106+
optlibs dep("org.jmonkeyengine:jme3-ios", false, false)
107+
optlibs dep("org.jmonkeyengine:jme3-android-native", false, false)
108+
optlibs dep("org.jmonkeyengine:jme3-bullet-native-android", false, false)
109+
testdatalibs dep("org.jmonkeyengine:jme3-testdata", false, false)
110+
111+
examplelibs dep("org.jmonkeyengine:jme3-examples", false, false)
112112

113113
}
114114

build_engine.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ fi
2121
#echo "Patching the Engine...."
2222
#patch -s -N -p 1 < ../patches/FixHWSkinningSerialization.diff
2323

24-
echo "Building the Engine and installing them to your local maven repo...."
25-
./gradlew -PbuildJavaDoc=true install # Depends on jarJavadoc, jarSourcecode, assemble, dist etc.
24+
# Remark: We don't build the engine from here anymore but instead use https://docs.gradle.org/current/userguide/composite_builds.html,
25+
# that way we don't have to care about versioning and don't spam the user's mavenLocal Repo. Also you only need this script really to
26+
# download the engine. Nothing a windows user couldn't do by hand.
27+
28+
#echo "Building the Engine and installing them to your local maven repo...."
29+
# ./gradlew -PbuildJavaDoc=true install # Depends on jarJavadoc, jarSourcecode, assemble, dist etc.
2630

2731
cd ../

docs/building.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ It's not really a big process but you should be familiar with the command line a
44
We will skip the process of cloning the repo/downloading the zip, as the net is full of examples about this.
55

66
## Defining the Engine Version
7+
Note: The following explanation is somewhat outdate: We cannot download the Engine as Maven Dependency, as that misses critical stuff like jbullet.jar.
8+
Thus we have the scripts `build_engine.sh` and `fix_engine.sh`, which download and fix the engine install. Currently we use [Gradle Composite Builds](https://docs.gradle.org/current/userguide/composite_builds.html)
9+
The engine will be downloaded into an `engine` directory, so care about editing this repository, when trying to use a specific engine version.
10+
711
As the SDK has been split apart from the Engine Core, it simply downloads it as a dependency.
812
This comes in handy when it comes to build time however you're most likely unable to check your own engine changes.
913

0 commit comments

Comments
 (0)