diff options
Diffstat (limited to 'java/plugin.go')
-rw-r--r-- | java/plugin.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/java/plugin.go b/java/plugin.go index 9c4774a10..610c9fd11 100644 --- a/java/plugin.go +++ b/java/plugin.go @@ -24,6 +24,7 @@ func init() { func registerJavaPluginBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType("java_plugin", PluginFactory) + ctx.RegisterModuleType("kotlin_plugin", KotlinPluginFactory) } func PluginFactory() android.Module { @@ -37,6 +38,16 @@ func PluginFactory() android.Module { return module } +func KotlinPluginFactory() android.Module { + module := &KotlinPlugin{} + + module.addHostProperties() + + InitJavaModule(module, android.HostSupported) + + return module +} + // Plugin describes a java_plugin module, a host java library that will be used by javac as an annotation processor. type Plugin struct { Library @@ -53,3 +64,8 @@ type PluginProperties struct { // parallelism and cause more recompilation for modules that depend on modules that use this plugin. Generates_api *bool } + +// Plugin describes a kotlin_plugin module, a host java/kotlin library that will be used by kotlinc as a compiler plugin. +type KotlinPlugin struct { + Library +} |