Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

271 lines (224 sloc) 8.476 kb
buildscript {
repositories {
maven { url 'http://repo.springsource.org/plugins-release' }
}
dependencies {
classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.1.3'
}
}
configure(allprojects) {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
group = 'org.springframework.social'
sourceCompatibility=1.5
targetCompatibility=1.5
ext {
springSocialVersion = '1.1.0.BUILD-SNAPSHOT'
hamcrestVersion = '1.3'
jacksonVersion = '1.9.9'
jspApiVersion = '2.1'
junitVersion = '4.10'
mockitoVersion = '1.9.0'
servletApiVersion = '2.5'
springSecurityCryptoVersion = '3.1.2.RELEASE'
springVersion = '3.1.2.RELEASE'
springTestMvcVersion = "1.0.0.BUILD-SNAPSHOT"
}
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
sourceSets.test.resources.srcDirs = ['src/test/resources', 'src/test/java']
test.systemProperty("java.awt.headless", "true")
repositories {
maven { url "http://repo.springsource.org/libs-snapshot" }
}
dependencies {
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
testCompile "junit:junit-dep:$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
}
}
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
//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
}
}
project('spring-social-facebook') {
description = 'Facebook API'
dependencies {
compile "org.springframework.social:spring-social-core:$springSocialVersion"
compile "org.springframework.social:spring-social-config:$springSocialVersion"
compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
testCompile "org.springframework:spring-test-mvc:$springTestMvcVersion"
}
}
project('spring-social-facebook-web') {
description = 'Facebook Web'
dependencies {
compile ("org.springframework:spring-web:$springVersion")
compile ("org.springframework.social:spring-social-core:$springSocialVersion", optional)
compile project(':spring-social-facebook', optional)
compile ("org.springframework.security:spring-security-crypto:$springSecurityCryptoVersion", optional)
compile ("org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion", optional)
compile ("javax.servlet:servlet-api:$servletApiVersion", provided)
compile ("javax.servlet.jsp:jsp-api:$jspApiVersion", provided)
testCompile "org.springframework:spring-test-mvc:$springTestMvcVersion"
}
}
configure(rootProject) {
description = 'Spring Social Facebook'
apply plugin: 'docbook-reference'
reference {
ext.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-social/docs."
from('src/dist') {
include 'changelog.txt'
}
from (api) {
into 'api'
}
from (reference) {
into 'reference'
}
}
task schemaZip(type: Zip) {
group = 'Distribution'
classifier = 'schema'
description = "Builds -${classifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."
subprojects.each { subproject ->
def Properties schemas = new Properties();
subproject.sourceSets.main.resources.find {
it.path.endsWith('META-INF/spring.schemas')
}?.withInputStream { schemas.load(it) }
for (def key : schemas.keySet()) {
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
assert shortName != key
File xsdFile = subproject.sourceSets.main.resources.find {
it.path.endsWith(schemas.get(key))
}
assert xsdFile != null
into (shortName) {
from xsdFile.path
}
}
}
}
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
group = 'Distribution'
classifier = 'dist'
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."
ext.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"
}
// from(zipTree(schemaZip.archivePath)) {
// into "${baseDir}/schema"
// }
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 schemaZip
archives distZip
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.1'
}
}
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.