1
+ plugins {
2
+ id ' kotlin'
3
+ id ' io.spring.antora.generate-antora-yml' version ' 0.0.1'
4
+ id ' org.antora' version ' 1.0.0'
5
+ }
6
+
1
7
description = " Spring Framework Docs"
2
8
3
- apply plugin : ' kotlin'
4
- apply plugin : ' org.asciidoctor.jvm.convert'
5
- apply plugin : ' org.asciidoctor.jvm.pdf'
6
9
apply from : " ${ rootDir} /gradle/publications.gradle"
7
10
8
11
9
- configurations {
10
- asciidoctorExtensions
12
+ antora {
13
+ version = ' 3.2.0-alpha.2'
14
+ playbook = ' antora-playbook.yml'
15
+ // playbookProvider {
16
+ // repository = 'rwinch/spring-framework'
17
+ // branch = 'docs-build'
18
+ // path = 'lib/antora/templates/per-branch-antora-playbook.yml'
19
+ // checkLocalBranch = true
20
+ // }
21
+ options = [' --clean' , ' --stacktrace' ]
22
+ environment = [
23
+ ' ALGOLIA_API_KEY' : ' 82c7ead946afbac3cf98c32446154691' ,
24
+ ' ALGOLIA_APP_ID' : ' 244V8V9FGG' ,
25
+ ' ALGOLIA_INDEX_NAME' : ' framework-docs'
26
+ ]
27
+ dependencies = [
28
+ ' @antora/atlas-extension' : ' 1.0.0-alpha.1' ,
29
+ ' @antora/collector-extension' : ' 1.0.0-alpha.3' ,
30
+ ' @asciidoctor/tabs' : ' 1.0.0-beta.3' ,
31
+ ' @opendevise/antora-release-line-extension' : ' 1.0.0-alpha.2' ,
32
+ ' @springio/antora-extensions' : ' 1.1.0' ,
33
+ ' @springio/asciidoctor-extensions' : ' 1.0.0-alpha.9'
34
+ ]
11
35
}
12
36
13
- dependencies {
14
- api(project(" :spring-context" ))
15
- api(project(" :spring-web" ))
16
- api(" jakarta.servlet:jakarta.servlet-api" )
17
37
18
- implementation(project(" :spring-core-test" ))
19
- implementation(" org.assertj:assertj-core" )
38
+ tasks. named(" generateAntoraYml" ) {
39
+ dependsOn dependencyVersions
40
+ asciidocAttributes = project. provider( {
41
+ return [" spring-version" : project. version ]
42
+ } )
20
43
}
21
44
45
+
22
46
jar {
23
47
enabled = false
24
48
}
@@ -27,8 +51,10 @@ javadoc {
27
51
enabled = false
28
52
}
29
53
30
- dependencies {
31
- asciidoctorExtensions " io.spring.asciidoctor.backends:spring-asciidoctor-backends:0.0.5"
54
+ repositories {
55
+ maven {
56
+ url " https://repo.spring.io/release"
57
+ }
32
58
}
33
59
34
60
/**
@@ -82,69 +108,10 @@ rootProject.tasks.dokkaHtmlMultiModule.configure {
82
108
outputDirectory. set(project. file(" $buildDir /docs/kdoc" ))
83
109
}
84
110
85
- asciidoctorj {
86
- version = ' 2.4.3'
87
- fatalWarnings " .*"
88
- options doctype : ' book' , eruby : ' erubis'
89
- attributes([
90
- icons : ' font' ,
91
- idprefix : ' ' ,
92
- idseparator : ' -' ,
93
- revnumber : project. version,
94
- sectanchors : ' ' ,
95
- sectnums : ' ' ,
96
- ' spring-version' : project. version
97
- ])
98
- }
99
-
100
- /**
101
- * Generate the Spring Framework Reference documentation from
102
- * "src/docs/asciidoc" in "build/docs/ref-docs/html5".
103
- */
104
- asciidoctor {
105
- baseDirFollowsSourceDir()
106
- configurations " asciidoctorExtensions"
107
- sources {
108
- include ' *.adoc'
109
- }
110
- resources {
111
- from(sourceDir) {
112
- include ' images/*.png'
113
- }
114
- }
115
- outputDir " $buildDir /docs/ref-docs/html5"
116
- outputOptions {
117
- backends " spring-html"
118
- }
119
- forkOptions {
120
- jvmArgs + = [" --add-opens" , " java.base/sun.nio.ch=ALL-UNNAMED" , " --add-opens" , " java.base/java.io=ALL-UNNAMED" ]
121
- }
122
- logDocuments = true
123
- }
124
-
125
- asciidoctor. mustRunAfter " check"
126
-
127
- /**
128
- * Generate the Spring Framework Reference documentation from "src/docs/asciidoc"
129
- * in "build/docs/ref-docs/pdf".
130
- */
131
- asciidoctorPdf {
132
- baseDirFollowsSourceDir()
133
- configurations ' asciidoctorExtensions'
134
- sources {
135
- include ' spring-framework.adocbook'
136
- }
137
- outputDir " $buildDir /docs/ref-docs/pdf"
138
- forkOptions {
139
- jvmArgs + = [" --add-opens" , " java.base/sun.nio.ch=ALL-UNNAMED" , " --add-opens" , " java.base/java.io=ALL-UNNAMED" ]
140
- }
141
- logDocuments = true
142
- }
143
-
144
111
/**
145
112
* Zip all docs (API and reference) into a single archive
146
113
*/
147
- task docsZip (type : Zip , dependsOn : [' api' , ' asciidoctor ' , ' asciidoctorPdf ' , rootProject. tasks. dokkaHtmlMultiModule]) {
114
+ task docsZip (type : Zip , dependsOn : [' api' , ' antora ' , rootProject. tasks. dokkaHtmlMultiModule]) {
148
115
group = " Distribution"
149
116
description = " Builds -${ archiveClassifier} archive containing api and reference " +
150
117
" for deployment at https://docs.spring.io/spring-framework/docs/."
@@ -157,12 +124,9 @@ task docsZip(type: Zip, dependsOn: ['api', 'asciidoctor', 'asciidoctorPdf', root
157
124
from (api) {
158
125
into " javadoc-api"
159
126
}
160
- from (" $a sciidoctor . outputDir " ) {
127
+ from (" build/site " ) {
161
128
into " reference/html"
162
129
}
163
- from (" $asciidoctorPdf . outputDir " ) {
164
- into " reference/pdf"
165
- }
166
130
from (rootProject. tasks. dokkaHtmlMultiModule. outputDirectory) {
167
131
into " kdoc-api"
168
132
}
@@ -251,4 +215,4 @@ publishing {
251
215
artifact distZip
252
216
}
253
217
}
254
- }
218
+ }
0 commit comments