2020-01-08 22:59:36 -05:00
|
|
|
apply plugin: 'org.asciidoctor.jvm.convert'
|
|
|
|
apply plugin: 'io.spring.convention.repository'
|
2013-10-03 15:15:09 -04:00
|
|
|
|
2013-11-01 15:21:37 -04:00
|
|
|
asciidoctor {
|
2015-03-23 12:14:26 -04:00
|
|
|
baseDir = file('src/docs/asciidoc')
|
2018-04-28 22:51:12 -04:00
|
|
|
options 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
|
2013-08-06 12:35:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ext.spec = copySpec {
|
2015-03-23 12:14:26 -04:00
|
|
|
into ('guides') {
|
|
|
|
from(asciidoctor.outputDir)
|
|
|
|
exclude 'build', 'Guardfile'
|
|
|
|
}
|
2013-12-06 12:12:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
def getDownloadUrl() {
|
2021-04-26 17:50:35 -04:00
|
|
|
snapshotBuild ? "https://github.com/spring-projects/spring-security/archive/main.zip" : "https://github.com/spring-projects/spring-security/archive/${project.version}.zip"
|
2013-12-06 12:12:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
def getMavenRepositoryInclude() {
|
2015-03-23 12:14:26 -04:00
|
|
|
if(snapshotBuild) {
|
|
|
|
return "_includes/maven-repository-snapshot.asc"
|
|
|
|
} else if(releaseBuild) {
|
|
|
|
return "_includes/maven-repository-release.asc"
|
|
|
|
} else {
|
|
|
|
return "_includes/maven-repository-milestone.asc"
|
|
|
|
}
|
2017-11-14 19:03:51 -05:00
|
|
|
}
|