-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
75 lines (66 loc) · 2.17 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import com.diffplug.gradle.eclipse.apt.Factorypath
plugins {
java
id("com.diffplug.eclipse.apt") version "4.2.0"
id("com.diffplug.spotless") version "7.0.2"
id("org.domaframework.doma.compile") version "3.0.1"
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
}
}
subprojects {
apply(plugin = "java")
apply(plugin = "com.diffplug.eclipse.apt")
apply(plugin = "com.diffplug.spotless")
apply(plugin = "org.domaframework.doma.compile")
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
}
withType<Test> {
useJUnitPlatform()
}
named("build") {
dependsOn("spotlessApply")
}
}
dependencies {
val domaVersion : String by project
annotationProcessor("org.seasar.doma:doma-processor:${domaVersion}")
implementation("org.seasar.doma:doma-core:${domaVersion}")
implementation("org.seasar.doma:doma-slf4j:${domaVersion}")
runtimeOnly("ch.qos.logback:logback-classic:1.5.16")
runtimeOnly("com.h2database:h2:2.3.232")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.4")
}
eclipse {
classpath {
file {
whenMerged {
val classpath = this as org.gradle.plugins.ide.eclipse.model.Classpath
val folder = org.gradle.plugins.ide.eclipse.model.SourceFolder(".apt_generated", "bin/main")
classpath.entries.add(folder)
val dir = file(folder.path)
if (!dir.exists()) {
dir.mkdir()
}
}
}
}
project {
buildCommand("org.eclipse.buildship.core.gradleprojectbuilder")
natures("org.eclipse.buildship.core.gradleprojectnature")
}
// Reset all Eclipse settings when "Refresh Gradle Project" is executed
synchronizationTasks("cleanEclipse", "eclipse")
}
spotless {
java {
googleJavaFormat("1.23.0")
}
}
}