-
Notifications
You must be signed in to change notification settings - Fork 1
/
ms-build.gradle
70 lines (60 loc) · 2.16 KB
/
ms-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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.3.0.RELEASE'
classpath 'io.spring.gradle:dependency-management-plugin:1.0.7.RELEASE'
}
}
apply plugin: 'war'
apply plugin: org.springframework.boot.gradle.plugin.SpringBootPlugin
apply plugin: io.spring.gradle.dependencymanagement.DependencyManagementPlugin
apply from: "${rootDir}/.cci-common/build.gradle"
dependencies {
// Spring Boot
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version:'2.3.0.RELEASE'
implementation 'org.springframework.boot:spring-boot-dependencies:2.0.5.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// Prometheus
compile 'io.micrometer:micrometer-registry-prometheus:latest.release'
implementation 'io.micrometer:micrometer-registry-prometheus'
// Swagger
compile 'io.springfox:springfox-swagger2:2.9.1'
compile 'io.springfox:springfox-swagger-ui:2.9.1'
}
ext {
set('githubRunId', System.getenv()['GITHUB_RUN_ID'])
set('githubServerUrl', System.getenv()['GITHUB_SERVER_URL'])
set('githubRepository', System.getenv()['GITHUB_REPOSITORY'])
}
war {
enabled = true
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "${rootProject.name}"
from components.web
}
}
}
springBoot {
buildInfo {
properties {
additional = [
'actions.runid': System.getenv()['GITHUB_RUN_ID'] ? System.getenv()['GITHUB_RUN_ID'] : '',
'actions.runurl': "${githubServerUrl}/${githubRepository}/actions/runs/${githubRunId}"
]
}
}
}