forked from spring-attic/spring-social
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
179 lines (152 loc) · 6.79 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/*
* Copyright 2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.springframework.build.Version
// -----------------------------------------------------------------------------
// Main gradle build file for Spring Social
// @author Chris Beams
// @author Craig Walls
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Configuration for the root project
// -----------------------------------------------------------------------------
description = 'Spring Social'
abbreviation = 'SOCIAL'
apply plugin: 'base'
apply plugin: 'idea'
def buildSrcDir = "$rootDir/buildSrc"
apply from: "$buildSrcDir/wrapper.gradle"
apply from: "$buildSrcDir/maven-root-pom.gradle"
// -----------------------------------------------------------------------------
// Configuration for all projects including this one (the root project)
//
// @see settings.gradle for list of all subprojects
// -----------------------------------------------------------------------------
allprojects {
// group will translate to groupId during pom generation and deployment
group = 'org.springframework.social'
// version will be used in maven pom generation as well as determining
// where artifacts should be deployed, based on release type of snapshot,
// milestone or release.
// @see org.springframework.build.Version under buildSrc/ for more info
// @see gradle.properties for the declaration of this property.
version = new Version(springSocialVersion)
// default set of maven repositories to be used when resolving dependencies
repositories {
mavenRepo urls: 'http://maven.springframework.org/release'
mavenRepo urls: 'http://maven.springframework.org/milestone'
mavenRepo urls: 'http://maven.springframework.org/snapshot'
mavenCentral()
}
}
// -----------------------------------------------------------------------------
// Create collections of subprojects - each will receive their own configuration
// - all subprojects that start with spring-social-* are 'java projects'
// - documentation-related subprojects are not collected here
//
// @see configure(*) sections below
// -----------------------------------------------------------------------------
javaprojects = subprojects.findAll { project ->
project.path.startsWith(':spring-social-')
}
// -----------------------------------------------------------------------------
// Configuration for all java subprojects
// -----------------------------------------------------------------------------
configure(javaprojects) {
apply plugin: 'java' // tasks for conventional java lifecycle
apply plugin: 'maven' // `gradle install` to push jars to local .m2 cache
apply plugin: 'eclipse' // `gradle eclipse` to generate .classpath/.project
apply plugin: 'idea' // `gradle idea` to generate .ipr/.iml
// set up dedicated directories for jars and source jars.
// this makes it easier when putting together the distribution
libsBinDir = new File(libsDir, 'bin')
libsSrcDir = new File(libsDir, 'src')
// add tasks for creating source jars and generating poms etc
apply from: "$buildSrcDir/maven-deployment.gradle"
// add tasks for finding and publishing .xsd files
apply from: "$buildSrcDir/schema-publication.gradle"
h2Version = '1.3.159'
httpComponentsVersion = '4.1.2'
jacksonVersion = '1.8.5'
javaxInjectVersion = '1'
junitVersion = '4.9'
mockitoVersion = '1.8.5'
servletApiVersion = '2.5'
springVersion = '3.1.0.M2'
springSecurityCryptoVersion = '3.1.0.RC3'
sourceSets {
main {
resources {
srcDirs = ['src/main/java']
}
}
test {
resources {
srcDirs = ['src/test/java']
}
}
}
// dependencies that are common across all java projects
dependencies {
testCompile "junit:junit:$junitVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
}
// enable all compiler warnings (GRADLE-1077)
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all']
// generate .classpath files without GRADLE_CACHE variable (GRADLE-1079)
eclipseClasspath.variables = [:]
}
// -----------------------------------------------------------------------------
// Configuration for each individual core java subproject
//
// @see configure(javaprojects) above for general config
// -----------------------------------------------------------------------------
project('spring-social-core') {
description = 'Foundational module containing the ServiceProvider Connect Framework and Service API invocation support.'
dependencies {
compile ("org.springframework:spring-jdbc:$springVersion") { optional = true }
compile ("org.springframework:spring-web:$springVersion")
compile ("org.springframework.security:spring-security-crypto:$springSecurityCryptoVersion") { optional = true }
compile ("org.apache.httpcomponents:httpclient:$httpComponentsVersion") { optional = true }
testCompile "com.h2database:h2:$h2Version"
}
}
project('spring-social-web') {
description = 'Spring Web Integration'
dependencies {
compile ("javax.inject:javax.inject:$javaxInjectVersion")
compile "org.springframework:spring-web:$springVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile ("javax.servlet:servlet-api:$servletApiVersion") { provided = true }
compile project(':spring-social-core')
}
}
project('spring-social-test') {
description = 'Rest Template Test Support'
dependencies {
compile project(':spring-social-core')
compile ("org.springframework:spring-web:$springVersion")
testCompile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
}
}
// -----------------------------------------------------------------------------
// Configuration for the docs subproject
// -----------------------------------------------------------------------------
project('docs') {
apply from: "$buildSrcDir/docs.gradle"
}
apply from: "$buildSrcDir/dist.gradle"
apply from: "$buildSrcDir/checks.gradle"