is it possible to specify a dependency in Gradle (in android studio) to another gradle project outside of the current project boundaries? For example with a relative path something like this:
dependencies {
compile project('../../stdlib/dagger')
}
So what I trie is something like this:
I have an Android Application. The structure looks like this:
- MyApp (path is /Users/foo/workspace/MyApp)
- app (path is /Users/foo/workspace/MyApp/app)
And I have a gradle android library project containing 3 submodules:
- stdlib (path is /Users/foo/workspace/stdlib)
- dagger (path is /Users/foo/workspace/stdlib/dagger)
- utils (path is /Users/foo/workspace/stdlib/utils)
- http (path is /Users/foo/workspace/stdlib/http)
What I want is to compile the dagger, utils, http module into MyApp project.
The stdlib libraries modules are under heavy development and will grow as MyApp grow. Hence I do not want to push them into a maven repository everytime I make a little change.
So is there a possibility to link other gradle projects somehow?
Im looking for a temporarly solution. I will push the std library into maven repository once the source is stable.
Also, as workaround, a solution with sourceSet would be possible. I have also considered to make a libraries folder in MyApp who is a symlink to stdlib, but I didnt get it to work as expected:
- MyApp (path is /Users/foo/workspace/MyApp)
- app (path is /Users/foo/workspace/MyApp/app)
- libraries (symlink to /Users/foo/workspace/stdlib)
dependencies {
compile project(':libraries:dagger')
}
Any idea how to solve such a dependency in gradle?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…