<@U4UGS5FC7> Cool, I'm also relatively new to Kotl...
# arrow
m
@raulraja Cool, I'm also relatively new to Kotlin so I didn't realize compiler plugins are a common thing. Though we don't use gradle where I work, so I'll have to figure out how to get it working in our build system.
i
What build system are you using?
m
The open source version is called bazel, but it's Google's internal build system.
👌🏽 1
bazel actually has support for pulling from maven/gradle repositories, but we don't use that internally, we try to have everything we use checked in locally even if we pull from upstream every once in a while.
r
compiler plugins are passed to the compiler as java env args so really any build system should be trivial to add support for it if it already supports that which should be most of them.
☝🏽 1
m
https://docs.bazel.build/versions/master/be/java.html#java_plugin "At the moment, the only supported kind of plugins are annotation processors." Will the Arrow compiler plugin be more than an annotation processor?
p
Just ask how to add Compose’s preview to your project, the steps will be similar.
r
A compiler plugin bootstrap as a service XML which is a annotation processor I believe
That is how determines what the plugin component registrar is located on the jar in the compiler plugin
The other step is adding to the compiler arguments the list of the plugin classpath which it's done automatically by the gradle plugin or it can be manually specified from maven or anywhere as system property the compiler automatically picks up
We are talking here a two line setup in a build file max
If your plugin needs to contribute to the IDE then the gradle plugin will also automatically install it in the user plugins folder
So when you open IDEA you get symbol navigation for all the synth stuff you've added in your plugin and that otherwise would be seen redlined since IDEA wouldn't know you've generated those