Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Gradle to at least 7.3 #1661

Closed
yhtMinceraft1010X opened this issue Feb 13, 2022 · 3 comments · Fixed by #1780
Closed

Upgrade Gradle to at least 7.3 #1661

yhtMinceraft1010X opened this issue Feb 13, 2022 · 3 comments · Fixed by #1780
Assignees

Comments

@yhtMinceraft1010X
Copy link
Contributor

yhtMinceraft1010X commented Feb 13, 2022

What feature(s) would you like to see in RepoSense?

As mentioned in #1635, Gradle 5.2.1 doesn't support Java 17. There is thus a need to move to a minimum of Gradle 7.3 since that is the first Gradle version to support Java 17.

If applicable, describe alternatives you've considered

Gradle has also released 7.4 very recently. This version also incorporates the latest mitigation for the log4j vulnerability. I suggest going straight for 7.4 if possible.
Gradle has released 7.4.1 recently. I suggest going straight for it.

Update
There are 3 issues described below that may not be easy to solve if we are to jump straight to 7.4 or even 7.3. In the meantime, I will try to upgrade Gradle to 6.9.2.

@gerhean
Copy link
Contributor

gerhean commented Feb 13, 2022

Seems fine, you don't need to create an issue for simple tasks like this, if it involves only a simple version upgrade (with no refactoring), and does not break backwards compatibility (which you should mention).

@yhtMinceraft1010X
Copy link
Contributor Author

yhtMinceraft1010X commented Feb 13, 2022

I have encountered some issues with third-party plugins when attempting to move to Gradle 7.4:

1. Property without annotation error in com.liferay.gradle.plugins.node.tasks.ExecutePackageManagerTask

When running gradlew, I noticed this error:
Screenshot (91)

After some googling, I discovered that Gradle 7 implemented stricted validation checks as described in this link

Possible remedy: There's another Gradle plugin that might work, gradle-node-plugin. It is described as being tested for Gradle 7.4, although I wish to open this for discussion before deciding whether to change plugins.

2. No compatibility with Java 8 for latest available version of com.github.psxpaul.execfork

The latest available version for the aforementioned plugin is 0.1.15. However, trying to use this version results in the below error:
Screenshot (93)

Possible remedy: Using version 0.1.13 does not throw the same error.

3. The correct version 0.2.0 for com.github.psxpaul.execfork does not exist

Although it is mentioned on the README.md of https://github.com/psxpaul/gradle-execfork-plugin, attempting to use version 0.2.0 results in the following error:
Screenshot (94)

Gradle's plugin page still considers 0.1.15 to be the latest version.

Conclusion
Given these 3 issues, I intend to try to upgrade to Gradle 6, in particular version 6.9.2 to close the gap between our current version and version 7.4.

@gerhean
Copy link
Contributor

gerhean commented Feb 13, 2022

I am in favour of changing plugins if you believe that the plugins currently being used are not well maintained and causing problems.

Preferably switch to a popular plugin with more than 1000 github stars.

dcshzj pushed a commit that referenced this issue Jul 22, 2022
The Liferay plugin has recently been updated with annotations for
Gradle 7. As Gradle 7 is now available for use, this also means that the
Shadow plugin can be updated to the latest version.

There are some deprecated features that will be removed in a future
Gradle 8 release. These include an implicit dependency between
processResources and zipReport and the change from Report.enabled to
Report.required.

The processSystemtestResources task fails because Gradle 7 requires a
duplicatesStrategy to be defined for the task, which is of the Copy
type.

Let's upgrade to Gradle 7, update the relevant plugins and fix the
duplicatesStrategy error as well as deprecations related to Gradle 8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants