One question : Is it necessary to create a Gradle plugin to integrate with a Kotlin compiler plugin ? What exactly does the Gradle plugin aid in ?
j
Javier
08/01/2023, 12:13 PM
You can apply a compiler plugin without the Gradle plugin but the gradle plugin makes consuming your compiler plugin easier as configuring a gradle plugin is easy and typed, and you parse later those parameters as strings to your compiler plugin arguments somehow you want
🙌 1
a
aishwaryabhishek3
08/01/2023, 12:33 PM
Ok , so all I need to connect
KotlinCompilerPluginSupportPlugin
and my plugin is to override
getCompilerPluginId()
? Or i also need to set the ComponentRegistrars and CommandLineProcessors on
KotlinCompilation
in
Copy code
override fun applyToCompilation(
kotlinCompilation: KotlinCompilation<*>
): Provider<List<SubpluginOption>>
j
Javier
08/01/2023, 12:41 PM
I recommend checking arrow-analysis repo on GitHub