jcechace
10/31/2018, 1:21 PMNikky
10/31/2018, 1:31 PMimplementation
on some things - but thats just a random guessjcechace
10/31/2018, 1:37 PMjcechace
10/31/2018, 1:38 PMNikky
10/31/2018, 1:45 PMbase {
archivesBaseName = "app"
}
second: shadowJar does not like being applied before setting the mainclassname (at least when i am using it)
you can get around that with id("shadojar etc" version "2.0.4" )apply false
Nikky
10/31/2018, 1:48 PMplugins {
...
id("com.github.johnrengelman.shadow") version "4.0.0" apply false
}
apply<ApplicationPlugin>()
configure<JavaApplication> {
mainClassName = "package.MainKt"
}
apply(plugin = "com.github.johnrengelman.shadow")
val runDir = rootProject.file("run")
val run by tasks.getting(JavaExec::class) {
workingDir = runDir
}
val runShadow by tasks.getting(JavaExec::class) {
workingDir = runDir
}
val shadowJar by tasks.getting(ShadowJar::class) {
classifier = ""
archiveName = "${project.name.toLowerCase()}-${Env.versionSuffix}.$extension"
}
val build by tasks.getting(Task::class) {
dependsOn(shadowJar)
}
Nikky
10/31/2018, 1:49 PMNikky
10/31/2018, 1:50 PMjcechace
10/31/2018, 1:54 PMjcechace
10/31/2018, 1:54 PMapplication {
mainClassName = "io.apiman.watcher.WatcherAppKt"
}
should do the samejcechace
10/31/2018, 2:00 PMjcechace
10/31/2018, 2:00 PMval runDir = rootProject.file("run")
Nikky
10/31/2018, 2:29 PMNikky
10/31/2018, 2:30 PMNikky
10/31/2018, 2:30 PMjcechace
10/31/2018, 2:42 PMgradle assembleShadowDist --warning-mode all
The AbstractFileCollection.getBuildDependencies() method has been deprecated. This is scheduled to be removed in Gradle 5.0. com.github.jengelman.gradle.plugins.shadow.internal.DependencyFileCollection extends AbstractFileCollection. Do not extend AbstractFileCollection. Use Project.files() instead.
BUILD SUCCESSFUL in 0s
6 actionable tasks: 6 up-to-date
jcechace
10/31/2018, 3:24 PMapply(plugin = "com.github.johnrengelman.shadow")
was needed. Thanks @Nikky