November 2018
Intermediate to advanced
388 pages
9h 5m
English
The all-open plugin for Gradle can be used as follows:
buildscript { dependencies { classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version" }}apply plugin: "kotlin-allopen"
We have to add the plugin artifact in the buildscript dependencies section of the Gradle file. We can also enable the all-open plugin using the plugins section, as follows:
plugins { id "org.jetbrains.kotlin.plugin.allopen" version "1.2.41" }
Following this, we can specify a list of annotations that will make our classes open and accessible:
allOpen { annotation("javax.ejb.Stateless") }
We can specify multiple annotations using the annotations section in the allOpen plugin:
allOpen { annotations("javax.ejb.Stateless", "javax.inject.Inject") ...Read now
Unlock full access