Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (16 sloc) 538 Bytes
def requiredPropSets = []
gradle.taskGraph.whenReady { graph ->
requiredPropSets.each { args ->
if (graph.hasTask(args.taskPath)) {
def missingProps = args.requiredProps.findAll { prop ->
!project.hasProperty(prop)
}
if (missingProps) {
throw new GradleException("For executing the ${args.taskPath} task you need to set all ${missingProps} properties")
}
}
}
}
project.checkForProps = { Map args ->
requiredPropSets.add args
}