Search code examples
gradlegwtlibgdxgradlew

libGDX - Failed to notify project evaluation listener


When trying to build my libGDX game for HTML, or running :superDev I get this error :

Configure project :html
GWT version is < 2.5 -> additional dependencies are not added.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come   from your own scripts or plugins.

See https://docs.gradle.org/8.1/userguide/command_line_interface.html#sec:command_line_warnings

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':html'.
Failed to notify project evaluation listener.
org/gradle/api/internal/artifacts/dsl/dependencies/DependencyFactory$ClassPathNotation`

I can't even run gradle html:clean without this error occurring.

When trying to debug this I updated my version of gradle which caused more things to break, like gradle desktop:run unless I completely comment out the html build actions and configs from gradle.

Here are my build.gradle dependencies :

 dependencies {
    classpath 'com.badlogicgames.gdx:gdx-tools:1.11.0'
    classpath 'org.wisepersist:gwt-gradle-plugin:1.1.19'
    classpath 'org.gretty:gretty:3.0.7'
    classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.16'
    classpath 'com.android.tools.build:gradle:3.6.1'
    classpath 'com.google.gms:google-services:4.3.2'
}

Searching for similar issues has not turned up anything besides aligning the SDK versions which doesn't really make sense here. I went ahead and tried aligning the gdxVersion/gwtVersion between the html/build.gradle and root build.gradle.

../build.gradle

..
allprojects {
apply plugin: "eclipse"

version = '1.0'
ext {
    appName = "tileShipGame"
    gdxVersion = '1.11.0'
    roboVMVersion = '2.3.16'
    box2DLightsVersion = '1.5'
    ashleyVersion = '1.7.4'
    aiVersion = '1.8.2'
    gdxControllersVersion = '2.2.1'
}
..

../html/build.gradle

gwt {
gwtVersion='1.11.0' // Should match the gwt version used for building the gwt backend
...

This only introduced the additional error line GWT version is < 2.5 -> additional dependencies are not added.. Not sure where that 2.5v is coming from.
The solutions for updating the build dependencies all revolve around android studio, and have nothing to do with the HTML build, and I can't find a way to transmute that solution to the HTML build.

I tried building a fresh new project to see if the issue was unique to my own build and found that after removing the mavenLocal() repository it also built with the same error.

The only thing I can think of is my GWT version needs to be changed, but that doesn't seem to be a part of the project? Any ideas what could be going wrong?


Solution

  • Answering my own question for posterity :

    Turns out I have multiple issues with my local build and was able to fix the listener issue by, surprise downgrading my Gradle version

    gradle/wrapper/gradle-wrapper.properties

    #distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
    distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
    

    Unfortunately not the end for me, but it got me moving to the next error. Good luck!

    Note: The gradle shell confirms this as it is still on a later 8 version and reproduces the issue. If you're wanting to use the shell then you'll need to use the in-project wrapper

    C:\MyProject> ./gradlew html:build