This plugin fails to build because of a version mismatch between the Kotlin and Java tasks. In the build.gradle file currently only the Java version is fixed. Since the Kotlin jvmTarget is not defined, the JDK's version is chosen (in my case, 19) causing a conflict and not allowing the plugin to build (see logs below).
The fix to this this problem would be to also pin the Kotlin version. That can easily be done:
> Task :capacitor-community-bluetooth-le:compileReleaseKotlin FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':capacitor-community-bluetooth-le:compileReleaseKotlin'.
> 'compileReleaseJavaWithJavac' task (current target is 17) and 'compileReleaseKotlin' task (current target is 19) jvm target compatibility should be set to the same Java version.
Plugin version:
@capacitor-community/bluetooth-le: 3.1.1
Desktop (please complete the following information):
I am using Capacitor with Quasar.
This plugin fails to build because of a version mismatch between the Kotlin and Java tasks. In the
build.gradle
file currently only the Java version is fixed. Since the KotlinjvmTarget
is not defined, the JDK's version is chosen (in my case, 19) causing a conflict and not allowing the plugin to build (see logs below).The fix to this this problem would be to also pin the Kotlin version. That can easily be done:
Logs:
Plugin version:
Desktop (please complete the following information):
Pop!_OS jammy 22.04 x86_64
19.0.2 2023-01-17