Notes as I'm watching:
Single quotes versus double quotes in gradle:
Single quotes and double quotes mean different things in gradle. As I recall, single quotes means a string literal... no variable substitution. Also, I think if you used single quotes for the dependencies with the range expansion then it wouldn't expand the range. You used var substitution in yours but some folks also do:
"org.jmonkeyengine:jme3-core" + jmeVersion
...which I'm 99% sure wouldn't work as:
'org.jmonkeyengine:jme3-core' + jmeVersion
...because the [3.1,) won't get expanded.
...that could be superstition though.
Suffice it to say that single quotes and double quotes are different. When single quotes doesn't work for something then try double quotes.
jme3-core is the core library.
jme3-desktop is what you need to run on desktop (as opposed to mobile).
For most people, the next immediate step would be to have assets. Adding an assets folder that compiles to an assets.jar turns out to be pretty simple with some gradle tricks.
Gradle supports the idea of subprojects that have no actual project file. (ie: no build.gradle of their own).
To do this:
- Create the assets directory
- Open the project's settings.gradle and add include 'assets'
- Edit the project's build.gradle file and add:
apply plugin: "java"
buildDir = rootProject.file("build/assets")
That tells gradle about the assets subproject.
Now in your project's dependencies include:
...to include the assets.jar file as a runtime dependency.
Now if you were to package up your application then it will also include the assets.jar file.
As per another thread, a full project example can be found here with assets support: