Forráskód Böngészése

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)

MeFisto94 5 éve
szülő
commit
4221ce9b9f
3 módosított fájl, 35 hozzáadás és 27 törlés
  1. 25 25
      build.gradle
  2. 6 2
      build_engine.sh
  3. 4 0
      docs/building.md

+ 25 - 25
build.gradle

@@ -33,7 +33,7 @@ repositories {
     }
 }
 
-if (System.getenv('TRAVIS') != null) {
+/*if (System.getenv('TRAVIS') != null) {
     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
         // v3.3.0-stable-sdk1 becomes 3.3.0-stable
         // Intentionally not using lastIndexOf here, we want the second "-".
@@ -69,7 +69,7 @@ if (System.getenv('TRAVIS') != null) {
 	
 	// This is the engine version that will be used per default on every regular commit
 	ext.jmeEngineVersion = "3.3.0" + ext.branchSpec + "-SNAPSHOT"
-}
+}*/
 
 configurations {
     corelibs
@@ -84,31 +84,31 @@ dependencies {
     corelibs dep("com.badlogicgames.gdx:gdx-ai:1.8.1", true, true)
     corelibs dep("javax.help:javahelp:2.0.05", false, false)
 
-    corelibs dep("org.jmonkeyengine:jme3-core:$jmeEngineVersion", true, true)
-    corelibs dep("org.jmonkeyengine:jme3-desktop:$jmeEngineVersion", true, true)
-    corelibs dep("org.jmonkeyengine:jme3-lwjgl:$jmeEngineVersion", true, true)
-    corelibs dep("org.jmonkeyengine:jme3-effects:$jmeEngineVersion", true, true)
-    corelibs dep("org.jmonkeyengine:jme3-blender:$jmeEngineVersion", true, true)
+    corelibs dep("org.jmonkeyengine:jme3-core", false, false)
+    corelibs dep("org.jmonkeyengine:jme3-desktop", false, false)
+    corelibs dep("org.jmonkeyengine:jme3-lwjgl", false, false)
+    corelibs dep("org.jmonkeyengine:jme3-effects", false, false)
+    corelibs dep("org.jmonkeyengine:jme3-blender", false, false)
 
-    corelibs dep("org.jmonkeyengine:jme3-bullet:$jmeEngineVersion", true, true)
-    corelibs dep("org.jmonkeyengine:jme3-bullet-native:$jmeEngineVersion", true, true)
+    corelibs dep("org.jmonkeyengine:jme3-bullet", false, false)
+    corelibs dep("org.jmonkeyengine:jme3-bullet-native", false, false)
     corelibs dep(fileTree("lib"), false, false)
-    corelibs dep("org.jmonkeyengine:jme3-jogg:$jmeEngineVersion", true, true)
-
-    corelibs dep("org.jmonkeyengine:jme3-networking:$jmeEngineVersion", true, true)
-    corelibs dep("org.jmonkeyengine:jme3-niftygui:$jmeEngineVersion", true, true)
-    corelibs dep("org.jmonkeyengine:jme3-plugins:$jmeEngineVersion", true, true)
-    corelibs dep("org.jmonkeyengine:jme3-terrain:$jmeEngineVersion", true, true)
-
-    optlibs dep("org.jmonkeyengine:jme3-jbullet:$jmeEngineVersion", true, true)
-    optlibs dep("org.jmonkeyengine:jme3-jogl:$jmeEngineVersion", true, true)
-    optlibs dep("org.jmonkeyengine:jme3-android:$jmeEngineVersion", true, true)
-    optlibs dep("org.jmonkeyengine:jme3-ios:$jmeEngineVersion", true, true)
-    optlibs dep("org.jmonkeyengine:jme3-android-native:$jmeEngineVersion", true, true)
-    optlibs dep("org.jmonkeyengine:jme3-bullet-native-android:$jmeEngineVersion", true, true)
-    testdatalibs dep("org.jmonkeyengine:jme3-testdata:$jmeEngineVersion", false, false)
-
-    examplelibs dep("org.jmonkeyengine:jme3-examples:$jmeEngineVersion", false, true)
+    corelibs dep("org.jmonkeyengine:jme3-jogg", false, false)
+
+    corelibs dep("org.jmonkeyengine:jme3-networking", false, false)
+    corelibs dep("org.jmonkeyengine:jme3-niftygui", false, false)
+    corelibs dep("org.jmonkeyengine:jme3-plugins", false, false)
+    corelibs dep("org.jmonkeyengine:jme3-terrain", false, false)
+
+    optlibs dep("org.jmonkeyengine:jme3-jbullet", false, false)
+    optlibs dep("org.jmonkeyengine:jme3-jogl", false, false)
+    optlibs dep("org.jmonkeyengine:jme3-android", false, false)
+    optlibs dep("org.jmonkeyengine:jme3-ios", false, false)
+    optlibs dep("org.jmonkeyengine:jme3-android-native", false, false)
+    optlibs dep("org.jmonkeyengine:jme3-bullet-native-android", false, false)
+    testdatalibs dep("org.jmonkeyengine:jme3-testdata", false, false)
+
+    examplelibs dep("org.jmonkeyengine:jme3-examples", false, false)
 
 }
 

+ 6 - 2
build_engine.sh

@@ -21,7 +21,11 @@ fi
 #echo "Patching the Engine...."
 #patch -s -N -p 1 < ../patches/FixHWSkinningSerialization.diff
 
-echo "Building the Engine and installing them to your local maven repo...."
-./gradlew -PbuildJavaDoc=true install # Depends on jarJavadoc, jarSourcecode, assemble, dist etc.
+# Remark: We don't build the engine from here anymore but instead use https://docs.gradle.org/current/userguide/composite_builds.html,
+# 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
+# download the engine. Nothing a windows user couldn't do by hand.
+
+#echo "Building the Engine and installing them to your local maven repo...."
+# ./gradlew -PbuildJavaDoc=true install # Depends on jarJavadoc, jarSourcecode, assemble, dist etc.
 
 cd ../

+ 4 - 0
docs/building.md

@@ -4,6 +4,10 @@ It's not really a big process but you should be familiar with the command line a
 We will skip the process of cloning the repo/downloading the zip, as the net is full of examples about this.  
 
 ## Defining the Engine Version  
+Note: The following explanation is somewhat outdate: We cannot download the Engine as Maven Dependency, as that misses critical stuff like jbullet.jar.
+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)
+The engine will be downloaded into an `engine` directory, so care about editing this repository, when trying to use a specific engine version.
+
 As the SDK has been split apart from the Engine Core, it simply downloads it as a dependency.  
 This comes in handy when it comes to build time however you're most likely unable to check your own engine changes.