forked from CircleCI-Public/circleci-demo-java-spring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
72 lines (57 loc) · 1.98 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
// Based on the guide here: https://guides.gradle.org/building-spring-boot-2-projects-with-gradle/
plugins {
id 'java'
id 'com.gradle.build-scan' version '3.0'
id 'org.springframework.boot' version '2.2.0.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
}
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
group = 'com.circleci'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.11'
repositories {
mavenCentral()
}
// Currently only needed for spring-boot-devtools
// https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-dependencies:2.2.0.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
compile group: 'org.webjars', name: 'bootstrap', version: '3.3.7'
runtime 'org.postgresql:postgresql:42.2.6'
runtime 'com.h2database:h2'
developmentOnly("org.springframework.boot:spring-boot-devtools")
}
task bootRunDev(type: org.springframework.boot.gradle.tasks.run.BootRun) {
group = 'Application'
doFirst() {
main = bootJar.mainClassName
classpath = sourceSets.main.runtimeClasspath
systemProperty 'spring.profiles.active', 'local'
}
}
buildScan {
// always accept the terms of service
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
// always publish a build scan
publishAlways()
}
// Based on the guide here: https://github.com/codecov/example-gradle
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
check.dependsOn jacocoTestReport