Setting of property in project specific closure not taking effect in task defined in subprojects.
Project Structure: parent-child1-(child11,child12)
parent build file --------------------
allprojects {
Obj obj = new Obj()
//for n attributes }
child1 build file ----------------- subprojects.each { project.evaluationDependsOn(it.name) }
subprojects{ task packageAsRpm(type: Rpm){
project.ext.artifact = archivePath } }
configuration{
newOne }
dependencies {
newOne …external dependency… }
artifacts{
newOne file: archivePath, name: ‘my-artifact’, type: ‘text’, builtBy: generate }
uploadNewOne{
…ivy upload… } }
project(‘child1’) {
obj.setSomething(someValue) //of the same object used instantiated in allprojects }
— I guess I’m going wrong somewhere. Been trying to fix this issue for couple of days. Not getting it. Could I get some help on this?