forked from spring-attic/sagan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (83 loc) · 3.15 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
def vJavaLang = '1.8'
def javaProjects = [ project(':sagan-site'), project(':sagan-indexer'), project(':sagan-common') ]
def bootProjects = javaProjects - project(':sagan-common')
def gradleDir = "${rootProject.rootDir}/gradle"
wrapper.gradleVersion = '1.12'
buildscript {
ext.springRepo = 'http://repo.spring.io/libs-release'
repositories {
maven { url springRepo }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.1.12.RELEASE"
classpath 'org.cloudfoundry:cf-gradle-plugin:1.1.1' // see deploy.gradle
}
}
configure(allprojects) {
apply plugin: 'eclipse'
apply plugin: 'idea'
idea.module {
excludeDirs += [
file('bin'), // containing build artifacts from Eclipse (if any)
file('work'), // containing transient artifacts used by embedded Tomcat
file('logs'), // containing app logs written by embedded Tomcat
file('data'), // containing logs and data written by elasticsearch
file('.settings') // containing intentionally checked-in Eclipse metadata
]
}
}
configure(rootProject) {
apply from: 'gradle/gitMetadata.gradle'
idea.project {
languageLevel = vJavaLang
ipr {
withXml { provider ->
def mapping = provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping
mapping.@vcs = 'Git'
mapping.@directory = '$PROJECT_DIR$'
}
}
}
}
configure(javaProjects) {
apply plugin: 'java'
targetCompatibility = vJavaLang
sourceCompatibility = vJavaLang
repositories {
maven { url springRepo }
}
dependencies {
compile 'org.slf4j:slf4j-api'
compile 'org.projectlombok:lombok:1.16.2'
testCompile 'junit:junit'
testCompile 'org.hamcrest:hamcrest-library'
testCompile 'org.mockito:mockito-core'
}
configurations {
// replaced with jcl-over-slf4j
all*.exclude group: 'commons-logging', module: 'commons-logging'
// replaced with log4j-over-slf4j
all*.exclude group: 'log4j', module: 'log4j'
}
// Ensure that all Gradle-compiled classes are available to Eclipse's
// classpath.
eclipseClasspath.dependsOn testClasses
// Skip generation and removal of .settings/org.eclipse.jdt.core.prefs files
// during the normal `gradle eclipse` / `gradle cleanEclipse` lifecycle, as
// these files have been checked in with formatting settings imported from
// style/sagan-format.xml and style/sagan.importorder.
// See http://www.gradle.org/docs/current/userguide/eclipse_plugin.html
eclipseJdt.onlyIf { false }
cleanEclipseJdt.onlyIf { false }
}
configure(bootProjects) {
apply plugin: 'spring-boot'
apply from: "$gradleDir/integTest.gradle"
apply from: "$gradleDir/deploy.gradle"
apply from: "$gradleDir/writeGitPropertiesFile.gradle"
springBoot.backupSource = false
bootRun.dependsOn writeGitPropertiesFile
dependencies {
versionManagement 'io.spring.platform:platform-versions:1.0.5.RELEASE@properties'
}
}