-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle.kts
83 lines (72 loc) · 2.09 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
76
77
78
79
80
81
82
import java.net.URL
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
java
jacoco
id("org.openstreetmap.josm") version "0.8.2"
}
object Versions {
const val jacoco = "0.8.11"
const val junit = "5.10.1"
}
repositories {
jcenter()
}
dependencies {
testImplementation("org.openstreetmap.josm:josm-unittest:SNAPSHOT"){isChanging=true}
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Versions.junit}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${Versions.junit}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${Versions.junit}")
}
tasks.withType(JavaCompile::class) {
options.compilerArgs.addAll(
arrayOf("-Xlint:all", "-Xlint:-serial")
)
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
josm {
manifest {
oldVersionDownloadLink(17903, "2.1.15", URL("https://github.com/JOSM/pt_assistant/releases/download/v2.1.15/pt_assistant.jar"))
oldVersionDownloadLink(14149, "2.1.6", URL("https://github.com/JOSM/pt_assistant/releases/download/v2.1.6/pt_assistant.jar"))
oldVersionDownloadLink(14027, "v2.1.4", URL("https://github.com/JOSM/pt_assistant/releases/download/v2.1.4/pt_assistant.jar"))
oldVersionDownloadLink(13957, "v2.0.0", URL("https://github.com/JOSM/pt_assistant/releases/download/v2.0.0/pt_assistant.jar"))
}
i18n {
pathTransformer = getPathTransformer(project.projectDir, "github.com/JOSM/pt_assistant/blob")
}
}
tasks.withType(Test::class) {
testLogging.exceptionFormat = TestExceptionFormat.FULL
}
sourceSets {
getByName("test") {
java {
setSrcDirs(setOf("test/unit"))
}
resources {
setSrcDirs(setOf("test/data"))
}
}
}
tasks.withType(ProcessResources::class).getByName(sourceSets["main"].processResourcesTaskName) {
from(projectDir) {
include("images/**")
include("GPL-*")
include("README.md")
include("LICENSE")
}
}
jacoco {
toolVersion = Versions.jacoco
}
tasks.jacocoTestReport {
reports {
html.isEnabled = true
xml.isEnabled = true
}
}