Use a dynamic version for Antora
This commit is contained in:
parent
cb6ca7f470
commit
144af074b7
|
@ -1,6 +1,5 @@
|
||||||
name: ROOT
|
name: ROOT
|
||||||
title: Spring Security
|
title: Spring Security
|
||||||
version: 5.6
|
|
||||||
start_page: ROOT:index.adoc
|
start_page: ROOT:index.adoc
|
||||||
nav:
|
nav:
|
||||||
- modules/ROOT/nav.adoc
|
- modules/ROOT/nav.adoc
|
||||||
|
|
|
@ -2,6 +2,12 @@ apply plugin: 'io.spring.convention.docs'
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
tasks.register("generateAntora") {
|
tasks.register("generateAntora") {
|
||||||
|
group = "Documentation"
|
||||||
|
description = "Generates antora files"
|
||||||
|
dependsOn 'generateAntoraYml', 'generateAntoraComponentVersion'
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("generateAntoraYml") {
|
||||||
group = "Documentation"
|
group = "Documentation"
|
||||||
description = "Generates the antora.yml for dynamic properties"
|
description = "Generates the antora.yml for dynamic properties"
|
||||||
doLast {
|
doLast {
|
||||||
|
@ -26,7 +32,6 @@ tasks.register("generateAntora") {
|
||||||
outputFile.createNewFile()
|
outputFile.createNewFile()
|
||||||
outputFile.setText("""name: ROOT
|
outputFile.setText("""name: ROOT
|
||||||
title: Spring Security
|
title: Spring Security
|
||||||
version: 5.6
|
|
||||||
start_page: ROOT:index.adoc
|
start_page: ROOT:index.adoc
|
||||||
asciidoc:
|
asciidoc:
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -44,6 +49,20 @@ ${ymlVersions}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register("generateAntoraComponentVersion") {
|
||||||
|
group = "Documentation"
|
||||||
|
description = "Generates the antora.component.version file"
|
||||||
|
doLast {
|
||||||
|
def outputFile = new File("$buildDir/generateAntora/antora.component.version")
|
||||||
|
outputFile.getParentFile().mkdirs()
|
||||||
|
outputFile.createNewFile()
|
||||||
|
def antoraVersion = project.version.replaceAll(/^(\d+\.\d+)\.\d+(-\w+)$/, '$1$2')
|
||||||
|
outputFile.setText("$antoraVersion")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation platform(project(":spring-security-dependencies"))
|
testImplementation platform(project(":spring-security-dependencies"))
|
||||||
testImplementation "com.unboundid:unboundid-ldapsdk"
|
testImplementation "com.unboundid:unboundid-ldapsdk"
|
||||||
|
|
Loading…
Reference in New Issue