SEC-2915: groovy/gradle spaces->tabs
This commit is contained in:
+104
-104
@@ -1,147 +1,147 @@
|
||||
// Docbook and Javadoc building and uploading tasks
|
||||
// Docbook and Javadoc building and uploading tasks
|
||||
apply plugin: 'base'
|
||||
|
||||
task docs {
|
||||
dependsOn 'manual:reference', 'apidocs', 'guides:asciidoctor'
|
||||
dependsOn 'manual:reference', 'apidocs', 'guides:asciidoctor'
|
||||
}
|
||||
|
||||
project('manual') {
|
||||
apply plugin: 'base'
|
||||
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
|
||||
apply plugin: 'docbook-reference'
|
||||
apply plugin: 'base'
|
||||
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
|
||||
apply plugin: 'docbook-reference'
|
||||
|
||||
ext.expandPlaceholders = ""
|
||||
ext.expandPlaceholders = ""
|
||||
|
||||
asciidoctorj {
|
||||
version = '1.5.2'
|
||||
}
|
||||
asciidoctorj {
|
||||
version = '1.5.2'
|
||||
}
|
||||
|
||||
asciidoctor {
|
||||
backends = ['docbook5']
|
||||
options = [
|
||||
eruby: 'erubis',
|
||||
attributes: [
|
||||
copycss : '',
|
||||
icons : 'font',
|
||||
'source-highlighter': 'prettify',
|
||||
sectanchors : '',
|
||||
toc2: '',
|
||||
idprefix: '',
|
||||
idseparator: '-',
|
||||
doctype: 'book',
|
||||
numbered: '',
|
||||
'spring-security-version' : project.version,
|
||||
'spring-version' : springVersion,
|
||||
revnumber : project.version
|
||||
]
|
||||
]
|
||||
}
|
||||
asciidoctor {
|
||||
backends = ['docbook5']
|
||||
options = [
|
||||
eruby: 'erubis',
|
||||
attributes: [
|
||||
copycss : '',
|
||||
icons : 'font',
|
||||
'source-highlighter': 'prettify',
|
||||
sectanchors : '',
|
||||
toc2: '',
|
||||
idprefix: '',
|
||||
idseparator: '-',
|
||||
doctype: 'book',
|
||||
numbered: '',
|
||||
'spring-security-version' : project.version,
|
||||
'spring-version' : springVersion,
|
||||
revnumber : project.version
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
reference {
|
||||
sourceDir = new File(asciidoctor.outputDir , 'docbook5')
|
||||
pdfFilename = "spring-security-reference.pdf"
|
||||
epubFilename = "spring-security-reference.epub"
|
||||
expandPlaceholders = ""
|
||||
}
|
||||
reference {
|
||||
sourceDir = new File(asciidoctor.outputDir , 'docbook5')
|
||||
pdfFilename = "spring-security-reference.pdf"
|
||||
epubFilename = "spring-security-reference.epub"
|
||||
expandPlaceholders = ""
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
tasks.findAll { it.name.startsWith("reference") }.each{ it.dependsOn.add("asciidoctor") }
|
||||
}
|
||||
afterEvaluate {
|
||||
tasks.findAll { it.name.startsWith("reference") }.each{ it.dependsOn.add("asciidoctor") }
|
||||
}
|
||||
|
||||
|
||||
ext.spec = copySpec {
|
||||
from (reference) {
|
||||
into 'reference'
|
||||
}
|
||||
}
|
||||
ext.spec = copySpec {
|
||||
from (reference) {
|
||||
into 'reference'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task apidocs(type: Javadoc) {
|
||||
destinationDir = new File(buildDir, 'apidocs')
|
||||
title = "Spring Security $version API"
|
||||
destinationDir = new File(buildDir, 'apidocs')
|
||||
title = "Spring Security $version API"
|
||||
|
||||
source coreModuleProjects.collect { project ->
|
||||
project.sourceSets.main.allJava
|
||||
}
|
||||
source coreModuleProjects.collect { project ->
|
||||
project.sourceSets.main.allJava
|
||||
}
|
||||
|
||||
classpath = files(coreModuleProjects.collect { project ->
|
||||
project.sourceSets.main.compileClasspath
|
||||
})
|
||||
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.2.x/javadoc-api",
|
||||
"http://static.springsource.org/spring-ldap/docs/1.3.x/apidocs/",
|
||||
"http://download.oracle.com/javase/6/docs/api/"
|
||||
"http://static.springframework.org/spring/docs/3.2.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*'],
|
||||
'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)
|
||||
}
|
||||
into('apidocs') {
|
||||
from(apidocs.destinationDir)
|
||||
}
|
||||
}
|
||||
|
||||
assemble.dependsOn = [apidocs, 'manual:asciidoctor']
|
||||
|
||||
task docsZip(type: Zip) {
|
||||
dependsOn docs
|
||||
evaluationDependsOn('guides')
|
||||
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."
|
||||
dependsOn docs
|
||||
evaluationDependsOn('guides')
|
||||
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:guides').spec)
|
||||
with(project(':docs').apiSpec)
|
||||
with(project(':docs:manual').spec)
|
||||
with(project(':docs:guides').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."
|
||||
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();
|
||||
coreModuleProjects.each { module ->
|
||||
def Properties schemas = new Properties();
|
||||
|
||||
module.sourceSets.main.resources.find {
|
||||
it.path.endsWith('META-INF/spring.schemas')
|
||||
}?.withInputStream { schemas.load(it) }
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+32
-32
@@ -1,46 +1,46 @@
|
||||
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
|
||||
|
||||
asciidoctor {
|
||||
baseDir = file('src/docs/asciidoc')
|
||||
options = [
|
||||
eruby: 'erubis',
|
||||
eruby: 'erubis',
|
||||
attributes: [
|
||||
copycss : '',
|
||||
icons : 'font',
|
||||
'source-highlighter': 'prettify',
|
||||
sectanchors : '',
|
||||
toc: '',
|
||||
'toc-placement' : 'preamble',
|
||||
idprefix: '',
|
||||
idseparator: '-',
|
||||
doctype: 'book',
|
||||
'spring-security-version' : project.version,
|
||||
'download-url' : getDownloadUrl(),
|
||||
'include-maven-repository' : getMavenRepositoryInclude(),
|
||||
revnumber : project.version
|
||||
]
|
||||
]
|
||||
baseDir = file('src/docs/asciidoc')
|
||||
options = [
|
||||
eruby: 'erubis',
|
||||
eruby: 'erubis',
|
||||
attributes: [
|
||||
copycss : '',
|
||||
icons : 'font',
|
||||
'source-highlighter': 'prettify',
|
||||
sectanchors : '',
|
||||
toc: '',
|
||||
'toc-placement' : 'preamble',
|
||||
idprefix: '',
|
||||
idseparator: '-',
|
||||
doctype: 'book',
|
||||
'spring-security-version' : project.version,
|
||||
'download-url' : getDownloadUrl(),
|
||||
'include-maven-repository' : getMavenRepositoryInclude(),
|
||||
revnumber : project.version
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
ext.spec = copySpec {
|
||||
into ('guides') {
|
||||
from(asciidoctor.outputDir)
|
||||
exclude 'build', 'Guardfile'
|
||||
}
|
||||
into ('guides') {
|
||||
from(asciidoctor.outputDir)
|
||||
exclude 'build', 'Guardfile'
|
||||
}
|
||||
}
|
||||
|
||||
def getDownloadUrl() {
|
||||
snapshotBuild ? "https://github.com/SpringSource/spring-security/archive/master.zip" : "https://github.com/spring-projects/spring-security/archive/${project.version}.zip"
|
||||
snapshotBuild ? "https://github.com/SpringSource/spring-security/archive/master.zip" : "https://github.com/spring-projects/spring-security/archive/${project.version}.zip"
|
||||
}
|
||||
|
||||
|
||||
def getMavenRepositoryInclude() {
|
||||
if(snapshotBuild) {
|
||||
return "_includes/maven-repository-snapshot.asc"
|
||||
} else if(releaseBuild) {
|
||||
return "_includes/maven-repository-release.asc"
|
||||
} else {
|
||||
return "_includes/maven-repository-milestone.asc"
|
||||
}
|
||||
if(snapshotBuild) {
|
||||
return "_includes/maven-repository-snapshot.asc"
|
||||
} else if(releaseBuild) {
|
||||
return "_includes/maven-repository-release.asc"
|
||||
} else {
|
||||
return "_includes/maven-repository-milestone.asc"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user