-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle
135 lines (99 loc) · 3.16 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
import java.util.regex.Matcher;
buildscript {
ext {
springBootVersion = '1.4.2.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE')
}
}
plugins {
id "com.github.samueltbrown.cucumber" version "0.9"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
jar {
baseName = 'davos'
version = file('version.txt').text.trim()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
all*.exclude module : 'spring-boot-starter-logging'
bddTestCompile
testCompile.extendsFrom bddTestCompile
}
sourceSets {
bbdTest {
java { srcDir 'src/cucumber/java' }
resources { srcDir 'src/cucumber/resources' }
compileClasspath += test.output
}
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-thymeleaf'
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
compile 'org.springframework.boot:spring-boot-starter-jdbc'
compile 'org.apache.logging.log4j:log4j-api:2.16.0'
compile 'org.apache.logging.log4j:log4j-core:2.16.0'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.16.0'
compile 'com.jcraft:jsch:0.1.50'
compile 'joda-time:joda-time:2.3'
compile 'commons-net:commons-net:3.3'
compile 'commons-io:commons-io:2.4'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.amazonaws:aws-java-sdk-sns:1.11.167'
runtime 'com.h2database:h2'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'org.assertj:assertj-core:3.2.0'
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'junit:junit:4.11'
bddTestCompile 'org.mockftpserver:MockFtpServer:2.6'
bddTestCompile 'org.apache.sshd:sshd-core:1.4.0'
bddTestCompile 'info.cukes:cucumber-java:1.2.4'
cucumberCompile 'info.cukes:cucumber-java:1.2.4'
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.14'
}
task updateBuildVersion << {
Matcher matcher = file('version.txt').text.trim() =~ /(.+)\.(.+)\.(.+)$/
if (matcher.find()) {
String major = matcher.group(1)
String minor = matcher.group(2)
String patch = matcher.group(3).trim()
int nextBuild = Integer.valueOf(patch) + 1
String updatedVersion = "${major}.${minor}.${nextBuild}"
file('version.txt').text = "${updatedVersion}\n"
}
}
task copyConfig(type: Copy) {
def location = project.hasProperty('env') ? "$env" : 'local'
from "conf/${location}"
into "src/main/resources/"
}
cucumber {
jvmOptions {
maxHeapSize = '512m'
environment 'ENV', 'staging'
}
}
build.dependsOn copyConfig
build.mustRunAfter copyConfig