Skip to content

Commit e51f8a9

Browse files
authored
Merge pull request #382 from domaframework/criteria-api
Add the Criteria API
2 parents 32ccf9f + 09043ad commit e51f8a9

File tree

206 files changed

+11835
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+11835
-105
lines changed

build.gradle.kts

Lines changed: 54 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
plugins {
22
base
3+
kotlin("jvm") version "1.3.72" apply false
4+
kotlin("kapt") version "1.3.72" apply false
35
id("com.diffplug.eclipse.apt") version "3.22.0" apply false
46
id("com.diffplug.gradle.spotless") version "3.27.2"
57
id("de.marcphilipp.nexus-publish") version "0.4.0" apply false
@@ -61,6 +63,57 @@ subprojects {
6163
options.compilerArgs = listOf("-proc:none")
6264
}
6365

66+
val test by tasks.existing(Test::class) {
67+
maxHeapSize = "1g"
68+
useJUnitPlatform()
69+
}
70+
71+
dependencies {
72+
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.6.2")
73+
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:5.6.2")
74+
}
75+
76+
configure<JavaPluginExtension> {
77+
sourceCompatibility = JavaVersion.VERSION_1_8
78+
targetCompatibility = JavaVersion.VERSION_1_8
79+
}
80+
81+
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
82+
java {
83+
googleJavaFormat("1.7")
84+
}
85+
kotlin {
86+
ktlint("0.36.0")
87+
trimTrailingWhitespace()
88+
endWithNewline()
89+
}
90+
}
91+
92+
configure<org.gradle.plugins.ide.eclipse.model.EclipseModel> {
93+
classpath {
94+
file {
95+
whenMerged {
96+
val classpath = this as org.gradle.plugins.ide.eclipse.model.Classpath
97+
classpath.entries.removeAll {
98+
when (it) {
99+
is org.gradle.plugins.ide.eclipse.model.Output -> it.path == ".apt_generated"
100+
else -> false
101+
}
102+
}
103+
}
104+
withXml {
105+
val node = asNode()
106+
node.appendNode("classpathentry", mapOf("kind" to "src", "output" to "bin/main", "path" to ".apt_generated"))
107+
}
108+
}
109+
}
110+
jdt {
111+
javaRuntimeName = "JavaSE-1.8"
112+
}
113+
}
114+
}
115+
116+
configure(subprojects.filter { it.name in listOf("doma-core", "doma-processor", "doma-criteria") }) {
64117
val javadoc by tasks.existing(Javadoc::class) {
65118
options.encoding = encoding
66119
(options as StandardJavadocDocletOptions).apply {
@@ -78,24 +131,12 @@ subprojects {
78131
}
79132
}
80133

81-
val test by tasks.existing(Test::class) {
82-
maxHeapSize = "1g"
83-
useJUnitPlatform()
84-
}
85-
86134
val build by tasks.existing {
87135
val publishToMavenLocal by tasks.existing
88136
dependsOn(publishToMavenLocal)
89137
}
90138

91-
dependencies {
92-
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.6.2")
93-
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:5.6.2")
94-
}
95-
96139
configure<JavaPluginExtension> {
97-
sourceCompatibility = JavaVersion.VERSION_1_8
98-
targetCompatibility = JavaVersion.VERSION_1_8
99140
withJavadocJar()
100141
withSourcesJar()
101142
}
@@ -144,43 +185,14 @@ subprojects {
144185
sign(publishing.publications)
145186
isRequired = !isSnapshot
146187
}
147-
148-
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
149-
java {
150-
googleJavaFormat("1.7")
151-
}
152-
}
153-
154-
configure<org.gradle.plugins.ide.eclipse.model.EclipseModel> {
155-
classpath {
156-
file {
157-
whenMerged {
158-
val classpath = this as org.gradle.plugins.ide.eclipse.model.Classpath
159-
classpath.entries.removeAll {
160-
when (it) {
161-
is org.gradle.plugins.ide.eclipse.model.Output -> it.path == ".apt_generated"
162-
else -> false
163-
}
164-
}
165-
}
166-
withXml {
167-
val node = asNode()
168-
node.appendNode("classpathentry", mapOf("kind" to "src", "output" to "bin/main", "path" to ".apt_generated"))
169-
}
170-
}
171-
}
172-
jdt {
173-
javaRuntimeName = "JavaSE-1.8"
174-
}
175-
}
176188
}
177189

178190
rootProject.apply {
179191
apply(from = "release.gradle")
180192

181193
fun replaceVersionInDocs(ver: String) {
182194
ant.withGroovyBuilder {
183-
"replaceregexp"("match" to """("org.seasar.doma:doma(-core|-processor)?:)[^"]*(")""",
195+
"replaceregexp"("match" to """("org.seasar.doma:doma-(core|processor|criteria)?:)[^"]*(")""",
184196
"replace" to "\\1${ver}\\3",
185197
"encoding" to encoding,
186198
"flags" to "g") {

0 commit comments

Comments
 (0)