November 2018
Intermediate to advanced
388 pages
9h 5m
English
The all-open compiler plugin is a JAR file that comes with the Kotlin compiler. In order to use the all-open plugin, we need to provide the path to the jar file using the -Xplugin option:
-Xplugin=$KOTLIN_HOME/lib/allopen-compiler-plugin.jar
We can specify the all-open annotations either with the annotation plugin option, or by enabling the preset. Spring is the only preset that is currently available for the all-open plugin.
The plugin option format is as follows:
-P plugin:<plugin id>:<key>=<value>
-P plugin:org.jetbrains.kotlin.allopen:annotation=org.rao.kotlin.javaee.MyClass-P plugin:org.jetbrains.kotlin.allopen:preset=spring
Read now
Unlock full access