All-open compiler plugin

Edit pageLast modified: 25 September 2024

Kotlin has classes and their members final by default, which makes it inconvenient to use frameworks and libraries such as Spring AOP that require classes to be open. The all-open compiler plugin adapts Kotlin to the requirements of those frameworks and makes classes annotated with a specific annotation and their members open without the explicit open keyword.

For instance, when you use Spring, you don't need all the classes to be open, but only classes annotated with specific annotations like @Configuration or @Service. The all-open plugin allows you to specify such annotations.

Kotlin provides all-open plugin support both for Gradle and Maven with the complete IDE integration.