Barodapride
Barodapride

Reputation: 3723

What steps do I need to take to convert my Eclipse Android project into a Gradle project?

I was wondering if it is an easy or worthwhile effort to convert my current Android project in Eclipse into a Gradle Project. Is there a generic build.gradle file I could start with that has common build tasks for Android? Would I just need to download a Gradle plugin for Eclipse or would I need to download Gradle by itself? Are there available tasks to run the project on a connected device like the Eclipse Android plugin can already do? Any input is appreciated.

Upvotes: 2

Views: 426

Answers (3)

Paul Verest
Paul Verest

Reputation: 63902

Any project with build.gradle is Gradle project.

You can add build.gradle via File -> Export -> Android / Generate Gradle build file

or use build.gradle template for classic Android project check gh.c/N/n-1/b/m/o.n.e.e.g/docs/android/build.gradle.

see http://www.nodeclipse.org/projects/gradle/ for info about Gradle support in Eclipse

Are there available tasks to run the project on a connected device like the Eclipse Android plugin can already do?

there is android-command plugin referenced in template.

Be aware that all Android-Gradle related is currently beta, including Android Studio.

I recommend to read docs well

Upvotes: 1

Wan
Wan

Reputation: 97

If your target IDE is android studio.I use android studio 0.8.9 and from experience when I am moving my eclipse projects I simply go over to android studio,under the file menu and import the eclipse project.Android studio uses the latest version of the gradle plugin to do the job of proper conversion.Note:Make sure your gradle plugin option is turned on to work online.

Upvotes: 0

Siavash
Siavash

Reputation: 7853

I don't know of any standalone Gradle tools, but if you install Android Studios, and import your eclipse project, it elegantly converts it to Gradle for you. This is what I did.

Upvotes: 0

Related Questions