From f4c6ca563ca6677cb9456d627ab8a30b3d6860e0 Mon Sep 17 00:00:00 2001 From: Abel Salgado Romero Date: Thu, 11 Jan 2024 18:55:35 +0100 Subject: [PATCH] Use Gradle resolutionStrategy to align asciidoctor plugin versions * All plugins (convert, pdf, etc) are released together and compatibility between versions is not guaranteed. So, this PR uses 'resolutionStrategy' to assign the same version to all plugins ensuring they are all aligned * Bump asciidoctor gradle plugins to 4.0.1 --- settings.gradle | 9 +++++++++ spring-cloud-app-broker-docs/build.gradle | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/settings.gradle b/settings.gradle index e893fe9..05dd9c2 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,7 +1,16 @@ pluginManagement { + resolutionStrategy { + eachPlugin { + if (requested.id.namespace?.startsWith('org.asciidoctor.jvm')) { + useVersion("4.0.1") + } + } + } plugins { id 'io.spring.nohttp' version "0.0.11" id 'org.springframework.boot' version "2.6.15" + id 'org.asciidoctor.jvm.pdf' + id 'org.asciidoctor.jvm.convert' } repositories { gradlePluginPortal() diff --git a/spring-cloud-app-broker-docs/build.gradle b/spring-cloud-app-broker-docs/build.gradle index eae3818..de0f64c 100644 --- a/spring-cloud-app-broker-docs/build.gradle +++ b/spring-cloud-app-broker-docs/build.gradle @@ -18,8 +18,8 @@ import org.springframework.boot.gradle.plugin.SpringBootPlugin plugins { id 'org.springframework.boot' apply false - id 'org.asciidoctor.jvm.pdf' version '3.3.2' - id 'org.asciidoctor.jvm.convert' version '3.3.2' + id 'org.asciidoctor.jvm.convert' + id 'org.asciidoctor.jvm.pdf' } description = "Spring Cloud App Broker Documentation" @@ -53,6 +53,7 @@ task prepareAsciidocBuild(type: Sync) { } asciidoctorPdf { + dependsOn prepareAsciidocBuild baseDirFollowsSourceFile() asciidoctorj {