| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 | 
							-     // Docbook and Javadoc building and uploading tasks
 
- apply plugin: 'base'
 
- task docs {
 
-     dependsOn 'manual:docbook', 'faq:docbookHtmlSingle', 'apidocs'
 
- }
 
- subprojects {
 
-     apply plugin: 'base'
 
-     apply plugin: 'docbook'
 
-     docbookHtmlSingle.stylesheet = new File(projectDir, 'src/xsl/html-single-custom.xsl')
 
- }
 
- project('faq') {
 
-     defaultTasks 'docbookHtmlSingle'
 
-     [docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceFileName = 'faq.xml'
 
-     docbookHtmlSingle.suffix = ''
 
-     ext.spec = copySpec {
 
-         into ('faq') {
 
-             from("$buildDir/docs")
 
-             from("$projectDir/src/resources")
 
-         }
 
-     }
 
- }
 
- project('manual') {
 
-     defaultTasks 'docbookHtml', 'docbookHtmlSingle', 'docbookFoPdf'
 
-     [docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceFileName = 'springsecurity.xml'
 
-     docbookHtml.stylesheet = new File(projectDir, 'src/xsl/html-custom.xsl')
 
-     docbookHtmlSingle.stylesheet = new File(projectDir, 'src/xsl/html-single-custom.xsl')
 
-     docbookFoPdf.stylesheet = new File(projectDir, 'src/xsl/pdf-custom.xsl')
 
-     def imagesDir = new File(projectDir, 'src/docbook/images');
 
- //    docbookFoPdf.admonGraphicsPath = "${imagesDir}/"
 
-     docbookFoPdf.imgSrcPath = "${projectDir}/src/docbook/"
 
-     ext.spec = copySpec {
 
-         into ('reference') {
 
-             from("$buildDir/docs")
 
-             from("$projectDir/src/resources")
 
-         }
 
-         into ('reference/images') {
 
-             from (imagesDir)
 
-         }
 
-     }
 
- }
 
- task reference (type: Copy) {
 
-     dependsOn 'manual:docbook'
 
-     destinationDir = buildDir
 
-     with(project('manual').spec)
 
- }
 
- task apidocs(type: Javadoc) {
 
-     destinationDir = new File(buildDir, 'apidocs')
 
-     title = "Spring Security $version API"
 
-     source coreModuleProjects.collect { project ->
 
-         project.sourceSets.main.allJava
 
-     }
 
-     classpath = files(coreModuleProjects.collect { project ->
 
-         project.sourceSets.main.compileClasspath
 
-     })
 
- }
 
- apidocs.options.outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
 
- apidocs.options.links = [
 
-     "http://static.springframework.org/spring/docs/3.0.x/javadoc-api",
 
-     "http://static.springsource.org/spring-ldap/docs/1.3.x/apidocs/",
 
-     "http://download.oracle.com/javase/6/docs/api/"
 
- ]
 
- apidocs.options.groups = [
 
-     'Spring Security Core':[
 
-         'org.springframework.security.core*',
 
-         'org.springframework.security.authentication*',
 
-         'org.springframework.security.access*',
 
-         'org.springframework.security.remoting*',
 
-         'org.springframework.security.provisioning*',
 
-         'org.springframework.security.util*'],
 
-     'Spring Security Web':['org.springframework.security.web*'],
 
-     'Spring Security LDAP':['org.springframework.security.ldap*'],
 
-     'Spring Security Crypto':['org.springframework.security.crypto*'],
 
-     'Spring Security OpenID':['org.springframework.security.openid*'],
 
-     'Spring Security CAS':['org.springframework.security.cas*'],
 
-     'Spring Security ACL':['org.springframework.security.acls*'],
 
-     'Spring Security Config':['org.springframework.security.config*'],
 
-     'Spring Security Taglibs':['org.springframework.security.taglibs*'],
 
- ]
 
- ext.apiSpec = copySpec {
 
-     into('apidocs') {
 
-         from(apidocs.destinationDir)
 
-     }
 
- }
 
- task docSiteLogin(type: Login) {
 
-     if (project.hasProperty('sshHost')) {
 
-         host = project.property('sshHost')
 
-     }
 
- }
 
- // Define remoteSiteDir and sshHost in gradle.properties
 
- def remoteDocsDir = null
 
- if (hasProperty('remoteSiteDir')) {
 
-     remoteDocsDir="$remoteSiteDir/docs/3.1.x"
 
- }
 
- task uploadApidocs(type: TarUpload) {
 
-     dependsOn apidocs
 
-     baseName = "${rootProject.name}"
 
-     appendix = 'apidocs'
 
-     remoteDir = remoteDocsDir
 
-     login = docSiteLogin
 
-     with(apiSpec)
 
- }
 
- task uploadManual(type: TarUpload) {
 
-     dependsOn 'manual:docbook'
 
-     baseName = "${rootProject.name}"
 
-     appendix = 'doc'
 
-     remoteDir = remoteDocsDir
 
-     login = docSiteLogin
 
-     with(project('manual').spec)
 
- }
 
- task uploadFaq(type: TarUpload) {
 
-     dependsOn 'faq:docbookHtmlSingle'
 
-     baseName = "${rootProject.name}"
 
-     appendix = 'faq'
 
-     if (project.hasProperty('remoteSiteDir')) {
 
-         remoteDir = project.property('remoteSiteDir')
 
-     }
 
-     login = docSiteLogin
 
-     with(project('faq').spec)
 
- }
 
- assemble.dependsOn = [apidocs, 'manual:docbook']
 
 
  |