Gradle Failed to Build

Dear Support I am trying to jar decompiler but I am having this error from Gradle:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/gerald/jd-gui/build.gradle' line: 15

* What went wrong:
A problem occurred evaluating root project 'jd-gui'.
> Failed to apply plugin class 'com.netflix.gradle.plugins.packaging.SystemPackagingBasePlugin'.
   > Could not create an instance of type com.netflix.gradle.plugins.packaging.ProjectPackagingExtension.
      > Could not find matching constructor for: org.gradle.api.internal.file.copy.DefaultCopySpec(org.gradle.api.internal.file.BaseDirFileResolver, org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

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.0.1/userguide/command_line_interface.html#sec:command_line_warnings

No support here, just fellow Gradle users.

Almost any Gradle project should have the 4 Gradle wrapper files checked in, and jd-gui also has.
It defines that the jd-gui build is designed for and working with Gradle 5.2.1.
But you try to run it with Gradle 8.0.1, so you shouldn’t wonder that it blows up.
Do not use any installed Gradle version to run a Gradle build, but always use the Gradle wrapper gradlew coming with the project, which then automatically provisions and uses the right Gradle version. You do not have to have any Gradle version installed for that, just a compatible Java version.

(I’m not support either.). I ran into the identical error while building my own project. Since I didn’t find a solution out there on the web, I wanted to respond. The fix for me was that I needed to switch from using plugin ‘nebula.ospackage’ to plugin ‘com.netflix.nebula.ospackage’, at a recent version.

1 Like