Fixed a crash in cordformation when trying to build nodes for a project with a file as a dependency and any other dependencies without a group

This commit is contained in:
Clinton Alexander 2017-09-04 15:20:44 +01:00 committed by Clinton Alexander
parent 8cedce735f
commit db5708e4df
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
gradlePluginsVersion=0.14.0
gradlePluginsVersion=0.14.1
kotlinVersion=1.1.1
guavaVersion=21.0
bouncycastleVersion=1.57

View File

@ -71,12 +71,12 @@ class Cordformation implements Plugin<Project> {
def filteredDeps = directDeps.findAll { excludes.collect { exclude -> (exclude.group == it.group) && (exclude.name == it.name) }.findAll { it }.isEmpty() }
filteredDeps.each {
// net.corda may be a core dependency which shouldn't be included in this cordapp so give a warning
if(it.group.contains('net.corda')) {
if(it.group && it.group.contains('net.corda.')) {
logger.warn("You appear to have included a Corda platform component ($it) using a 'compile' or 'runtime' dependency." +
"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 in CorDapp JAR: $it")
}
}
return filteredDeps.collect { configurations.runtime.files it }.flatten().toSet()