Clayton Walker
Posted on January 7, 2022
And start using --release
. As of JEP-247 released in java 9, the flag will allow you to compile for older releases of java without worrying about the dreaded NoSuchMethodError.
Stop talking and show me the code!
Gradle
tasks.withType(JavaCompile) {
options.release = 8
}
Gradle (kts)
tasks.withType<JavaCompile> {
options.release.set(8)
}
Maven (xml)
<configuration>
<release>8</release>
</configuration>
💖 💪 🙅 🚩
Clayton Walker
Posted on January 7, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.