forked from cloudfoundry/credhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
114 lines (94 loc) · 3.39 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
buildscript {
repositories {
mavenCentral()
maven { url("http://repo.spring.io/plugins-release") }
maven { url("https://plugins.gradle.org/m2/") }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.10.RELEASE")
classpath("org.owasp:dependency-check-gradle:3.1.1")
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
}
}
plugins {
id 'com.github.ben-manes.versions' version '0.17.0'
}
apply plugin: "java"
apply plugin: "idea"
apply plugin: "org.springframework.boot"
apply plugin: "org.owasp.dependencycheck"
jar {
baseName = "credhub"
def versionFile = new File("$projectDir/src/main/resources/version")
if (System.getenv("VERSION")) {
versionFile.write(System.getenv("VERSION"))
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
}
configurations.all {
exclude module: "spring-boot-starter-logging"
exclude module: "logback-classic"
}
ext['spring-security-oauth.version'] = '2.2.1.RELEASE'
dependencies {
// Spring stuff
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.boot:spring-boot-starter-log4j2")
testCompile("org.springframework.security:spring-security-test")
testCompile("org.springframework.boot:spring-boot-starter-test")
compile("org.springframework.security:spring-security-jwt")
compile("org.springframework.security.oauth:spring-security-oauth2")
// DB
compile("org.postgresql:postgresql:42.2.1")
compile("org.mariadb.jdbc:mariadb-java-client:2.2.1")
compile("org.flywaydb:flyway-core:5.0.7")
compile("com.h2database:h2:1.4.196")
// Other
compile("org.passay:passay:1.3.0")
compile("com.jayway.jsonpath:json-path:2.4.0")
compile("org.bouncycastle:bcpkix-jdk15on:1.59")
compile("com.google.guava:guava:23.6-jre")
compile("org.apache.commons:commons-lang3:3.7")
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.4")
compile("net.java.dev.jna:jna:4.5.1")
compile("org.apache.httpcomponents:httpclient:4.5.5")
testCompile("com.jayway.jsonpath:json-path-assert:2.4.0")
}
processResources {
outputs.upToDateWhen { false }
}
bootRun {
addResources = true
systemProperties = System.properties
systemProperties["spring.profiles.active"] = System.getProperty("spring.profiles.active", "dev, dev-h2")
}
task cleanAndAssemble(dependsOn: ['clean', 'assemble'])
assemble.mustRunAfter("clean")
test {
testLogging {
events "passed", "failed", "skipped"
exceptionFormat "full"
}
systemProperties = System.properties
systemProperties["spring.profiles.active"] = System.getProperty("spring.profiles.active", "unit-test-h2")
systemProperties["java.security.egd"] = System.getProperty("java.security.egd", "file:/dev/urandom")
outputs.upToDateWhen { false }
}
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}