Skip to content

Commit 6c92b96

Browse files
committed
Explain how to write gradle build script in Gradle 5.0
1 parent 393cac5 commit 6c92b96

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/sources/build.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ Gradle でビルドを行う際のポイントは以下のとおりです。
7676

7777
* JavaクラスとSQLファイルの出力先ディレクトリを同じにする
7878
* コンパイルより前にSQLファイルを出力先ディレクトリにコピーする
79+
* テスト時は注釈処理を無効にする
80+
* 依存関係の設定でdomaの注釈処理を実行することを示す
7981
* 依存関係の設定でdomaへの依存を指定する
8082

8183
サンプルのbuild.gradleです。
@@ -94,8 +96,17 @@ Gradle でビルドを行う際のポイントは以下のとおりです。
9496
maven {url 'https://oss.sonatype.org/content/repositories/snapshots/'}
9597
}
9698
99+
compileTestJava {
100+
options.encoding = 'UTF-8'
101+
// テストの実行時は注釈処理を無効にする
102+
options.compilerArgs = ['-proc:none']
103+
}
104+
97105
dependencies {
98-
compile "org.seasar.doma:doma:2.19.4-SNAPSHOT"
106+
// domaの注釈処理を実行することを示す
107+
annotationProcessor "org.seasar.doma:doma:2.19.4-SNAPSHOT"
108+
// domaへの依存を示す
109+
implementation "org.seasar.doma:doma:2.19.4-SNAPSHOT"
99110
}
100111
101112
.. note::

0 commit comments

Comments
 (0)