Configuring Kotlin JVM target platform via Intellij Plugin


Kotlin in user projects may be configured with target platform JVM 1.6. My plugin sometimes requires Kotlin configured for 1.8 target. I would like to inform the user that current settings do not satisfy the requirements and he need to change them to use my plugin.

What is the best way to determine current JVM target of Kotlin plugin via Intellij Plugin?

What is the best way to set new JVM target if user agrees via Intellij Plugin?

Thank you in advance!


1 comment

See org.jetbrains.kotlin.config.KotlinFacetSettings#getTargetPlatform property in Kotlin Facet, see for Facet introduction


Please sign in to leave a comment.