Skip to content

Commit 647d3c0

Browse files
author
Abel Salgado Romero
authored
Apply a resolutionStrategy to avoid Asciidoctor Gradle version multiple times (#253)
1 parent c63e948 commit 647d3c0

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

java-cfenv-docs/build.gradle

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,15 @@ plugins {
66
description = 'Java CF Env Documentation'
77

88
configurations {
9-
docs
9+
asciidoctorExtensions
1010
}
1111

1212
dependencies {
13-
docs "io.spring.docresources:spring-doc-resources:0.2.5@zip"
13+
asciidoctorExtensions "io.spring.asciidoctor.backends:spring-asciidoctor-backends:0.0.7"
1414
}
1515

1616
task prepareAsciidocBuild(type: Sync) {
17-
dependsOn configurations.docs
18-
// copy doc resources
19-
from {
20-
configurations.docs.collect { zipTree(it) }
21-
}
22-
// and doc sources
17+
// Copy doc sources
2318
from "src/main/asciidoc"
2419
// to a temporary build directory
2520
into "$buildDir/asciidoc"

settings.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
pluginManagement {
2+
resolutionStrategy {
3+
eachPlugin {
4+
if (requested.id.namespace?.startsWith('org.asciidoctor.jvm')) {
5+
useVersion("4.0.3")
6+
}
7+
}
8+
}
29
plugins {
310
id "io.spring.nohttp" version "0.0.11"
4-
id 'org.asciidoctor.jvm.pdf' version '4.0.3'
5-
id 'org.asciidoctor.jvm.convert' version '4.0.3'
11+
id 'org.asciidoctor.jvm.pdf'
12+
id 'org.asciidoctor.jvm.convert'
613
}
714
}
815

0 commit comments

Comments
 (0)