Doma compile plugin is a gradle plugin.
It allows annotation processors to read Doma resources at compile-time.
The plugin supports Java and Kotlin.
See Gradle Plugin Portal.
The plugin is equivalent to the following gradle script:
def domaResources = ['doma.compile.config', 'META-INF/**/*.sql', 'META-INF/**/*.script']
task copyDomaResourcesJava(type: Copy) {
from sourceSets.main.resources.srcDirs
into compileJava.destinationDir
include domaResources
}
compileJava {
dependsOn copyDomaResourcesJava
}
processResources {
exclude domaResources
}
task copyDomaResourcesKotlin(type: Copy) {
from sourceSets.main.resources.srcDirs
into compileKotlin.destinationDir
include domaResources
}
compileKotlin {
dependsOn copyDomaResourcesKotlin
}
kapt {
arguments {
arg('doma.resources.dir', compileKotlin.destinationDir)
}
}
- Java: https://github.com/domaframework/simple-examples/blob/master/build.gradle.kts
- Kotlin: https://github.com/domaframework/kotlin-sample/blob/master/build.gradle.kts
Version | Status | Repository | Branch |
---|---|---|---|
Doma Compile Plugin 2 | limited-support | domaframework/doma-compile-plugin | 2.x |
Doma Compile Plugin 3 | stable | domaframework/doma-compile-plugin | master |
The supported versions of Doma:
Doma 2 | Doma 3 | |
---|---|---|
Doma Compile Plugin 2 | v | |
Doma Compile Plugin 3 | v |
The minimum supported versions of Java:
Java 8 | Java 17 | |
---|---|---|
Doma Compile Plugin 2 | v | |
Doma Compile Plugin 3 | v |