asciidoctor / asciidoctor-gradle-plugin

A Gradle plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project.
https://asciidoctor.github.io/asciidoctor-gradle-plugin/
Apache License 2.0
285 stars 120 forks source link

Update the version of org.asciidoctor:asciidoctorj-groovy-dsl used to one that is published to Maven Central #620

Closed erdi closed 1 year ago

erdi commented 2 years ago

The latest published version of the plugin, 3.3.2, resolves org/asciidoctor/asciidoctorj-groovy-dsl:2.0.0 when applied to a build. That version of org.asciidoctor:asciidoctorj-groovy-dsl is only available from JCenter which will be sunset in 2022 which in turn will break people's builds using this plugin on machines which have not resolved the artifact from JCenter previously.

There are versions of this artifact available from Maven Central - it's probably a good idea to update to using one of them given that users of this plugin are unable to configure the version of it used due to it being resolved via a detached configuration.

mrotteveel commented 2 years ago

A workaround is to add this to your build.gradle (or extend your current asciidoctorj config)

asciidoctorj {
    modules {
        groovyDsl {
            version '2.0.2'
        }
    }
}
erdi commented 2 years ago

Awesome workaround, thanks for sharing @mrotteveel! Bye bye, JCenter! Out of curiosity - how did you come up with it? Did you find the idea for it in the docs somewhere or did you have to resort to looking through the source?

mrotteveel commented 2 years ago

@erdi I already did something similar for the PDF plugin, guessed there was a similar mechanism for the groovy-dsl, and then checked the source. However, it is also documented at https://asciidoctor.github.io/asciidoctor-gradle-plugin/master/user-guide/#asciidoctorj-modules

erdi commented 2 years ago

I see. Thanks for explaining, @mrotteveel. Looks like I tried doing it the hard way and even contributed a fix when a simple workaround was already available. 🤦‍♂️

ysb33r commented 1 year ago

Permanently fixed in 4.0.0-alpha.1