The Yawn Gradle plugin is a quality-of-life tool to help you set up Yawn in your Gradle-based Kotlin projects.
It is especially useful on multi-module gradle projects, where you want to apply Yawn to multiple modules without having to repeat the same configuration.
However, as of now, it requires a bit of one-time boilerplate to setup (we are working on trying to improve it). In particular, you will need to duplicate the Yawn version into your Gradle properties so the plugin can read it. That only needs to be done once on your root project.
All the plugin does is add both necessary yawn-processor dependencies (the compileOnly and ksp ones) to any module that applies the plugin. Essentially,
it is equivalent to:
compileOnly("com.faire.yawn:yawn-processor:$version")
ksp("com.faire.yawn:yawn-processor:$version")- On your root project, add the
com.faire.yawn.versionproperty to your Gradle properties (with the latest version in place of<VERSION>)
com.faire.yawn.version=<VERSION>- Then, on each module you have Yawn entities, add both the plugin and the
yawn-apidependency to yourbuild.gradle.ktsfile:
plugins {
id("com.faire.yawn")
}
dependencies {
implementation("com.faire.yawn:yawn-api:<VERSION>")
}- Finally, on each module you will have Yawn queries, add the
yawn-apidependency to yourbuild.gradle.ktsfile:
dependencies {
implementation("com.faire.yawn:yawn-api:<VERSION>")
}