How to set output file from another gradle build script's task from GradleBuild task? -


i have project gradle build. have project b gradle build also. want include project b's jar project a's war. can call project b's build script project a's build script (see below).
can not set project b's jar output file of task buildb.

is there way set project b's jar (which output file of task jar) output file of task buildb?

task buildb(type: gradlebuild) {     buildfile = "../bproject/build.gradle"     tasks = ["clean", "jar"]       // jar task produce xxx.jar it's outputs.files      // here, script set xxx.jar outputs.files of task buildb??? }  war {     (buildb) {                // can not xxx.jar buildb         "web-inf/classes"     } } 

you need configure multi module project , define project-scope dependency.

since answer full answer lengthy, here can find demo shows how can done.

the demo consists of 2 projects. 1 project built war , has dependency project built war. if build a project, b built automatically , included jar.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -