This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
63 lines (60 loc) · 2.06 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
///////////////////////////////////////////////////////////////////////////////
// GRADLE CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
plugins {
java
id("com.diffplug.spotless") version "5.10.2"
}
buildscript {
repositories {
mavenLocal()
maven(url = "https://repo.eclipse.org/service/local/repositories/maven_central/content")
mavenCentral()
}
dependencies {
classpath("org.eclipse.keyple:keyple-gradle:0.2.+") { isChanging = true }
}
}
apply(plugin = "org.eclipse.keyple")
///////////////////////////////////////////////////////////////////////////////
// APP CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
repositories {
mavenLocal()
maven(url = "https://repo.eclipse.org/service/local/repositories/maven_central/content")
mavenCentral()
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots")
}
dependencies {
implementation("org.calypsonet.terminal:calypsonet-terminal-reader-java-api:1.2.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.assertj:assertj-core:3.15.0")
}
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")
}
}
}