asciidoctor-gradle-plugin icon indicating copy to clipboard operation
asciidoctor-gradle-plugin copied to clipboard

Unable to use 4.0 in precompiled script plugin

Open vpavic opened this issue 1 year ago • 6 comments

We're using org.asciidoctor:asciidoctor-gradle-jvm-pdf in a (very simple) precompiled script plugin written in Kotlin.

After attempting to upgrade the plugin to 4.0.1 the build fails with the following error:

$ ./gradlew asciidoctorPdf

> Task :plugins:compileKotlin FAILED
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
    class org.asciidoctor.gradle.jvm.pdf.AsciidoctorPdfTask, unresolved supertypes: org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask
    class org.asciidoctor.gradle.jvm.pdf.AsciidoctorPdfThemesExtension, unresolved supertypes: org.asciidoctor.gradle.base.AbstractDownloadableComponent
Adding -Xextended-compiler-checks argument might provide additional information.

This setup works fine with 3.3.2.

Here's a simple reproducer: sample-asciidoctor-pdf.zip

vpavic avatar Jan 23 '24 21:01 vpavic

QQ: If you asciidoctor-gradle-jvm to your dependencies in the included build, do you still see the same problem?

ysb33r avatar Jan 26 '24 15:01 ysb33r

That indeed helps, thanks.

Having taken a closer look at the project build now, shouldn't api configuration be used here (instead of implementation): https://github.com/asciidoctor/asciidoctor-gradle-plugin/blob/34f2cf13abec169ca7e4e3c0b666a3ba46848260/jvm-pdf/build.gradle#L14

vpavic avatar Jan 26 '24 18:01 vpavic

Thanks for confirming. It has been changed for the 4.0.2 release, which hopefully should out before end of Jan '24.

I am going to close this out.

ysb33r avatar Jan 26 '24 19:01 ysb33r

This situation is still the same with 4.0.2, could you please re-open this?

Looking at the published POMs here, org.asciidoctor:asciidoctor-gradle-jvm dependency is still declared with the runtime scope (vs compile as it was pre-4.0).

I can see that 82d2a2bb changed the dependency configuration, but that change isn't present on master.

vpavic avatar Feb 03 '24 15:02 vpavic

Any feedback here @ysb33r?

vpavic avatar Feb 14 '24 22:02 vpavic

I haven't had a chance to look at this.

ysb33r avatar Feb 15 '24 07:02 ysb33r

This was apparently resolved in 4.0.3.

vpavic avatar Jul 29 '24 13:07 vpavic