forked from jonnybbb/spring-social-xing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
159 lines (135 loc) · 6.05 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
/*
* 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 Xing
// @author Johannes Buehler
//
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Configuration for the root project
// -----------------------------------------------------------------------------
description = 'Spring Social Xing'
abbreviation = 'SOCIAL-XING'
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(springSocialXingVersion)
// 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"
springSocialVersion = '1.0.2.RELEASE'
jacksonVersion = '1.9.3'
junitVersion = '4.10'
injectVersion = '1'
mockitoVersion = '1.9.0'
springVersion = '3.1.0.RELEASE'
springSecurityVersion = '3.1.0.RELEASE'
springTestMvcVersion = "1.0.0.BUILD-SNAPSHOT"
cglibVersion = '2.2.2'
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-dep:$junitVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test-mvc:$springTestMvcVersion"
}
// 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-xing') {
description = 'Xing API'
dependencies {
compile "org.springframework.social:spring-social-core:$springSocialVersion"
compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
compile "javax.inject:javax.inject:$injectVersion"
testCompile "cglib:cglib-nodep:$cglibVersion"
testCompile "org.springframework:spring-test-mvc:$springTestMvcVersion"
testCompile "org.springframework.security:spring-security-crypto:$springSecurityVersion"
}
}
// -----------------------------------------------------------------------------
// Configuration for the docs subproject
// -----------------------------------------------------------------------------
//project('docs') {
// apply from: "$buildSrcDir/docs.gradle"
//}
//apply from: "$buildSrcDir/dist.gradle"
apply from: "$buildSrcDir/checks.gradle"