Closed bitspittle closed 2 years ago
Did you apply the java-project or kotlin-project at the root of the build?
Ah, I was just java-project
-- I copied code from https://jreleaser.org/guide/latest/quick-start/gradle.html and didn't even notice the ID I was using.
That said, I just tried again using kotlin-project
and I'm still seeing the same error.
To repro:
$ git clone https://github.com/varabyte/kobweb.git
$ cd kobweb/cli/kobweb
$ vim build.gradle.kts
# or whatever your favorite editor is, and add the "id" line below:
---
plugins {
...
id("org.kordamp.gradle.kotlin-project") version "0.45.0"
}
...
---
$ ../../gradlew tasks
When I do this, I see
$ ../../gradlew tasks
Running /home/d9n/Code/scratch/kobweb/gradlew tasks...
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
Type-safe dependency accessors is an incubating feature.
> Task :buildSrc:compileKotlin
'compileJava' task (current target is 16) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version
.
> Configure project :cli:kobweb
Kordamp Gradle plugins 0.45.0. Consider becoming a patron at https://www.patreon.com/aalmiray
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':cli:kobweb'.
> Cannot get property 'docs' on null object
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 49s
7 actionable tasks: 7 executed
Did you apply the java-project or kotlin-project at the root of the build?
Ah I just noticed you asked about the "root" -- does that mean I'm supposed to apply kordamp at the root build.gradle.kts only? And the issue is that I'm only applying it to a subproject?
Correct. Most kordamp plugins should be applied at the root level. If this is too much for you know that you may still use JReleaser's gradle plugin without having to use the kordamp plugins.
That sounds fair. Looking over the docs again I see that it does indeed mention setting this on the root. I'm going to close this bug as a user error then.
Thanks for your help!
Hello! I'm trying to set up kordamp (latest version, 0.47.0) on this project which produces a binary:
https://github.com/varabyte/kobweb/blob/main/cli/kobweb/build.gradle.kts
Note that this is a 100% Kotlin project. I'm not sure if that's supported or not at this time.
All I've done is add a reference to kordamp in the plugins block, which results in the following stacktrace when simply syncing gradle: