This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
build.gradle
129 lines (110 loc) · 3.59 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
apply plugin: "java"
apply plugin: "idea"
apply plugin: "eclipse"
apply plugin: "maven"
apply plugin: "application"
// Library versions
ext {
slf4jVersion = "1.7.2"
logbackVersion = "1.0.9"
springVersion = "3.2.2.RELEASE"
springShellVersion = "1.1.0.RELEASE"
hateoasVersion = "0.4.0.RELEASE"
jacksonVersion = "1.9.12"
junitVersion = "4.11"
}
installApp {
into "build/install/rest-shell-$version"
}
group = "org.springframework.data.rest.shell"
mainClassName = "org.springframework.shell.Bootstrap"
// Build Configuration
configurations.all {
exclude group: "commons-logging"
//exclude module: "slf4j-log4j12"
}
configurations {
compile.extendsFrom providedCompile
}
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:none"]
project.sourceCompatibility = 1.6
project.targetCompatibility = 1.6
// Repositories
repositories {
//maven { url "http://repo.springsource.org/libs-snapshot" }
//maven { url "http://repo.springsource.org/libs-milestone" }
maven { url "http://repo.springsource.org/libs-release" }
maven { url "http://spring-roo-repository.springsource.org/release" }
mavenLocal()
}
// Artifact Configuration
javadoc {
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = name
//options.overview = "${projectDir}/src/main/java/overview.html"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
classifier = "javadoc"
from javadoc
}
artifacts {
archives sourcesJar
archives javadocJar
}
// Dependencies
dependencies {
// Logging
compile "org.slf4j:slf4j-api:$slf4jVersion"
runtime "org.slf4j:jcl-over-slf4j:$slf4jVersion"
runtime "ch.qos.logback:logback-classic:$logbackVersion"
// Spring
compile("org.springframework:spring-aop:$springVersion") { force = true }
compile("org.springframework:spring-beans:$springVersion") { force = true }
compile("org.springframework:spring-context:$springVersion") { force = true }
compile("org.springframework:spring-context-support:$springVersion") { force = true }
compile("org.springframework:spring-core:$springVersion") { force = true }
compile("org.springframework:spring-web:$springVersion") { force = true }
compile("org.springframework:spring-webmvc:$springVersion") { force = true }
// Spring HATEOAS
compile "org.springframework.hateoas:spring-hateoas:$hateoasVersion"
// Spring Shell
compile "org.springframework.shell:spring-shell:$springShellVersion"
// Jackson JSON
compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
// Commons
compile "commons-codec:commons-codec:1.7"
// TODO Add multipart upload support
//compile "commons-fileupload:commons-fileupload:1.2.2"
// Testing
testCompile "junit:junit:$junitVersion"
testCompile "org.hamcrest:hamcrest-library:1.3"
testCompile("org.springframework:spring-test:$springVersion") { force = true }
testRuntime("org.springframework:spring-context-support:$springVersion") { force = true }
}
// Gradle Wrapper
task wrapper(type: Wrapper) { gradleVersion = "1.3" }
task shell(type: JavaExec) {
classpath = configurations.runtime
main = "org.springframework.shell.Bootstrap"
}
// IDEA project configuration
idea {
module {
downloadJavadoc = false
downloadSources = true
}
project {
languageLevel = "1.6"
ipr {
withXml { xml ->
xml.node.component.find { it.@name == "VcsDirectoryMappings" }.mapping.@vcs = "Git"
xml.node.component.find { it.@name == "ProjectRootManager" }.output.@url = "file://\$PROJECT_DIR\$/build"
}
}
}
}