This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
94 lines (81 loc) · 2.29 KB
/
build.gradle
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
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://repo.spring.io/plugins-release' }
}
}
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.springKotlin) //equivalent to allOpen
alias(libs.plugins.springBoot)
alias(libs.plugins.spotless)
alias(libs.plugins.gradleGitProperties)
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.gorylenko.gradle-git-properties'
group = 'io.projectreactor'
version = '0.0.5-SNAPSHOT'
sourceCompatibility = 1.8
ext {
isCiServer = System.getenv().containsKey("CI")
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter-webflux')
implementation('org.springframework.boot:spring-boot-starter-actuator')
implementation(libs.kotlin.stdlib)
implementation(libs.kotlin.reflect)
implementation('io.projectreactor.kotlin:reactor-kotlin-extensions')
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
testImplementation('org.springframework.boot:spring-boot-starter-test')
testImplementation('io.projectreactor:reactor-test')
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
}
springBoot {
buildInfo()
}
test {
useJUnitPlatform()
}
spotless {
if (project.hasProperty("spotlessFrom")) {
if (project.spotlessFrom == "ALL") {
println "[Spotless] Ratchet deactivated"
}
else {
println "[Spotless] Ratchet from $project.spotlessFrom"
ratchetFrom project.spotlessFrom
}
}
else if (isCiServer) {
println "[Spotless] CI detected without explicit branch, not enforcing check"
enforceCheck false
}
else {
String spotlessBranch = "origin/main"
println "[Spotless] Local run detected, ratchet from $spotlessBranch"
ratchetFrom spotlessBranch
}
kotlin {
licenseHeaderFile('codequality/spotless/licenseSlashstarStyle.txt')
}
java {
licenseHeaderFile('codequality/spotless/licenseSlashstarStyle.txt')
}
}
compileJava.dependsOn(processResources)