spring-security/docs/guides/build.gradle

46 lines
1.2 KiB
Groovy
Raw Normal View History

2013-11-01 15:21:37 -04:00
apply plugin: 'asciidoctor'
2013-11-01 15:21:37 -04:00
asciidoctor {
2013-12-06 12:12:07 -05:00
baseDir = file('src/asciidoc')
2013-11-01 15:21:37 -04:00
options = [
eruby: 'erubis',
eruby: 'erubis',
attributes: [
copycss : '',
icons : 'font',
'source-highlighter': 'prettify',
sectanchors : '',
2013-12-06 12:12:07 -05:00
toc: '',
'toc-placement' : 'preamble',
2013-11-01 15:21:37 -04:00
idprefix: '',
idseparator: '-',
doctype: 'book',
'spring-security-version' : project.version,
2013-12-06 12:12:07 -05:00
'download-url' : getDownloadUrl(),
'include-maven-repository' : getMavenRepositoryInclude(),
2013-11-01 15:21:37 -04:00
revnumber : project.version
]
]
}
ext.spec = copySpec {
into ('guides') {
2013-11-01 15:21:37 -04:00
from(asciidoctor.outputDir)
exclude 'build', 'Guardfile'
}
2013-12-06 12:12:07 -05:00
}
def getDownloadUrl() {
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"
}
}