-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
112 lines (94 loc) · 2.18 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
plugins {
id 'java'
id 'jacoco'
id 'org.sonarqube' version '4.4.1.3373'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
id 'com.diffplug.spotless' version "6.22.0"
id "io.freefair.lombok" version "8.4"
}
group = 'com.github.ehayik'
version = '0.0.1'
repositories {
mavenCentral()
}
ext {
set('springShellVersion', "3.2.3")
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
implementation 'org.springframework.shell:spring-shell-starter'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.javamoney:moneta:1.4.4'
implementation 'net.sizovs:pipelinr:0.8'
implementation 'com.maciejwalkowiak.spring:spring-boot-http-clients:0.1.1'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'com.maciejwalkowiak.spring:wiremock-spring-boot:2.1.2'
testImplementation 'org.awaitility:awaitility:4.2.1'
}
dependencyManagement {
imports {
mavenBom "org.springframework.shell:spring-shell-dependencies:${springShellVersion}"
}
}
bootJar {
launchScript()
}
//-- Java version
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.named('test') {
useJUnitPlatform()
}
//-- Code coverage
jacocoTestReport {
reports {
xml.required.set(true)
}
}
test.finalizedBy jacocoTestReport
//-- Static code analysis
sonarqube {
properties {
property "sonar.projectKey", "ehayik_coindesk-client"
property "sonar.organization", "eljaiek"
property "sonar.host.url", "https://sonarcloud.io"
}
}
//-- Code formatting
apply plugin: 'com.diffplug.spotless'
spotless {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**', '**/build-*/**'
}
palantirJavaFormat()
importOrder()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
toggleOffOn()
}
}
tasks.register('updateGitHooks', Copy) {
from './scripts/pre-commit'
into './.git/hooks'
}
compileJava.dependsOn updateGitHooks
//-- Cleaning
tasks.register("deleteLogs", Delete) {
delete fileTree('.') {
include '**/*.log'
include '**/*.gz'
}
}
clean.dependsOn deleteLogs