Fix a bug where when using a groovy string a cordapp will not be included

because of a string and GString equality failure.
This commit is contained in:
Matthew Nesbit 2017-08-16 17:44:29 +01:00 committed by Clinton Alexander
parent dc8d232480
commit ca5ea1e25d
3 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
gradlePluginsVersion=0.13.6
gradlePluginsVersion=0.15.0
kotlinVersion=1.1.1
guavaVersion=21.0
bouncycastleVersion=1.57

View File

@ -76,7 +76,7 @@ class Cordformation implements Plugin<Project> {
"This can cause node stability problems. Please use 'corda' instead." +
"See http://docs.corda.net/cordapp-build-systems.html")
} else {
logger.trace("Including dependency: $it")
logger.info("Including dependency: $it")
}
}
return filteredDeps.collect { configurations.runtime.files it }.flatten().toSet()

View File

@ -235,6 +235,8 @@ class Node extends CordformNode {
* @return List of this node's cordapps.
*/
private Collection<File> getCordappList() {
// Cordapps can sometimes contain a GString instance which fails the equality test with the Java string
List<String> cordapps = this.cordapps.collect { it.toString() }
return project.configurations.cordapp.files {
cordapps.contains(it.group + ":" + it.name + ":" + it.version)
}