-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
126 lines (111 loc) · 5.25 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
apply plugin: 'idea'
subprojects {
apply plugin: 'java'
def localEnv = new Properties();
localEnv.load(new FileInputStream(file("${projectDir}/../env/local.properties")))
repositories {
mavenCentral()
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/libs-snapshot" }
maven { url "http://repo.spring.io/milestone" }
}
task checkStyle(type: Checkstyle) {
configFile file("${project.projectDir}/../config/checkstyle/checkstyle.xml")
}
test {
environment localEnv
}
task stopMockClientIndex(type: Exec) {
commandLine 'bash', '-c', "ps aux | grep wiremock | awk '{print \$2}' | head -1 | xargs -n 1 kill -9 \$1"
ignoreExitValue true
}
jar.dependsOn 'checkStyle'
}
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}
ext.libraries = [
spring_framework : "org.springframework:spring-core:4.1.0.RELEASE",
spring_boot_logging : "org.springframework.boot:spring-boot-starter-log4j:1.2.0.RELEASE",
spring_boot_actuator : "org.springframework.boot:spring-boot-starter-actuator:1.2.0.RELEASE",
spring_data_cassandra : "org.springframework.data:spring-data-cassandra:1.2.+",
spring_core : "org.springframework:spring-core:4.1.3.RELEASE",
spring_context_support : "org.springframework:spring-context-support:4.1.0.RELEASE",
mutagen : "com.toddfast.mutagen:mutagen:0.3.0",
mutagen_cassandra : "com.toddfast.mutagen:mutagen-cassandra:0.4.2-SNAPSHOT",
snappy : 'org.xerial.snappy:snappy-java:1.1.1-M1',
commons_codec : 'commons-codec:commons-codec:1.9',
gson : 'com.google.code.gson:gson:2.2.4',
xpp3 : 'xpp3:xpp3_min:1.1.3.4.O',
saxen : 'net.sf.saxon:Saxon-HE:9.4',
xmlpull : 'xmlpull:xmlpull:1.1.3.1',
apache_commons_io : 'commons-io:commons-io:2.4',
jackson : 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.4.0',
saxon : 'net.sf.saxon:Saxon-HE:9.5.1-6',
rxjava : 'io.reactivex:rxjava:1.0.15',
rome : "rome:rome:1.0",
rome_tools : "com.rometools:rome:1.5.0",
time_uuid : "com.eaio.uuid:uuid:3.2",
spring_security : "org.springframework.security:spring-security-web:3.2.5.RELEASE",
spring_boot_security : "org.springframework.boot:spring-boot-starter-security:1.2.0.RELEASE",
spring_web : "org.springframework:spring-web:4.1.6.RELEASE",
eclipse_moxy : "org.eclipse.persistence:org.eclipse.persistence.moxy:2.5.2",
ehcache_core : "net.sf.ehcache:ehcache-core:2.6.10",
commons_lang : "org.apache.commons:commons-lang3:3.3.2",
joda_time : "joda-time:joda-time:2.7",
lz4 : "net.jpountz.lz4:lz4:1.3.0",
lambdaj : "com.googlecode.lambdaj:lambdaj:2.3.3",
hapi_fhir_base : 'ca.uhn.hapi.fhir:hapi-fhir-base:2.3',
hapi_fhir_structures : 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:2.3',
hapi_fhir_validation_resources : 'ca.uhn.hapi.fhir:hapi-fhir-validation-resources-dstu3:2.3',
phloc_schematron : 'com.phloc:phloc-schematron:2.7.1',
phloc_commons : 'com.phloc:phloc-commons:4.3.6',
hector_core : 'me.prettyprint:hector-core:1.0-5'
]
ext.testLibraries = [
junit : dependencies.create("junit:junit:4.10") {
exclude module: 'hamcrest-core'
force = true
},
netty : "io.netty:netty:3.9.0.Final",
mockito : "org.mockito:mockito-all:1.8.4",
spring_test : "org.springframework:spring-test:4.1.1.RELEASE",
cassandra_unit_spring: "org.cassandraunit:cassandra-unit-spring:2.0.2.2",
wiremock : "com.github.tomakehurst:wiremock:1.58",
hamcrest_core : "org.hamcrest:hamcrest-all:1.3"
]
def exportEnvironmentVariablesToXML(defaults) {
defaults.remove(defaults.envs)
Properties environmentVariables = new Properties();
environmentVariables.load(new FileInputStream(new File('env/local.properties')))
defaults.append new NodeBuilder().envs() {
environmentVariables.each { prop, value ->
env(name: prop, value: value)
}
}
}
idea {
workspace {
iws.withXml { xmlFile ->
def runManager = xmlFile.asNode().component.find { it.@name == 'RunManager' }
def junitDefaults = runManager.configuration.find { it.@default == 'true' && it.@type == 'JUnit' }
junitDefaults.remove(junitDefaults.envs)
junitDefaults.append new NodeBuilder().envs() {
env(name: 'PATH_TO_CONFIG', value: "\$PROJECT_DIR\$/env/local.properties")
}
/*Configuring application runtime parameters*/
exportEnvironmentVariablesToXML(runManager.configuration.find {
it.@default == 'true' && it.@type == 'Application'
});
}
}
project {
jdkName = '1.8'
languageLevel = '1.8 '
}
}
buildscript {
repositories {
mavenCentral()
}
}