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).
55
66This repository includes the following examples:
77
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).
1313
1414Clone this repository
1515---------------------
@@ -40,4 +40,4 @@ Import the project as a Gradle project.
4040
4141### Eclipse
4242
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 {
1111 apply (plugin = " com.diffplug.spotless" )
1212 apply (plugin = " org.domaframework.doma.compile" )
1313
14+ java {
15+ toolchain {
16+ languageVersion.set(JavaLanguageVersion .of(17 ))
17+ }
18+ }
19+
1420 tasks {
1521 withType<JavaCompile > {
1622 options.encoding = " UTF-8"
@@ -32,8 +38,8 @@ subprojects {
3238 annotationProcessor(" org.seasar.doma:doma-processor:${domaVersion} " )
3339 implementation(" org.seasar.doma:doma-core:${domaVersion} " )
3440 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 " )
3743 testImplementation(" org.junit.jupiter:junit-jupiter-api:5.11.0" )
3844 testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine:5.11.0" )
3945 }
@@ -62,7 +68,7 @@ subprojects {
6268
6369 spotless {
6470 java {
65- googleJavaFormat(" 1.12 .0" )
71+ googleJavaFormat(" 1.23 .0" )
6672 }
6773 }
6874}
Original file line number Diff line number Diff line change @@ -17,11 +17,3 @@ dependencies {
1717 implementation(" org.seasar.doma:doma-core:${domaVersion} " )
1818 implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
1919}
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 {
1717 implementation(" org.seasar.doma:doma-core:${domaVersion} " )
1818 implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
1919}
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 {
22 java
33}
44
5- val javaVersion = 17
6-
75tasks {
86 compileJava {
97 val aptOptions = extensions.getByType< com.diffplug.gradle.eclipse.apt.AptPlugin .AptOptions > ()
108 aptOptions.processorArgs = mapOf (
119 " doma.domain.converters" to " example.dao_style_text.domain.DomainConverterProvider"
1210 )
13- options.release = javaVersion
1411 }
1512}
1613
@@ -21,8 +18,3 @@ dependencies {
2118 implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
2219}
2320
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 {
172172 @ Select
173173 List <Employee > selectBySalary (Salary salary );
174174
175- @ Sql ("""
175+ @ Sql (
176+ """
176177 select
177178 sum(salary)
178179 from
Original file line number Diff line number Diff line change @@ -17,11 +17,3 @@ dependencies {
1717 implementation(" org.seasar.doma:doma-core:${domaVersion} " )
1818 implementation(" org.seasar.doma:doma-slf4j:${domaVersion} " )
1919}
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
22
33# https://github.com/diffplug/spotless/issues/834
44org.gradle.jvmargs =-Dfile.encoding=UTF-8 \
Original file line number Diff line number Diff line change @@ -3,15 +3,12 @@ plugins {
33 application
44}
55
6- val javaVersion = 17
7-
86tasks {
97 compileJava {
108 val aptOptions = extensions.getByType< com.diffplug.gradle.eclipse.apt.AptPlugin .AptOptions > ()
119 aptOptions.processorArgs = mapOf (
1210 " doma.domain.converters" to " example.jpms_java.domain.DomainConverterProvider"
1311 )
14- options.release = javaVersion
1512 }
1613}
1714
@@ -25,9 +22,3 @@ dependencies {
2522application {
2623 mainClass.set(" example.jpms_java.Main" )
2724}
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