Преглед изворни кода

Update project_creation.adoc with some Gradle info

Rickard Edén пре 2 година
родитељ
комит
470700385e
1 измењених фајлова са 19 додато и 3 уклоњено
  1. 19 3
      docs/modules/sdk/pages/project_creation.adoc

+ 19 - 3
docs/modules/sdk/pages/project_creation.adoc

@@ -10,7 +10,8 @@ The jMonkeyEngine SDK makes it easy to get started with developing 3-D games bas
 == Creating a New jMonkeyEngine Project
 
 .  Choose `menu:File[New Project]` from the main menu.
-.  In the New Project Wizard, select the template `menu:JME3[Basic Game (with Ant)]`.
+.  In the New Project Wizard, select a template `menu:JME3[Basic Game (with Gradle)]` or `menu:JME3[Basic Game (with Ant)]`.
+.  Gradle is the recommended build system since 3.6 (although there may still be many references to Ant projects, and they still work fine).
 .  Click next to specify a project name, and the path where to store your new project.
 .  Click Finish. A skeleton application is created and opens in the Project Explorer.
 **  This basic jme3 application is based on the SimpleApplication class to allow an easy start with jme3.
@@ -48,8 +49,10 @@ This is the recommended internal structure:
 **  `assets/Textures`
 
 *  *src* – This directory corresponds to the Source Packages node. Your sources code goes here.
-*  *nbproject* – This is meta data used by the jMonkeyEngine SDK (don't edit).
-*  *build.xml* – This is an Ant build script that is hooked up to the clean/build/run/test actions in the jMonkeyEngine SDK. It loads a default build script, and allows you to further customize the build process. The Ant script also assures that you are able to clean/build/run/test your application outside of the jMonkeyEngine SDK – e.g. from the command line.
+*  *nbproject* – (Ant only) This is meta data used by the jMonkeyEngine SDK (don't edit).
+*  *build.xml* – (Ant only) This is an Ant build script that is hooked up to the clean/build/run/test actions in the jMonkeyEngine SDK. It loads a default build script, and allows you to further customize the build process. The Ant script also assures that you are able to clean/build/run/test your application outside of the jMonkeyEngine SDK – e.g. from the command line.
+*  *build.gradle* – (Gradle only) This is the gradle build script that will build your app.
+*  *settings.gradle*  – (Gradle only) This contains some properties of your project, like the name, and asset folder.
 *  *build* – This directory contains the compiled classes. (Will be generated by the jMonkeyEngine SDK when you build the project.)
 *  *dist* – This directory contains the executable JAR files. (Will be generated by the jMonkeyEngine SDK when you build the project.)
 *  *test* – The jMonkeyEngine SDK will store JUnit tests here if you create any. (Optional.)
@@ -120,6 +123,18 @@ FIXME
 
 You may want to use external Java libraries in your jME project, for example content generators or artificial intelligence implementations.
 
+==== Gradle based projects:
+
+For gradle projects, you usually don't download a .jar beforehand. Instead, you speficy the library as a dependency, and gradle will download it.
+
+*  Open `Build Scripts/build.gradle`.
+*  Find `dependencies`.
+*  Add the library as a classpath. You can usually find the definition at link:https://mvnrepository.com[Maven Central], if it's a common java library.
+
+More info: link:https://docs.gradle.org/current/userguide/declaring_dependencies.html[https://docs.gradle.org/current/userguide/declaring_dependencies.html]
+
+==== Ant based projects:
+
 Add the library to the global library list:
 
 *  Select menu:Tools[Libraries] in the main menu.
@@ -135,6 +150,7 @@ Add the library to a project:
 *  Select "`Libraries`" on the left and then press "`Add Library`".
 *  Select the library from the list and press btn:[OK].
 
+
 That's it, your project can now use the external library. If you also linked the javadoc and sources, the SDK will assist you with javadoc popups, code completion (kbd:[Ctrl]+kbd:[Space]) and source navigation (kbd:[Ctrl]+btn:[LMB] ).