You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
apply plugin: 'org.asciidoctor.jvm.convert' |
|
apply plugin: 'io.spring.convention.repository' |
|
|
|
asciidoctor { |
|
baseDir = file('src/docs/asciidoc') |
|
options eruby: 'erubis' |
|
|
|
def ghSamplesUrl = "https://github.com/spring-projects/spring-security-samples/tree/$samplesBranch" |
|
attributes copycss : '', |
|
icons : 'font', |
|
'source-highlighter': 'prettify', |
|
sectanchors : '', |
|
toc: '', |
|
'toc-placement' : 'preamble', |
|
idprefix: '', |
|
idseparator: '-', |
|
doctype: 'book', |
|
'spring-security-version' : project.version, |
|
'include-maven-repository' : getMavenRepositoryInclude(), |
|
revnumber : project.version, |
|
'gh-samples-url': ghSamplesUrl, |
|
'gh-old-samples-url': "https://github.com/spring-projects/spring-security/tree/5.4.x/samples" |
|
} |
|
|
|
ext.spec = copySpec { |
|
into ('guides') { |
|
from(asciidoctor.outputDir) |
|
exclude 'build', 'Guardfile' |
|
} |
|
} |
|
|
|
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" |
|
} |
|
}
|
|
|