asciidoctor-gradle-plugin
asciidoctor-gradle-plugin copied to clipboard
Unable to use 4.0 in precompiled script plugin
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
QQ: If you asciidoctor-gradle-jvm
to your dependencies in the included build, do you still see the same problem?
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
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.
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
.
Any feedback here @ysb33r?
I haven't had a chance to look at this.
This was apparently resolved in 4.0.3
.