You can import projects in different ways, all are working:
EGradle New Project Wizard
which is described here. It is the easiest way to
create new gradle projects out of the box in eclipse and automatically import them. Of course you are able to create file structure and build files etc. manually and import as existing project(s) as described
in the next steps.>
EGradle contains an importer - simply call "File->Import..." and enter "gradle"
The settings for gradle root project path, global java home settings and gradle call type are initially copied from current preferences - if there exists a setup.
What happens when you keep the settings of current preferences?
The same as described above. But when do you need this? When you switch between branches
it can happen that you renamed projects, added or deleted projects etc. The branch switch will
leave "zombie" projects or new projects (which maybe are referenced) are not in workspace. The
import process with same settings will all do this automatically...
There exists a convenient action for this use case: In every project associated with current gradle root project inside context menu you got the import action:
When checkbox "Restore former meta data"
is checked a
cache for meta data of rebuilding projects will be created and reapplied
after reimport is done. This will also restore Teamprovider data as well, so
you will not have to share projects again after reimport is done...
If there are any problems or you want to loose current meta data simply uncheck
the option and do the reimport.
The importer has got it's own preferences page where you can setup some behaviour:
When enabled a full "clean all projects" will be executed after import is done, so eclipse bin folders will be recreated and eclipse and gradle outputs are in sync.
This is the classic way if you do not want to use the EGradle importer mechanism.
After Setup is done for your root project, you can use either
After this is done, use "File - import ... existing projects" inside eclipse and import all projects from root folder.
You should not try to import the gradle root project itself as a normal eclipse project. Instead use the Virtual root project feature! |