When building a Kotlin project using IntelliJ IDEA, there are many options all over the place that appear to be specifying the target JVM version. I've appended the value that each item is currently showing in my project:
Settings > Build, Ex, Dep > Compiler > Kotlin Compiler > Target JVM version (1.6)
- (above page shows warning: Following modules override project settings: MyProject.main, MyProject.test)
Settings > Build, Ex, Dep > Compiler > Java Compiler > Project bytecode version (13)
Settings > Build, Ex, Dep > Build Tools > Gradle > Gradle JVM (Project SDK 13)
Project Structure > Project Settings > Project > Project language level (SDK default)
Project Structure > Project Settings > Modules > [project name] > [main] > Kotlin > Target platform (JVM 1.8)
Project Structure > Project Settings > Facets > Target platform (Multiplatform)
(in build.gradle.kts file) tasks.withType<KotlinCompile> { kotlinOptions.jvmTarget = "11" }
This is addition to a variety of places where I can specify the JRE:
Settings > Build, Ex, Dep > Build Tools > Maven > Runner > JRE (Use Project JDK)
Project Structure > Project > Project SDK (13 java version "13.0.2")
Project Structure > Project Settings > Modules > [project name, or main, test, etc] (Project default)
Which of the above settings takes top priority? If I want to compile my program to target JVM version 11, which setting is essential and won't be overridden by something else?