Skip to content

Commit e5a763b

Browse files
committed
Merge branch '2.0.x'
2 parents 7428164 + 838004e commit e5a763b

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

docs/src/docs/asciidoc/getting-started.adoc

+26-19
Original file line numberDiff line numberDiff line change
@@ -130,41 +130,48 @@ macro.
130130
.Gradle
131131
----
132132
plugins { <1>
133-
id "org.asciidoctor.convert" version "1.5.9.2"
133+
id "org.asciidoctor.jvm.convert" version "3.3.2"
134+
}
135+
136+
configurations {
137+
asciidoctorExt <2>
134138
}
135139
136140
dependencies {
137-
asciidoctor 'org.springframework.restdocs:spring-restdocs-asciidoctor:{project-version}' <2>
138-
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:{project-version}' <3>
141+
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor:{project-version}' <3>
142+
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:{project-version}' <4>
139143
}
140144
141-
ext { <4>
145+
ext { <5>
142146
snippetsDir = file('build/generated-snippets')
143147
}
144148
145-
test { <5>
149+
test { <6>
146150
outputs.dir snippetsDir
147151
}
148152
149-
asciidoctor { <6>
150-
inputs.dir snippetsDir <7>
151-
dependsOn test <8>
153+
asciidoctor { <7>
154+
inputs.dir snippetsDir <8>
155+
configurations 'asciidoctorExt' <9>
156+
dependsOn test <10>
152157
}
153158
----
154159
<1> Apply the Asciidoctor plugin.
155-
<2> Add a dependency on `spring-restdocs-asciidoctor` in the `asciidoctor` configuration.
156-
This will automatically configure the `snippets` attribute for use in your `.adoc` files
157-
to point to `build/generated-snippets`. It will also allow you to use the `operation`
158-
block macro.
159-
<3> Add a dependency on `spring-restdocs-mockmvc` in the `testImplementation`
160+
<2> Declare the `asciidoctorExt` configuration for dependencies that extend Asciidoctor.
161+
<3> Add a dependency on `spring-restdocs-asciidoctor` in the `asciidoctorExt`
162+
configuration. This will automatically configure the `snippets` attribute for use in your
163+
`.adoc` files to point to `build/generated-snippets`. It will also allow you to use the
164+
`operation` block macro.
165+
<4> Add a dependency on `spring-restdocs-mockmvc` in the `testImplementation`
160166
configuration. If you want to use `WebTestClient`, add a dependency on
161167
`spring-restdocs-webtestclient` instead.
162-
<4> Configure a property to define the output location for generated snippets.
163-
<5> Configure the `test` task to add the snippets directory as an output.
164-
<6> Configure the `asciidoctor` task
165-
<7> Configure the snippets directory as an input.
166-
<8> Make the task depend on the test task so that the tests are run before the
167-
documentation is created.
168+
<5> Configure a property to define the output location for generated snippets.
169+
<6> Configure the `test` task to add the snippets directory as an output.
170+
<7> Configure the `asciidoctor` task.
171+
<8> Configure the snippets directory as an input.
172+
<9> Configure the use of the `asciidoctorExt` configuration for extensions.
173+
<10> Make the task depend on the test task so that the tests are run before the
174+
documentation is created.
168175
====
169176

170177
[[getting-started-build-configuration-packaging-the-documentation]]

0 commit comments

Comments
 (0)