Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upLibGDX project doesn't build with Gradle version over 2.9 #4230
Comments
|
That information is what the setup tool uses to generate new projects, not the LibGDX gradle build. There is no wrapper pushed for LibGDX source itself, but running with gradle version 2.5 is fine. It will get updated eventually, what features are you wanting to use from 2.9? |
|
Ok. None in particular, I just wanted to raise awareness about this limitation in case anybody tries to build it with a current Gradle version and comes across this issue. 3.0 is apparently going to be relased soon and comes with important performance improvements. May be a good time to update, it takes ages to build on my laptop... :( |
|
Ok, yeah the updates are infrequent because its such a pita, some plugins always breaks, and if we are lucky its in an obvious way. Then its testing on all IDEs and platforms to see if they are also behaving. |
|
Just for reference, I also stumbled on this It is caused by the structure of the libGDX source project (or, in a more snarky way, by the Android plugin adding arbitrary constraints in newer versions): from version 1.3 onward, it seems the Android Gradle plugin doesn’t like when a submodule and its parent share the same name (actually, group + name), like :extensions:gdx-box2d:gdx-box2d, or :extensions:gdx-controllers:gdx-controllers. It doesn’t seem this check can be bypassed, so if the plugin is to be updated one day, some renaming or restructuring for those two modules would unfortunately appear necessary. : ( Some additional information on the subject: http://stackoverflow.com/a/33531721 |
|
With Android Studio strongly recommending updating to Gradle 2.14.1+ (and Android plugin 2.1.3) at every Gradle project sync, which of course breaks the build, this should probably be addressed soon. |
When trying to build the libGDX project from source using a Gradle version higher than 2.9 the following error message appears:
Error:Gradle version 2.2 is required. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in /XXXXXX/git/libgdx/gradle/wrapper/gradle-wrapper.properties to gradle-2.2-all.zip.This is because of a limitation on the version of the Android Gradle plugin (com.android.tools.build:gradle) that is set to 1.2.3. The fix to support Gradle 2.10+ was introduced on version 1.5.0 of the Android plugin (this is the fix https://android.googlesource.com/platform/tools/base/+/b96ce169b385d006cfccc4c9f1e54ab47140f59d).
But if we set the com.android.tools.build:gradle version to 1.5.0 a new error appears this time:
`Error:(272, 0) Your project contains 2 or more modules with the same identification com.badlogicgames.gdx:gdx-box2d
at ":extensions:gdx-box2d" and ":extensions:gdx-box2d:gdx-box2d".
You must use different identification (either name or group) for each modules.
Open File``
This error also appears just by setting the com.android.tools.build:gradle version to 1.3.0.
So, if I haven't made a mistake on my tests of course, libGDX is currently stuck on pretty old versions of Gradle and Android Gradle plugin versions until a fix for the box2d modules is found.
Also it looks like the information on the versions page regarding the Android Gradle plugin is not correct https://libgdx.badlogicgames.com/versions.html.