Hello everyone. Trying to register my arrow-meta p...
# arrow-meta
r
Hello everyone. Trying to register my arrow-meta plugin as Gradle plugin:
Copy code
build.gradle.kts:

...
gradlePlugin {
    plugins {
        create("my-plugin") {
            id = "com.github.rcd2772.plugin"
            implementationClass = "com.github.rcd2772.plugin.MetaPlugin"
        }
    }
}
Where
MetaPlugin
implements
Meta
interface. And all is done like in (meta-samples)[https://github.com/arrow-kt/arrow-meta-examples]. The only difference is that I add all plugin logic and its runtime dependencies to
buildSrc
. In order to add it in my
app
module via
plugins { id("com.github.rcd2772.plugin") }
However gradle-plugin stuff(the one responsible for registering plugin with
create
DSL) says: 'com.github.rcd2772.plugin.MetaPlugin' is neither a plugin or a rule source and cannot be applied Is there a way to register Meta plugin with
gradlePlugin
?
Seems like I muddle together gradle plugin and kotlin compiler plugin...
r
all meta plugins are compiler plugins and need to be registered with the freeCompilerArgs or alternatively with the gradle setup which adds it automatically to the kotlinCompilerClassPath
https://github.com/arrow-kt/arrow-analysis repo may be an example on how to setup a compiler plugin for development and test
r
Thanks, @raulraja. Yes, I had a success with
freeCompilerArgs
before, implementing like shown in arrow-meta-samples. OK then.