11Doma Compile Plugin
22===================
33
4- Doma compile plugin is a gradle plugin.
5- It allows annotation processors to read Doma resources at compile-time.
4+ The Doma Compile Plugin is a Gradle plugin that allows annotation processors to read Doma resources at compile-time.
65
7- The plugin supports Java and Kotlin.
6+ The plugin supports both Java and Kotlin.
87
98[ ![ Java CI with Gradle] ( https://github.com/domaframework/doma-compile-plugin/workflows/Java%20CI%20with%20Gradle/badge.svg )] ( https://github.com/domaframework/doma-compile-plugin/actions?query=workflow%3A%22Java+CI+with+Gradle%22 )
10- [ ![ project chat ] ( https://img.shields.io/badge/zulip-join_chat-green.svg )] ( https://domaframework.zulipchat.com )
9+ [ ![ Project Chat ] ( https://img.shields.io/badge/zulip-join_chat-green.svg )] ( https://domaframework.zulipchat.com )
1110[ ![ Twitter
] ( https://img.shields.io/badge/[email protected] ?style=flat )] ( https://twitter.com/domaframework ) 1211
13- How to use
12+ How to Use
1413----------
1514
16- See [ Gradle Plugin Portal] ( https://plugins.gradle.org/plugin/org.domaframework.doma.compile ) .
15+ See the [ Gradle Plugin Portal] ( https://plugins.gradle.org/plugin/org.domaframework.doma.compile ) .
1716
18- What does the plugin do ?
17+ What Does the Plugin Do ?
1918-------------------------
2019
21- The plugin is equivalent to the following gradle script:
20+ The plugin is equivalent to the following Gradle Kotlin DSL script:
2221
23- ``` groovy
24- def domaResources = ['doma.compile.config', 'META-INF/**/*.sql', 'META-INF/**/*.script']
25-
26- task copyDomaResourcesJava(type: Copy) {
27- from sourceSets.main.resources.srcDirs
28- into compileJava.destinationDir
29- include domaResources
30- }
31-
32- compileJava {
33- dependsOn copyDomaResourcesJava
34- }
35-
36- processResources {
37- exclude domaResources
38- }
39-
40- task copyDomaResourcesKotlin(type: Copy) {
41- from sourceSets.main.resources.srcDirs
42- into compileKotlin.destinationDir
43- include domaResources
44- }
45-
46- compileKotlin {
47- dependsOn copyDomaResourcesKotlin
22+ ``` kotlin
23+ tasks {
24+ compileJava {
25+ val resourceDirs = sourceSets.getByName(" main" ).resources.srcDirs
26+ options.sourcepath = files(resourceDirs)
27+ options.compilerArgs.add(" -parameters" )
28+ }
4829}
4930
5031kapt {
51- arguments {
52- arg('doma.resources.dir', compileKotlin.destinationDir)
32+ javacOptions {
33+ val resourceDirs = sourceSets.getByName(" main" ).resources.srcDirs
34+ option(" --source-path" , resourceDirs.join(File .pathSeparator))
35+ option(" -parameters" )
5336 }
5437}
5538```
@@ -60,28 +43,31 @@ Example build.gradle.kts
6043- Java: https://github.com/domaframework/simple-examples/blob/master/build.gradle.kts
6144- Kotlin: https://github.com/domaframework/kotlin-sample/blob/master/build.gradle.kts
6245
63- Major versions
46+ Version Information
6447---------------------
6548
6649### Status and Repository
6750
68- | Version | Status | Repository | Branch |
69- | -----------------------| -----------------| --------------------------------------------------------------------------------------------| --------|
70- | Doma Compile Plugin 2 | limited-support | [ domaframework/doma-compile-plugin] ( https://github.com/domaframework/doma-compile-plugin/ ) | 2.x |
71- | Doma Compile Plugin 3 | stable | [ domaframework/doma-compile-plugin] ( https://github.com/domaframework/doma-compile-plugin/ ) | master |
51+ | Version | Status | Repository | Branch |
52+ | -----------------------| ------------------| --------------------------------------------------------------------------------------------| --------|
53+ | Doma Compile Plugin 2 | Limited Support | [ domaframework/doma-compile-plugin] ( https://github.com/domaframework/doma-compile-plugin/ ) | 2.x |
54+ | Doma Compile Plugin 3 | Limited Support | [ domaframework/doma-compile-plugin] ( https://github.com/domaframework/doma-compile-plugin/ ) | 3.x |
55+ | Doma Compile Plugin 4 | Stable | [ domaframework/doma-compile-plugin] ( https://github.com/domaframework/doma-compile-plugin/ ) | master |
7256
73- ### Compatibility matrix
57+ ### Compatibility Matrix
7458
75- The supported versions of Doma :
59+ Doma Version Compatibility :
7660
77- | | Doma 2 | Doma 3 |
78- | -----------------------| --------| --------|
79- | Doma Compile Plugin 2 | v | |
80- | Doma Compile Plugin 3 | | v |
61+ | | Doma 2 | Doma 3.0 - 3.7 | Doma 3.8 or later |
62+ | -----------------------| --------| ----------------| -------------------|
63+ | Doma Compile Plugin 2 | ✓ | | |
64+ | Doma Compile Plugin 3 | | ✓ | |
65+ | Doma Compile Plugin 4 | | | ✓ |
8166
82- The minimum supported versions of Java :
67+ Java Version Requirements :
8368
84- | | Java 8 | Java 17 |
85- | -----------------------| --------| ---------|
86- | Doma Compile Plugin 2 | v | |
87- | Doma Compile Plugin 3 | | v |
69+ | | Java 8 or later | Java 17 or later |
70+ | -----------------------| ------------------| -------------------|
71+ | Doma Compile Plugin 2 | ✓ | |
72+ | Doma Compile Plugin 3 | | ✓ |
73+ | Doma Compile Plugin 4 | | ✓ |
0 commit comments