-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
138 lines (104 loc) · 3.78 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'docker'
apply plugin: 'jacoco'
group = 'com.nathan.fileparser'
version = release + '.' + build
description = """File Parser"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
jacoco
ajc
aspects
ajInpath
sql
all*.exclude module: 'slf4j-log4j12'
all*.exclude module: 'servlet-api'
}
repositories {
maven { url "https://repo.maven.apache.org/maven2/" }
}
buildscript {
ext {
springBootVersion = '1.5.4.RELEASE'
}
repositories {
maven { url "https://repo.maven.apache.org/maven2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('se.transmode.gradle:gradle-docker:1.2')
}
}
//eclipse.classpath.downloadJavadoc = true // defaults to 'false'
eclipse.classpath.downloadSources = true
dependencies {
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version:'1.5.4.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-aop', version:'1.5.4.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-parent', version:'1.5.4.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:'1.5.4.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version: '1.5.4.RELEASE'
compile group: 'javax.servlet', name: 'jstl', version:'1.2'
compile group: 'javax.validation', name: 'validation-api'
//xml-rpc client jars
compile(group: 'commons-logging', name: 'commons-logging-api', version: '1.1')
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
compile group: 'commons-logging', name: 'commons-logging', version: '1.2'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
compile group: 'commons-io', name: 'commons-io', version:'2.0.1'
compile group: 'org.projectlombok', name: 'lombok', version:'1.16.6'
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:'1.5.4.RELEASE'
testCompile group: 'junit', name: 'junit', version:'4.12'
}
processResources {
filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [version: project.version])
}
test {
jacoco {
//append = false
destinationFile = file("$buildDir/coverage-results/jacoco.exec")
}
exclude "**/cucumber/**"
}
jar {
from files(sourceSets.main.output.classesDir)
//exclude 'config'
manifest {
attributes("Implementation-Title": "FileParserWebService", "Implementation-Version": version)
attributes 'Main-class':'com.nathan.fileparser.service.Application'
afterEvaluate {
Collection classpath = configurations.compile.collect {"$it.name" }
attributes("Class-Path" : "config/ " + classpath.join(' '))
}
}
}
task zip(type: Zip , dependsOn: jar) {
fileMode = 0755
from("scripts")
into('config'){
from("$buildDir/resources/main/config/")
from("$buildDir/resources/test/")
}
into('libs') {
from configurations.runtime
from("$buildDir/libs/")
}
}
artifacts {
archives zip
}
task wrapper(type: Wrapper) {
gradleVersion = '1.2'
}
jacoco {
toolVersion = '0.7.7.201606060606'
}