forked from JOSM/pt_assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
87 lines (77 loc) · 2.23 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
83
84
85
86
87
import java.net.URL
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
java
jacoco
id("org.openstreetmap.josm") version "0.7.1"
}
object Versions {
const val awaitility = "4.0.3"
const val jacoco = "0.8.6"
const val junit = "5.7.0"
const val wiremock = "2.27.2"
}
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.vintage:junit-vintage-engine:${Versions.junit}")
testImplementation("com.github.tomakehurst:wiremock:${Versions.wiremock}")
testImplementation("org.awaitility:awaitility:${Versions.awaitility}")
}
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(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 {
xml.isEnabled = true
html.isEnabled = true
}
dependsOn(tasks.test)
tasks.check.get().dependsOn(this)
}