Pardon the noob question; I’m sure it’s something dumb.
I’ve installed Buildship1.0.7.v20151214-0917 in Eclipse Mars. I have added a build.gradle file to my project that includes "apply plugin: ‘java’ ". Then deleted and reimported the project as a Gradle project. The task list for the project is showing only the generic Gradle tasks and none of the Java plugin tasks (i.e. “classes”.) There’s nothing in the error log.
System: Windows 7 Professional.
Gradle 2.10
Eclipse Mars
If you already have an Eclipse .project file in the project that you import, the classpath is not taken from the Gradle build (intentionally). In Gradle 1.0.8 will show a notification dialog in that case and, before the actual import starts, the user can choose whether to keep or replace an existing .project file.
I’m afraid you missed my point. I haven’t gotten to the point of worrying about the classpath. I can’t execute a Gradle build because the appropriate tasks aren’t available.
If you already have a .project file before you import as a Gradle project, the existing .project file is not replaced. I think this means that the import doesn’t behave as you expect, and is why in the next version of Buildship a warning will be raised.
Try deleting the existing .project file and then re-importing the project as a Gradle build.
Hmmm. I looked at the .project file and it looks like the Gradle import added the Gradle nature. I’ll try deleting and reimporting to see how that would be different.
Manually delete the .project file from the project
Import as Gradle project
I still don’t see any of the Java plugin tasks. Also, Eclipse isn’t recognizing this as a Java project – my source folder is no longer marked as such and I just have the plain directory structure rather than packages. Plus, the icon for the .java file is the one Eclipse uses for “Java, but not one I know about.”