Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

233 lines (194 sloc) 7.04 kB
buildscript {
repositories {
maven { url 'http://repo.springsource.org/plugins-release' }
}
dependencies {
classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.1.5'
}
}
configure(allprojects) {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
group = 'org.springframework.android'
ext.androidVersion = '4.0.1.2'
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
repositories {
maven { url "http://repo.springsource.org/libs-release" }
maven { url "http://repo.springsource.org/ebr-maven-external" }
maven { url "https://android-rome-feed-reader.googlecode.com/svn/maven2/releases" }
}
// 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
}
}
configure(subprojects) { subproject ->
apply from: "${rootProject.projectDir}/publish-maven.gradle"
jar {
manifest.attributes['Implementation-Title'] = subproject.name
manifest.attributes['Implementation-Version'] = subproject.version
from("${rootProject.projectDir}/src/dist") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format('yyyy'), version: project.version)
}
}
javadoc {
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
}
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
}
}
project('spring-android-core') {
description = "Spring for Android Core"
dependencies {
compile ("com.google.android:android:$androidVersion", provided)
}
}
project('spring-android-auth') {
description = 'Spring for Android Auth'
dependencies {
compile ("com.google.android:android:$androidVersion", provided)
compile project (':spring-android-core')
compile project (':spring-android-rest-template');
compile ("org.springframework.social:spring-social-core:1.0.2.RELEASE") {
// exclude spring-web in favor of spring-android-rest-template
exclude group: "org.springframework", module: "spring-web"
}
compile ("org.springframework.security:spring-security-crypto:3.1.0.RELEASE") {
transitive = false
}
}
}
project('spring-android-rest-template') {
description = 'Spring for Android Rest Template'
dependencies {
compile ("com.google.android:android:$androidVersion", provided)
compile project (':spring-android-core')
compile ("org.codehaus.jackson:jackson-mapper-asl:1.9.7", optional)
compile ("com.google.code.gson:gson:2.1", optional)
compile ("org.simpleframework:simple-xml:2.6.2") { dep ->
optional dep
transitive = false
}
compile ("com.google.code.android-rome-feed-reader:android-rome-feed-reader:1.0.0-r2", optional)
compile ("commons-httpclient:commons-httpclient:3.1") { dep ->
optional dep
transitive = false
}
}
}
configure(rootProject) {
description = 'Spring for Android'
apply plugin: 'docbook-reference'
reference {
sourceDir = file('src/reference/docbook')
}
// don't publish the default jar for the root project
configurations.archives.artifacts.clear()
dependencies { // for integration tests
}
task api(type: Javadoc) {
group = 'Documentation'
description = 'Generates aggregated Javadoc API documentation.'
title = "${rootProject.description} ${version} API"
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = rootProject.description
options.overview = 'src/api/overview.html'
options.links(
'http://docs.jboss.org/jbossas/javadoc/4.0.5/connector'
)
source subprojects.collect { project ->
project.sourceSets.main.allJava
}
destinationDir = new File(buildDir, "api")
classpath = files(subprojects.collect { project ->
project.sourceSets.main.compileClasspath
})
maxMemory = '1024m'
}
task docsZip(type: Zip) {
group = 'Distribution'
classifier = 'docs'
description = "Builds -${classifier} archive containing api and reference " +
"for deployment at static.springframework.org/spring-android/docs."
from('src/dist') {
include 'changelog.txt'
}
from (api) {
into 'api'
}
from (reference) {
into 'reference'
}
}
task distZip(type: Zip, dependsOn: docsZip) {
group = 'Distribution'
classifier = 'dist'
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."
def baseDir = "${project.name}-${project.version}";
from('src/dist') {
include 'readme.txt'
include 'license.txt'
include 'notice.txt'
into "${baseDir}"
expand(copyright: new Date().format('yyyy'), version: project.version)
}
from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}
subprojects.each { subproject ->
into ("${baseDir}/libs") {
from subproject.jar
if (subproject.tasks.findByPath('sourcesJar')) {
from subproject.sourcesJar
}
if (subproject.tasks.findByPath('javadocJar')) {
from subproject.javadocJar
}
}
}
}
artifacts {
archives docsZip
archives distZip
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.0-rc-3'
}
}
task updateRootDocs << {
copy {
from 'src/dist'
into "${rootProject.projectDir}"
include 'notice.txt'
expand(copyright: new Date().format('yyyy'), version: project.version)
rename { filename -> 'NOTICE' }
}
copy {
from 'src/dist'
into "${rootProject.projectDir}"
include 'license.txt'
rename { filename -> 'LICENSE' }
}
}
build.dependsOn('updateRootDocs')
Jump to Line
Something went wrong with that request. Please try again.