Merge pull request #5960 from corda/chrisr3-groovy-fix

ENT-4652: Tighten Groovy code for writing META-INF/Cordapp-Dependencies.
This commit is contained in:
Matthew Nesbit 2020-02-14 14:16:22 +00:00 committed by GitHub
commit 014a03575e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()
}
}
}
}