Skip to content

Commit 430ef9b

Browse files
committed
Update docs infra to Maven Central artifacts
1 parent ef327e9 commit 430ef9b

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
buildscript {
22
ext.kotlinVersion = '1.5.32'
33
repositories {
4+
gradlePluginPortal()
45
mavenCentral()
5-
maven { url 'https://plugins.gradle.org/m2' }
6-
maven { url 'https://repo.spring.io/plugins-release-local' }
6+
if (version.endsWith('SNAPSHOT')) {
7+
maven { url 'https://repo.spring.io/snapshot' }
8+
}
79
}
810
dependencies {
911
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"

gradle/docs.gradle

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
11
ext {
2-
docResourcesVersion = '0.2.5'
3-
blockSwitchVersion = '0.5.0'
2+
backendVersion = '0.0.5'
43
}
54

65
configurations {
7-
docs
8-
asciidoctorExt
6+
asciidoctorExtensions
97
}
108

119
dependencies {
12-
docs "io.spring.docresources:spring-doc-resources:${docResourcesVersion}@zip"
13-
asciidoctorExt "io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:$blockSwitchVersion"
14-
}
15-
16-
task prepareAsciidocBuild(type: Sync) {
17-
dependsOn configurations.docs
18-
from {
19-
configurations.docs.collect { zipTree(it) }
20-
}
21-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
22-
from 'src/reference/asciidoc/'
23-
into "$buildDir/asciidoc"
10+
asciidoctorExtensions "io.spring.asciidoctor.backends:spring-asciidoctor-backends:$backendVersion"
2411
}
2512

2613
task checkAsciidocLinks {
27-
dependsOn prepareAsciidocBuild
28-
inputs.dir("$buildDir/asciidoc")
14+
inputs.dir('src/reference/asciidoc')
2915
doLast {
3016
def errors = new ArrayList<>();
3117
errors.add('*** Anchor reference errors found:')
@@ -65,7 +51,7 @@ task checkAsciidocLinks {
6551
asciidoctorPdf {
6652
dependsOn checkAsciidocLinks
6753
baseDirFollowsSourceFile()
68-
configurations 'asciidoctorExt'
54+
configurations 'asciidoctorExtensions'
6955

7056
asciidoctorj {
7157
sourceDir "$buildDir/asciidoc"
@@ -109,7 +95,7 @@ asciidoctorj {
10995
asciidoctor {
11096
dependsOn asciidoctorPdf
11197
baseDirFollowsSourceFile()
112-
configurations 'asciidoctorExt'
98+
configurations 'asciidoctorExtensions'
11399
sourceDir "$buildDir/asciidoc"
114100
inputs.dir(sourceDir)
115101
resources {

0 commit comments

Comments
 (0)