Hakkar
Hakkar

Reputation: 2441

Gradle - Eclipse Project Nature

How would I add something to the project nature of the Eclipse project generated by Gradle.

I want to add the following:

<nature>com.google.gwt.eclipse.core.gwtNature</nature>
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>

Upvotes: 4

Views: 3427

Answers (2)

Baked Inhalf
Baked Inhalf

Reputation: 3735

  1. Right click your java project -> configure -> add Gradle nature.
  2. Select window -> show view -> other... select Gradle tasks.
  3. Expand your project in 'Gradle tasks' -> build setup, right click "init" and run.

Upvotes: 0

Hakkar
Hakkar

Reputation: 2441

Figured this one out.

Add the following your build file:

eclipse {
  project {
    natures 'com.google.gwt.eclipse.core.gwtNature'
  }
}

Gradle Eclipse Project Docs

Upvotes: 5

Related Questions