Hi guys, I'm trying to create a compiler plugin fo...
# arrow-meta
e
Hi guys, I'm trying to create a compiler plugin for an Android project, but I have some issues. I took a look at examples, but it is using
shadowJar
and I can't make it work with Android. Do you have any suggestion or example? Thank you
❤️ 3
r
Hi Eugeniu, you only need to use shadow if you want your compiler plugin code to be reused in an IDE plugin. If you have a small reproducible example of what fails we can maybe take a look.
e
Hi Raul, I just pasted the
HelloWorld
example plugin and
MetaPlugin
to a java module, adding
Copy code
compileOnly "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version"
    compileOnly "io.arrow-kt:compiler-plugin:$arrow_meta"
as dependencies. Then I'm just depending on that module in the app module. But the app crashes because
Copy code
fun helloWorld(): Unit = TODO()
is not being replaced. Am i missing any steps in the setup?
r
Are you applying the arrow meta plugin in gradle?
e
At the moment it's applied at application level, but I tried to apply it also to every module, but nothing changed
not sure If can help, but I'm using the snapshot version
r
If you can package a minimal example and push it to a repo we can clone to troubleshoot someone will take a look to see if it’s an issue with your setup or a limitation in meta.
e
Yes, I was making a repo right now, thank you
👍 2
r
Hi! We used the
shadowJar
task in that example to create a new compiler plugin with Arrow Compiler Plugin + Hello World Plugin
And then it's used in another module (
use-plugin
)