File tree Expand file tree Collapse file tree
buildSrc/src/main/groovy/io/spring/gradle/convention Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import org.gradle.api.Project
55import org.gradle.api.Task
66import org.gradle.api.plugins.BasePlugin
77import org.gradle.api.plugins.PluginManager
8+ import org.gradle.api.tasks.Sync
89import org.gradle.api.tasks.bundling.Zip
910
1011/**
@@ -19,6 +20,17 @@ public class DocsPlugin implements Plugin<Project> {
1920 pluginManager. apply(BasePlugin );
2021 pluginManager. apply(JavadocApiPlugin );
2122
23+ project. tasks. register(" syncAntoraAttachments" , Sync ) { sync ->
24+ sync. group = ' Documentation'
25+ sync. description = ' Syncs the Antora attachments'
26+ sync. from(project. provider({ project. tasks. api. outputs }))
27+ sync. into(project. layout. buildDirectory. dir(' generated-antora-resources/modules/ROOT/assets/attachments/api/java' ))
28+ }
29+
30+ project. tasks. register(" generateAntoraResources" ) {
31+ it. dependsOn ' generateAntoraYml' , ' syncAntoraAttachments'
32+ }
33+
2234 Task docsZip = project. tasks. create(' docsZip' , Zip ) {
2335 dependsOn ' api'
2436 group = ' Distribution'
Original file line number Diff line number Diff line change @@ -20,22 +20,11 @@ antora {
2020 ]
2121}
2222
23- tasks. register(" syncAntoraAttachments" , Sync ) {
24- group = ' Documentation'
25- description = ' Syncs the Antora attachments'
26- from project. provider( { project. tasks. api. outputs } )
27- into project. layout. buildDirectory. dir(' generated-antora-resources/modules/ROOT/assets/attachments/api/java' )
28- }
29-
3023tasks. named(" generateAntoraYml" ) {
3124 asciidocAttributes = project. provider( { generateAttributes() } )
3225 asciidocAttributes. putAll(providers. provider( { resolvedVersions(project. configurations. testRuntimeClasspath) }))
3326}
3427
35- tasks. register(" generateAntoraResources" ) {
36- dependsOn ' generateAntoraYml' , ' syncAntoraAttachments'
37- }
38-
3928dependencies {
4029 testImplementation platform(project(' :spring-security-dependencies' ))
4130 testImplementation project(' :spring-security-config' )
You can’t perform that action at this time.
0 commit comments