| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |     // Docbook and Javadoc building and uploading tasksapply plugin: 'base'task docs {    dependsOn 'manual:reference', 'faq:referenceHtmlSingle', 'apidocs'}subprojects {    apply plugin: 'base'    apply plugin: 'docbook-reference'    [referenceHtmlMulti, referencePdf, referenceHtmlSingle]*.sourceDir = file('src/docbook')}project('faq') {    defaultTasks 'referenceHtmlSingle'    referenceHtmlSingle.stylesheet = 'html-single-custom.xsl'    [referenceHtmlMulti, referencePdf, referenceHtmlSingle]*.sourceFileName = 'faq.xml'    ext.spec = copySpec {        into ('faq') {            from("$buildDir/reference/htmlsingle")            from("$projectDir/src/resources")        }    }}project('manual') {    defaultTasks 'referenceHtmlMulti', 'referenceHtmlSingle', 'referencePdf'    def imagesDir = new File(projectDir, 'src/docbook/images');    ext.spec = copySpec {        into ('reference') {            from("$buildDir/reference")        }    }}task reference (type: Copy) {    dependsOn 'manual:reference'    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.QUIETapidocs.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)    }}assemble.dependsOn = [apidocs, 'manual:reference']task docsZip(type: Zip) {    dependsOn docs    group = 'Distribution'    baseName = rootProject.name    classifier = 'docs'    description = "Builds -${classifier} archive containing api and reference " +        "for deployment at static.springframework.org/spring-security/site/docs."    with(project(':docs').apiSpec)    with(project(':docs:manual').spec)    with(project(':docs:faq').spec)}task schemaZip(type: Zip) {    group = 'Distribution'    baseName = rootProject.name    classifier = 'schema'    description = "Builds -${classifier} archive containing all " +        "XSDs for deployment at static.springframework.org/schema."    coreModuleProjects.each { module ->        def Properties schemas = new Properties();        module.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 = module.sourceSets.main.resources.find {                it.path.endsWith(schemas.get(key))            }            assert xsdFile != null            into (shortName) {                from xsdFile.path            }        }    }}
 |