How can I add a gradle nature to my eclipse android project while keeping the eclipse structure directory layout?
Can I do this with gradle ide for eclipse plugin by spring?
How can I add a gradle nature to my eclipse android project while keeping the eclipse structure directory layout?
Can I do this with gradle ide for eclipse plugin by spring?
Yes thats possible and well documented:
To replace the default source folders, you will want to use srcDirs instead, which takes an array of path. This also shows a different way of using the objects involved:
sourceSets {
main.java.srcDirs = ['src/java']
main.resources.srcDirs = ['src/resources'] }
See also: How to configure build.gradle files of an existing project with actionbarsherlock lib?
Just my 2 cents: you wont make yourself a favor trying to config eclipse to work with gradle, just make your life easier and use the tooling recommended by google.
an official migrating guide will helps you.
https://developer.android.com/sdk/installing/migrate.html
As of 1.0 of android gradle plugin is still incompatible with java and eclipse gradle plugins.
So if you literally add gradle nature to your eclipse android project, it will likely to break.
However you can add build.gradle
and run gradle build from within Eclipse as secondary build.