Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Gradle upgrade to 5.4 causes build failure #118

Open
sandeep-khanna opened this issue Jul 2, 2019 · 3 comments
Open

Gradle upgrade to 5.4 causes build failure #118

sandeep-khanna opened this issue Jul 2, 2019 · 3 comments

Comments

@sandeep-khanna
Copy link

Environment

Java

openjdk 11.0.3 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu219.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu219.04.1, mixed mode, sharing)

GWT

2.8.2

GWT Gradle Plugin

0.6

Receiving the following error after upgrading Gradle from version 4.8.1 to 5.4.1

java.lang.NoSuchMethodError: org.gradle.api.tasks.SourceSetOutput.getClassesDir()Ljava/io/File;
10:12:21.117 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at de.richsource.gradle.plugins.gwt.GwtBasePlugin$5$3.call(GwtBasePlugin.java:263)
10:12:21.117 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at de.richsource.gradle.plugins.gwt.GwtBasePlugin$5$3.call(GwtBasePlugin.java:260)
10:12:21.117 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.util.GUtil.uncheckedCall(GUtil.java:459)
10:12:21.118 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.extensibility.ConventionAwareHelper$2.doGetValue(ConventionAwareHelper.java:77)
10:12:21.118 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.extensibility.ConventionAwareHelper$MappedPropertyImpl.getValue(ConventionAwareHelper.java:121)
10:12:21.118 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.extensibility.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:104)
10:12:21.118 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at de.richsource.gradle.plugins.gwt.GwtCompile_Decorated.getClasspath(Unknown Source)
10:12:21.119 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Is the solution some local workaround or an update to the gwt-gradle-plugin?

@jnehlmeier
Copy link

This project is unmaintained. The method SourceSetOutput.getClassesDir() has been deprecated in Gradle 4.x and removed in Gradle 5.x. Thus you see the error.

In case you want to fix the plugin yourself, the code should use SourceSetOutput.getClassesDirs().

@sandeep-khanna
Copy link
Author

Understood that the project is unmaintained. I agree with your code fix and was trying to set this up locally and ran in to other Gradle build issues while trying to upgrade from Gradle version 2.4 to 5.4.1

Should I submit a merge/pull request with the code change or is there another GWT Gradle plugin that you would recommend using?

@jnehlmeier
Copy link

I guess these should work with Gradle 5:

https://github.com/jiakuan/gwt-gradle-plugin
https://github.com/Putnami/putnami-gradle-plugin

The first one is a direct fork of this project and fixed some stuff.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants