Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import gradle project into STS 3.7.2

i download fresh STS, do 'import' and... there is nothing related to gradle.

do i have to install some plugins first? or maybe preferred way is to add apply plugin 'eclipse' and run gradle eclipse first? what is the suggested way?

like image 683
piotrek Avatar asked Dec 11 '15 01:12

piotrek


People also ask

How do I import an existing Gradle project into STS?

Step 1: Open your Eclipse IDE and go to File » Import. Step 2: Search for Gradle, expand the folder and go to Gradle » Existing Gradle Project » Next. Step 3: Specify the root directory of the Gradle project to import and click on the Next button.

How do I run a Gradle project in STS?

Go to the New project wizard (Ctrl-N) of STS Eclipse and create a Gradle project. On the Gradle Projec t wizard , assign a name for your project and choose Java Quickstart for the Sample project option. Click Finish and it will take a while to create, build, clean, and install your Gradle STS project.


2 Answers

From https://github.com/eclipse/buildship/wiki/Migration-guide-from-STS-Gradle-to-Buildship

There are two major Gradle plugins for Eclipse: one created by SpringSource as part of the Spring Tool Suite and one called Buildship developed by Gradle Inc. Since Buildship became an eclipse.org project, the SpringSource developers are planning to phase out their tooling and switch to Buildship.

So Buildship is the only currently supported variant.

like image 30
gavenkoa Avatar answered Oct 04 '22 20:10

gavenkoa


There are three options to import Gradle projects into STS/Eclipse:

  • install the Gradle Integration for Eclipse via the STS dashboard or the Eclipse marketplace and use that. This fits into the STS picture and integrates with its components.
  • install the Buildship project, this is the "official" Gradle integration for Eclipse from Eclipse and this should be the extension of your choice looking forward.
  • use Gradle to create Eclipse-specific project metadata and import the project as existing Eclipse project.
like image 150
Martin Lippert Avatar answered Oct 04 '22 19:10

Martin Lippert