forked from HLTech/judge-d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (85 loc) · 2.32 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
buildscript {
ext {
repos = {
gradlePluginPortal()
mavenCentral()
}
springBootVersion = '2.7.0'
springCloudVersion = '3.1.3'
lombokVersion = '1.18.24'
feignVersion = '11.8'
vauntVersion = '1.0.28'
jdbcVersion = '5.3.15'
liquidbaseVersion = '4.6.2'
openApiVersion = '1.6.9'
requestValidatorPactVersion = '2.22.0'
postgresVersion = '42.3.6'
kubernetesClientVersion = '5.12.2'
httpClientVersion = '4.5.13'
consulApiVersion = '1.4.5'
coverallsVersion = '2.12.0'
palantirDockerVersion = '0.33.0'
grgitVersion = '4.1.1'
}
}
plugins {
id 'org.springframework.boot' version "${springBootVersion}"
id 'com.github.kt3k.coveralls' version "${coverallsVersion}"
id "com.palantir.docker" version "${palantirDockerVersion}"
id 'org.ajoberstar.grgit' version "${grgitVersion}"
}
allprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'jacoco'
compileJava {
options.release = 11
}
repositories(repos)
group = 'com.hltech.judged'
version = buildVersion()
jacoco {
toolVersion = "0.8.6"
}
}
subprojects {
apply plugin: 'groovy'
apply plugin: 'application'
apply plugin: 'com.palantir.docker'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply from: '../gradle/test.gradle'
jar {
enabled = false
}
}
bootJar {
enabled = false
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled true
html.enabled true
csv.enabled false
}
}
codeCoverageReport.dependsOn {
subprojects*.test
}
def buildVersion() {
def baseVersion = 1
def commitsCount = grgit.log().size()
def lastCommit = grgit.head().abbreviatedId
return "${baseVersion}.${commitsCount}.0_${lastCommit}"
}