Using Gradle with an existing Android project

Posted by Tom Reznik on Stack Overflow See other posts from Stack Overflow or by Tom Reznik
Published on 2013-06-26T15:08:46Z Indexed on 2013/06/26 22:21 UTC
Read the original article Hit count: 234

I have an existing Android project with the following structure:

- ProjectName
-- AndroidManifest.xml
-- local.properties
-- project.properties

-- assets
-- libs    (containing all jars)
-- modules (containing all library projects my project depends on)
-- res

-- src
---- com/namespace/projectname (all my classes including main activity are here)

I haven't been using any specific build system to build my project other than the one provided by default with the Android Studio IDE (though the project was originally created with IntelliJ CE.

I would like to use Gradle with the android plugin and do some work on my build process. I have tried several configurations in order to achieve this and have failed to complete a successful build every time.

What's the recommended approach in this scenario? should I change my project structure? or is it possible to configure gradle using the existing structure?

Any help would be greatly appreciated.

Thanks!

© Stack Overflow or respective owner

Related posts about android

Related posts about gradle