-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
116 lines (94 loc) · 3.85 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
buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath("org.kt3k.gradle.plugin:coveralls-gradle-plugin:$gradleCoverallsVersion")
}
repositories {
mavenLocal()
jcenter()
}
}
plugins {
id "io.spring.dependency-management" version "0.6.0.RELEASE"
id "com.github.hierynomus.license" version "0.12.1"
}
allprojects {
repositories {
mavenLocal()
jcenter()
//needed for cf-java-client M release
maven { url 'http://repo.spring.io/libs-snapshot' }
maven { url 'http://repo.spring.io/release' }
maven { url 'http://repo.spring.io/milestone' }
maven { url 'http://repo.spring.io/snapshot' }
}
}
subprojects {
if (name == 'spring-apps' || name == 'acceptance') {
//prevent parent folder from building an empty jar
return
}
apply plugin: 'java'
apply from: "$rootProject.projectDir/test.gradle"
apply plugin: "io.spring.dependency-management"
sourceCompatibility = 1.8
targetCompatibility = 1.8
/* allow us not to specify most versions of the dependencies, since they will be retrieved according
to springBoot version. Normally we would only have to apply spring-boot plugin to achieve the same result,
but here we have a subproject that would not support it (common) but requires the dependencies nonetheless
*/
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
}
}
dependencies {
// Lombok
compileOnly "org.projectlombok:lombok:$lombokVersion"
//CF java client library and dependencies
compile("org.cloudfoundry:cloudfoundry-client-reactor:$cfClientLibVersion")
compile("org.cloudfoundry:cloudfoundry-operations:$cfClientLibVersion")
compile("io.projectreactor:reactor-core:$reactorCoreVersion")
compile("io.projectreactor.ipc:reactor-netty:$reactorNettyVersion")
compile("io.projectreactor:reactor-test:$reactorCoreVersion")
//Logs
compile "org.slf4j:slf4j-api"
compile "org.slf4j:jcl-over-slf4j"
// Spring Data
compile "org.springframework.data:spring-data-jpa"
compile "org.springframework.cloud:spring-cloud-spring-service-connector"
// Persistence
runtime "mysql:mysql-connector-java"
runtime "org.postgresql:postgresql"
runtime "com.h2database:h2"
compile "commons-dbcp:commons-dbcp"
compile "org.hibernate:hibernate-entitymanager"
compile "org.liquibase:liquibase-core:${liquibaseCoreVersion}"
//org.springframework.boot.autoconfigure needed in common for now... TODO move to spring-apps
compile "org.springframework.boot:spring-boot-starter-actuator"
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-parameters"
}
tasks.withType(Jar) { // includes War and Jar
manifest {
attributes( "Implementation-Title": baseName,
"Implementation-Version": version)
}
}
sourceSets.main.compileClasspath += configurations.compileOnly
sourceSets.test.compileClasspath += configurations.compileOnly
sourceSets.test.runtimeClasspath += configurations.compileOnly
}
apply from: "$rootProject.projectDir/coverage.gradle"
license {
header rootProject.file('config/HEADER')
strictCheck true
excludes(["**/*.css", "**/boost*", "**/bootbox*", "**/jquery*", "**/banner.txt", "**/*png",
"**/*eot", "**/*ttf", "**/*woff*", "**/*gif", "**/*jpg", "**/*tpl", "**/*svg", "**/*map",
"**/*xml", "**/*yaml"])
mapping {
java = 'PHP'
}
}
//no more wrapper task, use gradle wrapper --gradle-version 2.12 to generate wrappre