distTar only includes subproject jars on second execution, following a clean

I think the best way to do this would be to use project dependencies. You should avoid reaching into a project from other projects since it entangles them more.

Something like:

configurations {
   installedJars
}

dependencies {
   installedJars project(":abc")
   ...
   // or use a loop here of subprojects
}

distributions {
    main {
        baseName = 'wBC'
        contents {
            into('Lucent') {
                from 'Lucent'
                exclude "WBC/AAA2"
                exclude "WBC/AAAIPS"
            }
            into("Lucent/WBC/AAA/lib") {
                from configurations.installedJars
            }
        }
    }
}
1 Like