Kotlin / binary-compatibility-validator

Public API management tool
Apache License 2.0
800 stars 59 forks source link

Use foojay-resolver-convention to resolve JVM toolchains #238

Closed fzhinkin closed 3 months ago

fzhinkin commented 3 months ago

Recently, I was running BCV tests on hosts with only recent Java installed, and automatic toolchain provisioning could made my life much easier.

JakeWharton commented 3 months ago

Why use a toolchain when any modern JDK can cross-compile to Java 8 with faster compilation speeds and bytecode generation bugfixes using the --release flag?

fzhinkin commented 3 months ago

Why use a toolchain when any modern JDK can cross-compile to Java 8 with faster compilation speeds and bytecode generation bugfixes using the --release flag?

@JakeWharton, it's just more convenient compared to explicitly specifying the target for all kotlin- and java-tasks.

shanshin commented 3 months ago

@JakeWharton, I would also prefer to use flags, however, not all of our agents have JDK installed on which the flag -Xjdk-release works.

@fzhinkin, could you clarify a little bit why we are limiting the JDK version? To make the BCV plugin work if Gradle runs on older JVMs?

fzhinkin commented 3 months ago

@shanshin, yes, the version is limited for Gradle compatibility reasons (it works with Java >= 8).

fzhinkin commented 3 months ago

At the same time, according to our Readme, Java >= 11 is required to use BCV :)