等级5.1.1 瓦丹12.0.4 InteliJ IDEA 2018.3
在我的Kotlin脚本中
plugins {
kotlin("jvm") version "1.3.20"
id("com.github.johnrengelman.shadow") version "4.0.3"
id("com.devsoap.vaadin-flow") version "1.0"
id("org.gretty") version "2.3.1"
}
val kotlinVersion = "1.3.20" //by extra("1.3.20")
val jettyVersion = "9.4.14.v20181"
val shadowJar by tasks.getting(ShadowJar::class) {
manifest.attributes["Main-Class"] = "com.myproject.Main"
mergeServiceFiles()
}
我通过Gradle的插件shadowshadow创建可执行jar。
gradlew shadowjar
它成功创建了可执行jar。
很好。
现在,我想将带有所有子文件夹的外部文件夹“ 前端”添加到可执行jar。 所以我试试这个:
val shadowJar by tasks.getting(ShadowJar::class) {
manifest.attributes["Main-Class"] = "com.myproject.Main"
mergeServiceFiles()
include("frontend/*/*.*") // error here
}
但是我在InteliJ IDEA中出错:
None of the following functions can be called with the arguments supplied.