124 lines
3.6 KiB
Groovy
124 lines
3.6 KiB
Groovy
apply plugin: "base"
|
|
|
|
allprojects {
|
|
apply plugin: "idea"
|
|
apply plugin: "eclipse"
|
|
apply plugin: "maven"
|
|
|
|
group = "org.springframework.data"
|
|
version = "$sdRestVersion"
|
|
|
|
configurations.all {
|
|
exclude group: "commons-logging"
|
|
exclude module: "slf4j-log4j12"
|
|
}
|
|
|
|
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" }
|
|
}
|
|
|
|
}
|
|
|
|
configure(subprojects) { subproject ->
|
|
apply plugin: "java"
|
|
apply plugin: "groovy"
|
|
apply from: "${rootProject.projectDir}/maven.gradle"
|
|
|
|
configurations {
|
|
compile.extendsFrom providedCompile
|
|
}
|
|
|
|
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:unchecked"]
|
|
|
|
project.sourceCompatibility = 1.6
|
|
project.targetCompatibility = 1.6
|
|
|
|
javadoc {
|
|
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
|
options.author = true
|
|
options.header = subproject.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 {
|
|
groovy "org.codehaus.groovy:groovy:$groovyVersion"
|
|
|
|
// Logging
|
|
compile "org.slf4j:slf4j-api:$slf4jVersion"
|
|
runtime "org.slf4j:jcl-over-slf4j:$slf4jVersion"
|
|
runtime "ch.qos.logback:logback-classic:$logbackVersion"
|
|
|
|
// Jackson JSON
|
|
compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
|
|
|
|
// Spring
|
|
compile("org.springframework:spring-beans:$springVersion") { force = true }
|
|
compile("org.springframework:spring-context:$springVersion") { force = true }
|
|
compile("org.springframework:spring-core:$springVersion") { force = true }
|
|
compile("org.springframework:spring-orm:$springVersion") { force = true }
|
|
compile("org.springframework:spring-tx:$springVersion") { force = true }
|
|
compile("org.springframework:spring-web:$springVersion") { force = true }
|
|
runtime "cglib:cglib-nodep:$cglibVersion"
|
|
|
|
// Testing
|
|
testCompile("org.codehaus.groovy:groovy-all:$groovyVersion") { force = true }
|
|
testCompile "org.spockframework:spock-core:$spockVersion"
|
|
testCompile "org.spockframework:spock-spring:$spockVersion"
|
|
testCompile "org.hamcrest:hamcrest-library:1.3"
|
|
testCompile "org.springframework:spring-test:$springVersion"
|
|
testRuntime "org.springframework:spring-context-support:$springVersion"
|
|
testCompile "org.mockito:mockito-core:1.8.5"
|
|
}
|
|
|
|
}
|
|
|
|
configure(rootProject) {
|
|
|
|
task javadoc(type: Javadoc) {
|
|
title = "Spring Data REST ${version} API"
|
|
source subprojects.collect { project -> project.sourceSets.main.allJava }
|
|
classpath = files(subprojects.collect { project -> project.sourceSets.main.compileClasspath })
|
|
destinationDir = new File(buildDir, "javadoc")
|
|
|
|
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
|
options.author = true
|
|
options.header = "Spring Data REST ${version} API"
|
|
//options.overview = "${projectDir}/src/main/java/overview.html"
|
|
}
|
|
|
|
}
|
|
|
|
task wrapper(type: Wrapper) { gradleVersion = "1.1" }
|
|
|
|
idea {
|
|
module {
|
|
downloadJavadoc = false
|
|
downloadSources = true
|
|
}
|
|
project {
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
}
|