![]() ![]() Your published library artifact will declare the compatibility with JDK 11+: =11, which is wrong. The targetCompatibility equals a current Gradle's JDK version, which is equal to your JDK version (unless you use a Java toolchain approach). When there is no explicit information about the jvmTarget value in the build script, its default value is null, and the compiler translates it to the default value 1.8. ![]() To avoid JVM target incompatibility, configure a toolchain or align JVM versions manually. Ignore – the plugin skips the check and doesn't produce any messages. Warning – the plugin prints a warning message the default value for projects on Gradle less than 8.0. ![]() For example: the compileKotlin task has jvmTarget=1.8, and the compileJava task has (or inherits) targetCompatibility=15.Ĭonfigure the behavior of this check by setting the .mode property in the adle file to:Įrror – the plugin fails the build the default value for projects on Gradle 8.0+. Different values of the jvmTarget attribute in the kotlin extension or task and targetCompatibility in the java extension or task cause JVM target incompatibility. Main and test source set compile tasks are not related.įor related tasks like these, the Kotlin Gradle plugin checks for JVM target compatibility. In the build module, you may have related compile tasks, for example: += 'src/main/myKotlin'Ĭheck for JVM target compatibility of related compile tasks ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |