eclipse - Running gradle tasks from a subproject with unknown root -


i have multi-project setup in gradle somewhat-flat structure so:

rootproject/     build.gradle     settings.gradle  subprojecta/     build.gradle  anotherdirectory/     subprojectb/         build.gradle     subprojectc/         build.gradle 

the root project root build. it's there tie of other projects together. subprojectb depends on subprojectc, , c depends on a.

running tasks root project works expected. can run gradle :subprojectb:build , build subprojectb , dependencies without error.

my problem if try run task sub-project's directory, fails if sub-project depends on of other sub-projects because doesn't know of others without root project's settings file. running a's build directory work, running b's or c's fail.

is there can within structure define root project is, if run gradle build b, behave same running gradle :subprojectb:build root project's directory?

the end goals make easier use gradle command line, , functional default tasks on sub-projects. way should able double-click project eclipse's gradle tasks list, , have run default tasks though running tasks root.

in case, can use composite builds. let @ subprojecta , want build against subprojectb. can execute command below:

gradle --include-build ../anotherdirectory/subprojectb run 

subprojectb build first , subprojecta.


Comments

Popular posts from this blog

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

angular - DownloadURL return null in below code -