-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
130 lines (116 loc) · 4.5 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
id("io.gitlab.arturbosch.detekt") apply false
id("io.spring.dependency-management")
id("org.springframework.boot") apply false
kotlin("jvm") apply false
kotlin("plugin.spring") apply false
idea
java
`maven-publish`
}
subprojects {
apply(plugin = "kotlin")
apply(plugin = "maven-publish")
apply(plugin = "io.spring.dependency-management")
apply(plugin = "org.springframework.boot")
group = "digital.capsa"
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType<Detekt> {
failFast = false
jvmTarget = "17"
}
tasks.withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
repositories {
maven { setUrl("https://repo1.maven.org/maven2") }
mavenCentral()
google()
maven { setUrl("https://mvnrepository.com/artifact") }
maven { setUrl("https://dl.bintray.com/kotlin/kotlinx.html") }
}
dependencyManagement {
imports {
mavenBom("io.projectreactor:reactor-bom:${CoreVersion.REACTOR_BOM}")
}
dependencies {
dependency("ch.qos.logback.contrib:logback-json-classic:${CoreVersion.LOGBACK_CONTRIB}")
dependency("ch.qos.logback.contrib:logback-jackson:${CoreVersion.LOGBACK_CONTRIB}")
dependency("com.willowtreeapps.assertk:assertk-jvm:${CoreVersion.ASSERTK_JVM}")
dependency("org.hamcrest:java-hamcrest:${CoreVersion.JAVA_HAMCREST}")
dependency("com.github.tomakehurst:wiremock-jre8:${CoreVersion.WIREMOCK_JRE8}")
dependency("org.seleniumhq.selenium:selenium-java:${CoreVersion.SELENIUM}")
dependency("org.seleniumhq.selenium:selenium-chrome-driver:${CoreVersion.SELENIUM}")
dependency("org.seleniumhq.selenium:selenium-firefox-driver:${CoreVersion.SELENIUM}")
dependency("com.google.guava:guava:${CoreVersion.GUAVA}")
dependency("org.springdoc:springdoc-openapi-ui:${CoreVersion.OPENAPI}")
dependency("com.sun.xml.bind:jaxb-core:${CoreVersion.JAXB_IMPL}")
dependency("com.sun.xml.bind:jaxb-impl:${CoreVersion.JAXB_IMPL}")
dependency("javax.xml.bind:jaxb-api:${CoreVersion.JAXB_API}")
dependency("org.apache.jmeter:ApacheJMeter_http:${CoreVersion.JMETER}") {
exclude("org.apache.logging.log4j:log4j-slf4j-impl")
exclude("org.apache.jmeter:bom")
}
dependency("kg.apc:jmeter-plugins-casutg:${CoreVersion.JMETER_JPGC_CASUTG}") {
exclude("org.apache.logging.log4j:log4j-slf4j-impl")
}
}
}
tasks.named<Test>("test") {
useJUnitPlatform {
includeEngines("junit-jupiter")
excludeEngines("junit-vintage")
}
//testLogging.showStandardStreams = false
testLogging {
showCauses = true
showExceptions = true
showStackTraces = true
showStandardStreams = true
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
afterSuite(KotlinClosure2<TestDescriptor, TestResult, Any>({ desc, result ->
if (desc.parent == null) { // will match the outermost suite
val output =
"Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
println(output)
}
}))
}
}
tasks.getByName<BootJar>("bootJar") {
enabled = false
}
tasks.getByName<Jar>("jar") {
enabled = true
}
publishing {
publications {
create<MavenPublication>("default") {
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/capsa-digital/capsa-libs")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
}