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

http-builder-ng / okhttp dependency issue #731

Open pdorrestijn opened 1 month ago

pdorrestijn commented 1 month ago

duplicate of https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/679 But since that one is pretty old and no fix has been provided, workaround does not appear to work and thus I can no longer build my project documentation...

This dependency comes from https://github.com/http-builder-ng which is in fact archived since 2022! Please can anyone fix this whole dependency chain which is bound to give even more issues?

pdorrestijn commented 1 month ago

With help of Mr. Haki:

buildscript {
    configurations.classpath {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            if (details.requested.group == 'com.burgstaller' && details.requested.name == 'okhttp-digest' && details.requested.version == '1.10') {
                details.useTarget "io.github.rburgst:${details.requested.name}:1.21"
                details.because 'Dependency has moved'
            }
        }
    }
}
ysb33r commented 1 month ago

For 4.x you should be able to the around the problem by adding the following line to the plugins {} block:

id 'org.ysb33r.jruby.resolver' version '1.0.2' apply false 
pdorrestijn commented 1 month ago

Thnx @ysb33r, as 4.x has some changes requiring docs to use different keywords for certain stuff, I will keep you solution in mind once I've fixed those changes. Would be wise though to replace http-builder-ng for some other library in due time. Since it's archived and no longer maintained since 2022, it is bound to give more problems in the future.