ENT-4652: Tighten Groovy code for writing Cordapp-Dependencies.

This commit is contained in:
Chris Rankin 2020-02-13 13:01:21 +00:00
parent 117108f456
commit d419faa185

View File

@ -63,10 +63,13 @@ dependencies {
def cordappDependencies = file("${sourceSets['main'].output.resourcesDir}/META-INF/Cordapp-Dependencies")
task generateDependencies {
dependsOn project(':finance:contracts').tasks.jar
inputs.files(configurations.cordapp)
outputs.files(cordappDependencies)
doLast {
configurations.cordapp.forEach { cordapp ->
cordappDependencies << sha256(cordapp) << System.lineSeparator()
cordappDependencies.newWriter().withWriter { writer ->
configurations.cordapp.forEach { cordapp ->
writer << sha256(cordapp) << System.lineSeparator()
}
}
}
}