jonatan-ivanov / teahouse

Sample applications to demonstrate Observability concepts
234 stars 78 forks source link

build issue using Java 13 Java 21 #10

Closed systems1 closed 11 months ago

systems1 commented 11 months ago

what are environment requirements for build to work tried with Java 13 Java 21 ./gradlew bootJar BUILD FAILED https://scans.gradle.com/s/b3ovwpnh55ffe

jonatan-ivanov commented 11 months ago

Have you checked the build.gradle file? https://github.com/jonatan-ivanov/teahouse/blob/2645b123a478717c7777e273767bfe10950552ba/build.gradle#L70

Also, Java 13 is very old and not supported anymore.

systems1 commented 11 months ago

Used Java 21 build failed then tried Java 13 Heres Java 21 output

java -version openjdk version "21.0.1" 2023-10-17 OpenJDK Runtime Environment (build 21.0.1+12-29) OpenJDK 64-Bit Server VM (build 21.0.1+12-29, mixed mode, sharing)

./gradlew bootRun Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

jonatan-ivanov commented 11 months ago

Are you sure?

The consumer was configured to find a library for use during runtime, compatible with Java 13,

Check your build scan for the java version.

fyi: I upgraded the dependencies and tested this with bootJar, bootRun, assemble, build, all of them worked, the CI is also green: https://github.com/jonatan-ivanov/teahouse/actions/runs/7222982268/job/19681099525

systems1 commented 11 months ago

@jonatan-ivanov I checked on another laptop with clean java 21 and build worked now so it could be my local multiple java versions issue thx

jonatan-ivanov commented 11 months ago

Try to run ./gradlew --version to see what Java version Gradle uses, if it's 21, the toolchain should also use that. I use asdf as my version manager but sdkman should also work with the toolchain.

I also upgraded Gradle to 8.5 (latest right now), maybe it helps.