-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
112 lines (89 loc) · 2.58 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
buildscript {
ext {
springBootVersion = '1.4.1.RELEASE'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'se.transmode.gradle:gradle-docker:1.2'
}
}
plugins {
id "org.sonarqube" version "2.2"
}
apply plugin: 'groovy'
apply plugin: 'spring-boot'
apply plugin: 'docker'
apply plugin: 'jacoco'
jar {
baseName = 'self-training'
version = '0.0.2-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven {
url "http://dl.bintray.com/basecrm/maven"
}
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-aop'
compile 'org.springframework.boot:spring-boot-starter-hateoas'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'com.getbase:basecrm-java:1.4.4'
compile 'org.projectlombok:lombok:1.16.10'
compile 'com.ryantenney.metrics:metrics-spring:3.1.3'
// Enable standard JVM metrics in Spring Boot /metrics
compile 'io.dropwizard.metrics:metrics-jvm:3.1.2'
// Enable SLF4J's Logback metrics in Spring Boot /metrics
compile 'io.dropwizard.metrics:metrics-logback:3.1.2'
// Enable Apache HTTP Client metrics in Spring Boot /metrics
compile 'io.dropwizard.metrics:metrics-httpclient:3.1.2'
testCompile 'org.spockframework:spock-spring:1.1-groovy-2.4-rc-2'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'org.awaitility:awaitility:2.0.0'
testCompile 'org.awaitility:awaitility-groovy:2.0.0'
testCompile 'cglib:cglib-nodep:3.2.4'
}
test {
outputs.upToDateWhen { false }
systemProperties = System.properties
}
task logInfo {
logging.captureStandardOutput LogLevel.INFO
logging.captureStandardError LogLevel.ERROR
}
bootRun {
systemProperties = System.properties
}
task buildDocker (type: Docker, dependsOn: build) {
group = 'build'
description = 'Builds Docker container to run the workflow'
push = false
applicationName = jar.baseName
version = jar.version
dockerfile = file('src/main/resources/docker/Dockerfile')
doFirst {
copy {
from jar
into stageDir
}
}
}
sonarqube {
properties {
property "sonar.jacoco.reportPath", "build/jacoco/test.exec"
property "sonar.groovy.jacoco.reportPath", "build/jacoco/test.exec"
}
}
jacoco {
toolVersion = "0.7.7.201606060606"
}
task javadocs(type: Javadoc, dependsOn: build) {
description = "Generates Javadoc documentation"
source = sourceSets.main.allJava
}