Missing Tasks - Gradle vs Gradlew


(David) #1

Hi All,

I am relatively new to Gradle and am in the process of switch over from Eclipse Luna and STS to Oxygen and Buildship. I am a contributor to the open source Maptool (https://github.com/RPTools/maptool) project but I am having real difficulties with this project and Buildship.

One problem is that Gradle (I have installed 4.6) does not seem to find all the tasks found by Gradlew. Gradle finds all the same tasks but is missing the ones Gradlew groups under “Other”. This includes things like “spotlessApply”. This is particularly annoying as there seems to be no way to call these tasks from within Eclipse. But if I type “gradle spotlessApply” from the command lie, they still work.

Any ideas what I should do to make these tasks appear in Eclipse

(Sterling Greene) #2

I suspect that when you’re using gradlew, you’re using an old version of Gradle (before 4.0). There was a change between Gradle 3.0 and Gradle 4.0 to hide tasks that do not have a group assigned (the “Other” group).

By default, Buildship only shows the tasks that have a group assigned (like gradle tasks), but you can configure it to show everything (see Tasks view and task execution): http://www.eclipse.org/community/eclipse_newsletter/2018/february/buildship.php

This is similar to gradle tasks --all.

(David) #3

Thank you that was a great help.

Yes, the gradle wrapper included in the project is quite old, version 2.12.