-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle.kts
106 lines (91 loc) · 2.92 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
plugins {
id("com.avast.gradle.docker-compose") version "0.14.0"
val kotlinVersion = "1.4.30"
kotlin("jvm") version kotlinVersion apply false
kotlin("multiplatform") version kotlinVersion apply false
kotlin("js") version kotlinVersion apply false
id("io.gitlab.arturbosch.detekt") version "1.16.0"
id("maven-publish")
}
val pluginGroup: String by project
val pluginName: String by project
val pluginVersion: String by project
val pluginSinceBuild: String by project
val pluginUntilBuild: String by project
val platformType: String by project
val platformVersion: String by project
val platformDownloadSources: String by project
group = pluginGroup
version = pluginVersion
repositories {
mavenCentral()
jcenter()
maven(url = "https://kotlin.bintray.com/kotlinx/")
}
subprojects {
ext {
set("vertxVersion", "4.0.2")
}
repositories {
mavenCentral()
jcenter()
maven(url = "https://kotlin.bintray.com/kotlinx/")
maven(url = "https://jitpack.io")
}
apply<MavenPublishPlugin>()
apply<io.gitlab.arturbosch.detekt.DetektPlugin>()
tasks {
withType<io.gitlab.arturbosch.detekt.Detekt> {
parallel = true
buildUponDefaultConfig = true
}
withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.apiVersion = "1.4"
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs +=
listOf(
"-Xno-optimized-callable-references",
"-Xjvm-default=compatibility"
)
}
withType<Test> {
testLogging {
events("passed", "skipped", "failed")
setExceptionFormat("full")
outputs.upToDateWhen { false }
showStandardStreams = true
}
}
}
}
gradle.buildFinished {
if (!gradle!!.startParameter.taskNames.contains("jsBrowserRun")) {
project.buildDir.deleteRecursively()
}
}
tasks {
register("downloadSkywalking") {
doLast {
println("Downloading Apache SkyWalking")
val f = File(projectDir, "test/e2e/apache-skywalking-apm-es7-8.4.0.tar.gz")
if (!f.exists()) {
java.net.URL("https://downloads.apache.org/skywalking/8.4.0/apache-skywalking-apm-es7-8.4.0.tar.gz")
.openStream().use { input ->
java.io.FileOutputStream(f).use { output ->
input.copyTo(output)
}
}
}
println("Downloaded Apache SkyWalking")
}
}
}
dockerCompose {
dockerComposeWorkingDirectory = "./test/e2e"
useComposeFiles = listOf("./docker-compose.yml")
//captureContainersOutput = true
}