@@ -2,6 +2,12 @@ apply plugin: 'io.spring.convention.docs'
2
2
apply plugin : ' java'
3
3
4
4
tasks. register(" generateAntora" ) {
5
+ group = " Documentation"
6
+ description = " Generates antora files"
7
+ dependsOn ' generateAntoraYml' , ' generateAntoraComponentVersion'
8
+ }
9
+
10
+ tasks. register(" generateAntoraYml" ) {
5
11
group = " Documentation"
6
12
description = " Generates the antora.yml for dynamic properties"
7
13
doLast {
@@ -26,7 +32,6 @@ tasks.register("generateAntora") {
26
32
outputFile. createNewFile()
27
33
outputFile. setText(""" name: ROOT
28
34
title: Spring Security
29
- version: 5.6
30
35
start_page: ROOT:index.adoc
31
36
asciidoc:
32
37
attributes:
@@ -44,6 +49,20 @@ ${ymlVersions}
44
49
}
45
50
}
46
51
52
+ tasks. register(" generateAntoraComponentVersion" ) {
53
+ group = " Documentation"
54
+ description = " Generates the antora.component.version file"
55
+ doLast {
56
+ def outputFile = new File (" $buildDir /generateAntora/antora.component.version" )
57
+ outputFile. getParentFile(). mkdirs()
58
+ outputFile. createNewFile()
59
+ def antoraVersion = project. version. replaceAll(/ ^(\d +\.\d +)\.\d +(-\w +)$/ , ' $1$2' )
60
+ outputFile. setText(" $antoraVersion " )
61
+ }
62
+ }
63
+
64
+
65
+
47
66
dependencies {
48
67
testImplementation platform(project(" :spring-security-dependencies" ))
49
68
testImplementation " com.unboundid:unboundid-ldapsdk"
0 commit comments