Fix :shadowJar task. Take 2.
This time, wait for the subprojects to be evaluated before trying to get their shadowJar tasks (otherwise they won't be there).
This commit is contained in:
@@ -51,13 +51,15 @@ subprojects {
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
|
||||
def shadowJar = it.tasks.findByName('shadowJar')
|
||||
afterEvaluate {
|
||||
def shadowJar = project.tasks.findByName('shadowJar')
|
||||
if (shadowJar != null && shadowJar.hasProperty('archivePath') && project.name != 'core') {
|
||||
def rootTask = rootProject.tasks.shadowJar
|
||||
rootTask.dependsOn shadowJar
|
||||
rootTask.from shadowJar.archivePath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround specific to CI build to guarantee correct ordering of
|
||||
// ./gradlew --parallel shadowJar :1.8:setCoreVersion
|
||||
|
||||
Reference in New Issue
Block a user