1

I'm using maven and i'd like to move to gradle. The problem is that i have module "lib" and module "app", app uses lib. I have to create settings.gradle file in 'app' folder with include :lib content to make 'app' use 'lib'. I want them to be in the same folder 'project' like this:

project
|-lib
|-app

instead of:

project
|-app
  |-lib

I've tried using include ./lib but no luck.

How can i do it?

4ntoine
  • 19,816
  • 21
  • 96
  • 220

1 Answers1

2

project/settings.gradle:

include "app", "lib"

project/app/build.gradle:

...
dependencies {
    compile project(":lib")
}

For further details, see the "multi-project builds" chapter in the Gradle User Guide.

Peter Niederwieser
  • 121,412
  • 21
  • 324
  • 259
  • i've just found similar question for more complex case: http://stackoverflow.com/questions/17536652/gradle-and-multi-project-structure – 4ntoine Apr 15 '14 at 05:40