java - Gradle multiproject and lib jar directory -
i have gradle multi-project build , have inlcude jar file has come lib directory.
first had next structure:
- directory "project" - directory "sub project 1" - directory "lib" - file "a.jar" - directory "sub project 2"
and next ´gradle.build´ (only excerp) "sub project 1":
repositories { flatdir { dirs 'lib' } }
when compile "sub project 2" error because a.jar cannot resolved. solve took next approach:
1: moved lib dir in project root
- directory "project" - directory "sub project 1" - directory "sub project 2" - directory "lib" - file "a.jar"
2: defined lib dir in ´gradle.build´ "project" like
subprojects { repositories { flatdir { dirs '../lib' } } }
3: removed lib dir entry ´gradle.build´ "sub project 1".
now question: reasonable approach or if not, recommended way solve this?
if want projects declare individual dependencies on libraries in lib
directory, when working maven or ivy repository, approach fine.
java gradle
No comments:
Post a Comment