@@ -19,106 +19,37 @@ The group id and artifact id are as follows:
1919
2020See also: https://search.maven.org/artifact/org.seasar.doma/doma/
2121
22- .. _eclipse-build :
23-
24- Build with Eclipse
25- ==================
26-
27- .. note ::
28-
29- Instead of manual settings we show you below,
30- we recommend to generate eclipse setting files automatically with
31- `the Gradle Eclipse Plugin <https://docs.gradle.org/current/userguide/eclipse_plugin.html >`_.
32- See also build.gradle and eclipse.gradle in the
33- `domaframework/simple-boilerplate <https://github.com/domaframework/simple-boilerplate >`_
34- repository.
35-
36- Enabling annotation processing
37- ------------------------------
38-
39- - Select "Project > Properties" from the menu bar and open the dialog
40- - Select "Java Compiler > Annotation Processing" from the left menu of the dialog
41- - Check as follows:
42-
43- .. image :: images/annotation-processing.png
44- :width: 80 %
45-
46- Setting factory path
47- --------------------
48-
49- - Select "Project > Properties" from the menu bar and open the dialog
50- - Select "Java Compiler > Annotation Processing > Factory Path" from the left menu of the dialog
51- - Add the jar file of the Doma framework whose version is same as the one in the Java Build Path
52- - Check as follows:
53-
54- .. image :: images/factory-path.png
55- :width: 80 %
56-
57- Build with IntelliJ IDEA
58- ========================
59-
60- See :ref: `idea-annotation-processor `.
61-
6222.. _build-with-gradle :
6323
6424Build with Gradle
6525=================
6626
67- build.gradle as an example:
68-
69- .. code-block :: groovy
70-
71- plugins {
72- id 'java'
73- }
74-
75- ext.domaResources = ['doma.compile.config', 'META-INF/**/*.sql', 'META-INF/**/*.script']
27+ Write your build.gradle script, then run ``gradle build ``.
7628
77- task copyDomaResources(type: Sync) {
78- from sourceSets.main.resources.srcDirs
79- into compileJava.destinationDir
80- include domaResources
81- }
29+ To simplify your build.script, we recommend you use
30+ the `Doma Compile Plugin `_.
8231
83- compileJava {
84- // copy doma related resources before compileJava
85- dependsOn copyDomaResources
86- options.encoding = 'UTF-8'
87- }
32+ See build.gradle in the `simple-boilerplate `_ repository as an example.
8833
89- processResources {
90- // exclude doma related resources
91- exclude domaResources
92- }
93-
94- compileTestJava {
95- options.encoding = 'UTF-8'
96- // disable the annotation processors during the test run
97- options.compilerArgs = ['-proc:none']
98- }
34+ Build with IntelliJ IDEA
35+ ========================
9936
100- repositories {
101- mavenCentral()
102- maven {url 'https://oss.sonatype.org/content/repositories/snapshots/'}
103- }
37+ Use a newer version of IntelliJ IDEA, and then import your project as a Gradle project.
38+ To know how to import project, see :ref: `idea-import-project `.
10439
105- dependencies {
106- annotationProcessor "org.seasar.doma:doma:2.28.1-SNAPSHOT"
107- implementation "org.seasar.doma:doma:2.28.1-SNAPSHOT"
108- runtimeOnly 'com.h2database:h2:1.3.175'
109- testImplementation 'junit:junit:4.11'
110- }
40+ .. _eclipse-build :
11141
42+ Build with Eclipse
43+ ==================
11244
113- .. note ::
45+ Generate eclipse setting files with Gradle, and then import your project into Eclipse.
46+ To generate the setting files, run ``gradle eclipse ``.
11447
115- The description ``maven {url 'https://oss.sonatype.org/content/repositories/snapshots/'} `` is required
116- only when you need the SNAPSHOT version of the Doma framework.
48+ To simplify your build.script, we recommend you use the `Doma Compile Plugin `_ and the `AptEclipsePlugin `_.
11749
118- .. note ::
50+ See build.gradle in the ` simple-boilerplate `_ repository as an example.
11951
120- With the above build.gradle, you will benefits from
121- `Incremental annotation processing <https://gradle.org/whats-new/gradle-5/#incremental-annotation-processing >`_.
12252
123- See also build.gradle in the
124- `domaframework/simple-boilerplate <https://github.com/domaframework/simple-boilerplate >`_ repository.
53+ .. _Doma Compile Plugin : https://github.com/domaframework/doma-compile-plugin
54+ .. _AptEclipsePlugin : https://plugins.gradle.org/plugin/com.diffplug.eclipse.apt
55+ .. _simple-boilerplate : https://github.com/domaframework/simple-boilerplate
0 commit comments