-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
101 lines (80 loc) · 3.37 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
buildscript {
repositories {
maven { url 'http://repo.spring.io/plugins-release' }
}
dependencies {
classpath 'io.spring.gradle:spring-io-plugin:0.0.4.RELEASE'
classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1'
}
}
configure(allprojects) {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'javadocHotfix'
group = 'org.springframework.social'
sourceCompatibility = 1.5
targetCompatibility = 1.5
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
sourceSets.test.resources.srcDirs = ['src/test/resources', 'src/test/java']
test.systemProperty("java.awt.headless", "true")
repositories {
mavenLocal()
maven { url "http://repo.spring.io/libs-snapshot" }
}
dependencies {
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
testCompile "junit:junit:$junitVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
}
// servlet-api (2.5) and tomcat-servlet-api (3.0) classpath entries should not be
// exported to dependent projects in Eclipse to avoid false compilation errors due
// to changing APIs across these versions
eclipse.classpath.file.whenMerged { classpath ->
classpath.entries.findAll { entry -> entry.path.contains('servlet-api') }*.exported = false
// When the root project's name is the same as a dependency project's name, the name ends
// up being duplicated in the classpath entry. For example a dependency on "spring-social-wechat"
// would have a path of "/spring-social-wechat-spring-social-wechat".
// The following lines set the path properly in that case.
classpath.entries.findAll { entry ->
if (entry.path.equals("/" + rootProject.name + "-" + rootProject.name)) {
entry.path = "/" + rootProject.name;
}
}
}
}
configure(subprojects) { subproject ->
apply from: "${rootProject.projectDir}/publish-maven.gradle"
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allJava
}
artifacts {
archives sourcesJar
}
}
project('spring-social-wechat') {
description = 'Spring Social Wechat'
dependencies {
compile("org.springframework.social:spring-social-core:$springSocialVersion")
compile("org.springframework.social:spring-social-config:$springSocialVersion")
compile("org.springframework.social:spring-social-security:$springSocialVersion", optional)
compile("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
compile("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
compile("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
compile("javax.servlet:javax.servlet-api:$servletApiVersion", provided)
testCompile("org.springframework:spring-test:$springVersion")
}
}
configure(rootProject) {
description = 'Spring Social Wechat'
// don't publish the default jar for the root project
configurations.archives.artifacts.clear()
dependencies { // for integration tests
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.11'
}
}