-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
61 lines (58 loc) · 1.85 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
///////////////////////////////////////////////////////////////////////////////
// GRADLE CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
plugins {
java
id("com.diffplug.spotless") version "6.25.0"
}
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath("org.eclipse.keypop:keypop-gradle:0.1.+") { isChanging = true }
}
}
apply(plugin = "org.eclipse.keypop")
///////////////////////////////////////////////////////////////////////////////
// APP CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.assertj:assertj-core:3.25.3")
}
val javaSourceLevel: String by project
val javaTargetLevel: String by project
java {
sourceCompatibility = JavaVersion.toVersion(javaSourceLevel)
targetCompatibility = JavaVersion.toVersion(javaTargetLevel)
println("Compiling Java $sourceCompatibility to Java $targetCompatibility.")
withJavadocJar()
withSourcesJar()
}
///////////////////////////////////////////////////////////////////////////////
// TASKS CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
tasks {
spotless {
java {
target("src/**/*.java")
licenseHeaderFile("${project.rootDir}/LICENSE_HEADER")
importOrder("java", "javax", "org", "com", "")
removeUnusedImports()
googleJavaFormat()
}
}
test {
testLogging {
events("passed", "skipped", "failed")
}
}
}