File tree Expand file tree Collapse file tree 9 files changed +18
-52
lines changed
src/main/java/example/dao_style_text/dao Expand file tree Collapse file tree 9 files changed +18
-52
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ Simple examples for [Doma](https://github.com/domaframework/doma).
5
5
6
6
This repository includes the following examples:
7
7
8
- * [ dao-style-basic] ( dao-style-basic ) - Shows basic DAO style. Written in Java 8.
9
- * [ dao-style-file] ( dao-style-file ) - Uses files to store SQL templates. Written in Java 8.
10
- * [ dao-style-text] ( dao-style-text ) - Uses Text Blocks to store SQL templates. Written in Java 17.
11
- * [ dsl-style-java] ( dsl-style-java ) - Uses the Criteria API. Written in Java 8.
12
- * [ jpms-java] ( jpms-java ) - Uses the Java Platform Module System (JPMS). Written in Java 17.
8
+ * [ dao-style-basic] ( dao-style-basic ) - Shows basic DAO style.
9
+ * [ dao-style-file] ( dao-style-file ) - Uses files to store SQL templates.
10
+ * [ dao-style-text] ( dao-style-text ) - Uses Text Blocks to store SQL templates.
11
+ * [ dsl-style-java] ( dsl-style-java ) - Uses the Criteria API.
12
+ * [ jpms-java] ( jpms-java ) - Uses the Java Platform Module System (JPMS).
13
13
14
14
Clone this repository
15
15
---------------------
@@ -40,4 +40,4 @@ Import the project as a Gradle project.
40
40
41
41
### Eclipse
42
42
43
- Import the project as a Gradle project.
43
+ Import the project as a Eclipse project.
Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ subprojects {
11
11
apply (plugin = " com.diffplug.spotless" )
12
12
apply (plugin = " org.domaframework.doma.compile" )
13
13
14
+ java {
15
+ toolchain {
16
+ languageVersion.set(JavaLanguageVersion .of(17 ))
17
+ }
18
+ }
19
+
14
20
tasks {
15
21
withType<JavaCompile > {
16
22
options.encoding = " UTF-8"
@@ -32,8 +38,8 @@ subprojects {
32
38
annotationProcessor(" org.seasar.doma:doma-processor:${domaVersion} " )
33
39
implementation(" org.seasar.doma:doma-core:${domaVersion} " )
34
40
implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
35
- runtimeOnly(" ch.qos.logback:logback-classic:1.2.11 " )
36
- runtimeOnly(" com.h2database:h2:2.2.224 " )
41
+ runtimeOnly(" ch.qos.logback:logback-classic:1.5.7 " )
42
+ runtimeOnly(" com.h2database:h2:2.3.232 " )
37
43
testImplementation(" org.junit.jupiter:junit-jupiter-api:5.11.0" )
38
44
testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine:5.11.0" )
39
45
}
@@ -62,7 +68,7 @@ subprojects {
62
68
63
69
spotless {
64
70
java {
65
- googleJavaFormat(" 1.12 .0" )
71
+ googleJavaFormat(" 1.23 .0" )
66
72
}
67
73
}
68
74
}
Original file line number Diff line number Diff line change @@ -17,11 +17,3 @@ dependencies {
17
17
implementation(" org.seasar.doma:doma-core:${domaVersion} " )
18
18
implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
19
19
}
20
-
21
- java {
22
- toolchain {
23
- languageVersion.set(JavaLanguageVersion .of(8 ))
24
- }
25
- sourceCompatibility = JavaVersion .VERSION_1_8
26
- targetCompatibility = JavaVersion .VERSION_1_8
27
- }
Original file line number Diff line number Diff line change @@ -17,11 +17,3 @@ dependencies {
17
17
implementation(" org.seasar.doma:doma-core:${domaVersion} " )
18
18
implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
19
19
}
20
-
21
- java {
22
- toolchain {
23
- languageVersion.set(JavaLanguageVersion .of(8 ))
24
- }
25
- sourceCompatibility = JavaVersion .VERSION_1_8
26
- targetCompatibility = JavaVersion .VERSION_1_8
27
- }
Original file line number Diff line number Diff line change @@ -2,15 +2,12 @@ plugins {
2
2
java
3
3
}
4
4
5
- val javaVersion = 17
6
-
7
5
tasks {
8
6
compileJava {
9
7
val aptOptions = extensions.getByType< com.diffplug.gradle.eclipse.apt.AptPlugin .AptOptions > ()
10
8
aptOptions.processorArgs = mapOf (
11
9
" doma.domain.converters" to " example.dao_style_text.domain.DomainConverterProvider"
12
10
)
13
- options.release = javaVersion
14
11
}
15
12
}
16
13
@@ -21,8 +18,3 @@ dependencies {
21
18
implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
22
19
}
23
20
24
- java {
25
- toolchain {
26
- languageVersion.set(JavaLanguageVersion .of(javaVersion))
27
- }
28
- }
Original file line number Diff line number Diff line change @@ -172,7 +172,8 @@ public interface EmployeeDao {
172
172
@ Select
173
173
List <Employee > selectBySalary (Salary salary );
174
174
175
- @ Sql ("""
175
+ @ Sql (
176
+ """
176
177
select
177
178
sum(salary)
178
179
from
Original file line number Diff line number Diff line change @@ -17,11 +17,3 @@ dependencies {
17
17
implementation(" org.seasar.doma:doma-core:${domaVersion} " )
18
18
implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
19
19
}
20
-
21
- java {
22
- toolchain {
23
- languageVersion.set(JavaLanguageVersion .of(8 ))
24
- }
25
- sourceCompatibility = JavaVersion .VERSION_1_8
26
- targetCompatibility = JavaVersion .VERSION_1_8
27
- }
Original file line number Diff line number Diff line change 1
- domaVersion =2.62.1
1
+ domaVersion =3.0.0
2
2
3
3
# https://github.com/diffplug/spotless/issues/834
4
4
org.gradle.jvmargs =-Dfile.encoding=UTF-8 \
Original file line number Diff line number Diff line change @@ -3,15 +3,12 @@ plugins {
3
3
application
4
4
}
5
5
6
- val javaVersion = 17
7
-
8
6
tasks {
9
7
compileJava {
10
8
val aptOptions = extensions.getByType< com.diffplug.gradle.eclipse.apt.AptPlugin .AptOptions > ()
11
9
aptOptions.processorArgs = mapOf (
12
10
" doma.domain.converters" to " example.jpms_java.domain.DomainConverterProvider"
13
11
)
14
- options.release = javaVersion
15
12
}
16
13
}
17
14
@@ -25,9 +22,3 @@ dependencies {
25
22
application {
26
23
mainClass.set(" example.jpms_java.Main" )
27
24
}
28
-
29
- java {
30
- toolchain {
31
- languageVersion.set(JavaLanguageVersion .of(javaVersion))
32
- }
33
- }
You can’t perform that action at this time.
0 commit comments