1
1
plugins {
2
2
id ' org.springframework.shell.docs'
3
+ id ' org.antora' version ' 1.0.0'
4
+ id ' io.spring.antora.generate-antora-yml' version ' 0.0.1'
3
5
}
4
6
5
7
description = ' Spring Shell Documentation'
@@ -12,6 +14,32 @@ dependencies {
12
14
testImplementation ' org.awaitility:awaitility'
13
15
}
14
16
15
- asciidoctorj {
16
- version = ' 2.5.4'
17
+ antora {
18
+ version = ' 3.2.0-alpha.2'
19
+ options = [clean : true , fetch : ! project. gradle. startParameter. offline, stacktrace : true ]
20
+ dependencies = [
21
+ ' @antora/atlas-extension' : ' 1.0.0-alpha.1' ,
22
+ ' @antora/collector-extension' : ' 1.0.0-alpha.3' ,
23
+ ' @asciidoctor/tabs' : ' 1.0.0-beta.3' ,
24
+ ' @springio/antora-extensions' : ' 1.4.2' ,
25
+ ' @springio/asciidoctor-extensions' : ' 1.0.0-alpha.8' ,
26
+ ]
17
27
}
28
+
29
+ tasks. named(" generateAntoraYml" ) {
30
+ asciidocAttributes = project. provider( {
31
+ def dependencies = resolvedVersions(project. configurations. testRuntimeClasspath)
32
+ return [' project-version' : project. version,
33
+ ' spring-boot-version' : dependencies[' spring-boot-starter-version' ],
34
+ ' spring-version' : dependencies[' spring-core-version' ]
35
+ ]
36
+ } )
37
+ }
38
+
39
+
40
+
41
+ def resolvedVersions (Configuration configuration ) {
42
+ return configuration. resolvedConfiguration
43
+ .resolvedArtifacts
44
+ .collectEntries { [(it. name + ' -version' ): it. moduleVersion. id. version] }
45
+ }
0 commit comments