可以在deployNodes gradle任务中使用quasarExcludePackages吗?

问题描述

我尝试使用以下常量:

cordaReleaseGroup=net.corda
cordaCoreReleaseGroup=net.corda
cordaVersion=4.5.1
cordaCoreversion=4.5.1
gradlePluginsversion=5.0.9
kotlinVersion=1.2.71
junitVersion=4.12
quasarVersion=0.7.10
log4jVersion=2.11.2
platformVersion=5
slf4jVersion=1.7.25

...以及以下deployNodes

task deployNodes(type: net.corda.plugins.Cordform,dependsOn: ['jar']) {
   nodeDefaults {
        projectCordapp {
            deploy = false
        }
        cordapp project(':contracts')
        cordapp project(':workflows')
        quasarExcludePackages = ["io.cordite.braid.libs**"]
    }

Gradle为unkNown property的{​​{1}}引发了错误

解决方法

您需要像这样通过额外的配置添加它:

nodeDefaults {
    projectCordapp {
        deploy = false
    }
    cordapp project(':contracts')
    cordapp project(':workflows')
    extraConfig = ["quasarExcludePackages": ["io.cordite.braid.libs**"]]
}