Gradle Build Issue
Initial Gradle Build of the Project doesn't work
Java Version: 21-openjdk
Error:
` * What went wrong:
Error resolving plugin [id: 'com.gradle.enterprise', version: '3.16.2']
A problem occurred configuring project ':kmp-conventions'. Failed to calculate the value of task ':kmp-conventions:compileJava' property 'javaCompiler'. > Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=21, vendor=matching('amazon'), implementation=vendor-specific} for LINUX on x86_64. > No matching toolchain could be found in the locally installed toolchains or the configured toolchain download repositories. `
Hey a quick fix to this is to install Amazons flavour of Java 21 corretto:
https://docs.aws.amazon.com/corretto/latest/corretto-21-ug/generic-linux-install.html
Long term I'll probably relax the vendor requirement as its less useful and more of a hindrance on an open source project
Thanks, works smoothly like butter.
I've removed the restriction on building only with amazon corretto, you'll still need a version of Java 21 but it can now be from any vendor.