This repository has been archived by the owner on Nov 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
97 lines (79 loc) · 2.17 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
buildscript {
ext {
springBootVersion = '1.5.8.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
plugins {
id 'org.sonarqube' version '2.6'
id 'net.researchgate.release' version '2.4.0'
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'jacoco'
jar {
baseName = 'meterNG'
archiveName = project.name + '.jar'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
dev
}
springBoot {
executable = true
}
task copySupportFiles(type: Copy){
from 'src/main/resources/buildsupport'
into 'build/libs'
include '**/.conf'
rename { String fileName ->
fileName.replace('.conf', project.name+'.conf')}
}
jacoco {
reportsDir = file("build/tmp/jacoco.exec")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}
sonarqube {
properties {
property "sonar.exclusions", "**/*.js, **/jparsec/**"
property "sonar.sourceEncoding", "UTF-8"
}
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-mail')
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.liquibase:liquibase-core')
compile('com.google.visualization:visualization-datasource:1.1.1')
compile('org.thymeleaf.extras:thymeleaf-extras-java8time:2.1.0.RELEASE')
runtime('com.h2database:h2')
runtime('mysql:mysql-connector-java')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('net.sourceforge.htmlunit:htmlunit:2.23')
testCompile('com.icegreen:greenmail:1.5.2')
dev('org.springframework.boot:spring-boot-devtools')
}
bootRun {
environment "spring.profiles.active", "dev"
// Use Spring Boot DevTool only when we run Gradle bootRun task
classpath = sourceSets.main.runtimeClasspath + configurations.dev
}
test.finalizedBy(jacocoTestReport)
build.finalizedBy(copySupportFiles)