-
Notifications
You must be signed in to change notification settings - Fork 40
/
build.gradle.kts
94 lines (80 loc) · 2.51 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
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
plugins {
java
id("org.springframework.boot") version Globals.Gradle.Plugin.springBootVersion
id("io.franzbecker.gradle-lombok") version Globals.Gradle.Plugin.lombokVersion
id("io.spring.dependency-management") version Globals.Gradle.Plugin.dependencyManagementVersion
id("com.github.ben-manes.versions") version Globals.Gradle.Plugin.versionsVersion
// gradle dependencyUpdates -Drevision=release
}
group = Globals.Project.groupId
version = Globals.Project.version
extra["junit.version"] = Globals.junitVersion
extra["lombok.version"] = Globals.lombokVersion
extra["junit-jupiter.version"] = Globals.junitJupiterVersion
java {
sourceCompatibility = Globals.javaVersion
targetCompatibility = Globals.javaVersion
}
repositories {
mavenCentral()
//maven { url = uri("https://repo.spring.io/snapshot/") }
maven { url = uri("https://repo.spring.io/milestone/") }
}
lombok {
version = Globals.lombokVersion
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-webflux")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
implementation("io.vavr:vavr:${Globals.vavrVersion}")
annotationProcessor("org.projectlombok:lombok")
testImplementation(platform("org.junit:junit-bom:${Globals.junitJupiterVersion}"))
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("junit:junit")
}
tasks {
withType(Wrapper::class.java) {
gradleVersion = Globals.Gradle.wrapperVersion
distributionType = Wrapper.DistributionType.BIN
}
withType<Test> {
useJUnitPlatform()
testLogging {
showExceptions = true
showStandardStreams = true
events(PASSED, SKIPPED, FAILED)
}
}
create<Zip>("sources") {
dependsOn("clean")
shouldRunAfter("clean", "assemble")
description = "Archives sources in a zip file"
group = "Archive"
from("buildSrc") {
into("buildSrc")
}
from("src") {
into("src")
}
from(".gitignore")
from(".java-version")
from(".travis.yml")
from("build.gradle.kts")
from("pom.xml")
from("README.md")
from("settings.gradle.kts")
archiveFileName.set("${project.buildDir}/sources-${project.version}.zip")
}
named("clean") {
doLast {
delete(
project.buildDir,
"${project.projectDir}/out"
)
}
}
}
defaultTasks("clean", "sources", "build")