[GRADLE-751] ecplise project for usePlugin "scala" should use scala eclipse nature and builder Created: 23/Nov/09  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 0.9-rc-1

Type: Improvement
Reporter: Philip Crotwell Assignee: Hans Dockter
Resolution: Fixed Votes: 0

Attachments: Text File scala_eclipse.patch    


When a project does

usePlugin "scala"
usePlugin "eclipse"

then running gradle eclipse should create a project file that contains the scala nature and scala builder like:

Comment by Philip Crotwell [ 23/Nov/09 ]

src/main/scala should also be added as a eclipse source directory

Comment by Philip Crotwell [ 02/Dec/09 ]

This patch sets the scala nature and builder. But src/main/scala is not put into the .classpath, still some things about the java and scala plugin that I do not understand.

Comment by Adam Murdoch [ 07/Dec/09 ]

The patch looks good. I will apply it soon, and merge it with the patch for GRADLE-198. This should fix the scala source dirs.

Comment by Adam Murdoch [ 09/Dec/09 ]

This has been applied. Thank you for the patch.

Comment by Stefan De Boey [ 11/Jul/10 ]

i think the order of the natures for scala projects should be the other way around. with the current solution eclipse doesn't seem to fully recognize the project as a scala project.

the scala nature should come before the java nature.

at the moment the .project file is generated like this:


it should be like this:


i currently use the following workaround by adding this snippet to build.gradle:

eclipseProject {
natureNames = ['ch.epfl.lamp.sdt.core.scalanature', 'org.eclipse.jdt.core.javanature']

Generated at Wed Jun 30 11:37:56 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.