Hey folks, after a long time lying around as an al...
# community-news
y
Hey folks, after a long time lying around as an alpha release Asciidoctor Gradle 5.0.0 is finally out! It has been tested up to Gradle 9.7.1 and is compatible down to 8.0.2. depending on the specific plugins used a minimum of JDK8 or JDK11 is required. All of the model5 plugins that has the new DSL are compatible with CC & IP. The only exception might be Downdoc. I suspect it is, but it does have tests for that atm. The old DSL is still around, but the plan sort of is to dump that in the 6.x release. I am not sure whether the documentation has propagated yet as that is handled by a different project over which this project has no control. At the same time, I am also announcing that I am stepping down as the main maintainer of this project. I simply do not have the time to spend on it, as there are a lot of other plugins I have to look after. I'll still be around to help a bit, but it is time for someone else to come forward and take on the responsibility of at least performing bug fixes.
🎉 8
❤️ 3
😢 3
l
Congrats on getting 5.0.0 out the door Schalk, and thank you for everything you've put into this plugin over the years! 🙏 Asciidoctor Gradle has been a key part of how we build the
gradle/gradle
docs for a long time, and it's carried a lot of weight for us. The plugin has done so much for us me (its been part of my entire tenure at Gradle). With how things are changing, I'm moving our docs over to Markdown, so our use of it will wind down. Enjoy the extra breathing room, and good luck with the rest of your awesome plugins!
thank you 1
y
@Laura Kassovic Now I'm curious as to what the motivations are hange all of those docs down to Markdown which effectively is inferior to Asciidoc.
l
It's all about speed to serve docs to ai agents now
s
can't agents read asciidoc?
l
They can but it's not what they read, they currently read our HTML (which is litered with decorations/js/chrome)
IF we switch to markdown we can serve a new standard which is html along side md
This is a great reference if you are curious: vercel.com/kb/guide/make-your-site-readable-by-ai-agents
y
Well the new
5.0.0
has
Downdoc
support which creates Markdown from Asciidoc. It just not have
Reducer
support atm, which is needed if your Asciidoc contains
include
entries.
l
The
Reducer
is a dealbreaker. But maybe I could add support. Thoughts Schalk?
y
It will need a special engine formatter, which reads asciidoc files and then spews out the combined files. It can be done within the architecture, but it is not trivial. once that is in place a build script should be able to wire the outputs of the Reducer task into the DOwndoc task.
l
i'm looking into this a bit more. Today I'm updating our build logic to use Asciidoctor Gradle 5.0.0. I might not need the
Reducer
anyways so it might not be a blocker.
y
There is an open issue for this github.com/asciidoctor/asciidoctor-gradle-plugin/issues/766. The reason why I did not add it at the time is that the Reducer library does not act as a backend (it misses some code) and therefore it was not straight forward to make it an implementation of
AsciidoctorjsOutputFormatterVersioned
l
Crud, while enabling CC/IP for Gradle docs using the latest version of Asciidoctor Gradle 5.0.0 , I hit this error while creating a model5 `AsciidoctorTask`:
Copy code
Caused by: org.gradle.api.InvalidUserCodeException: Cannot call 'getByName(String)' on
'BuildServicesRegistry.getRegistrations()' when Isolated Projects is enabled.
Only 'findByName(String)' is permitted. Alternatively, use
'BuildServicesRegistry.registerIfAbsent(String, Class)' if possible.
    at org.gradle.api.internal.DelegatingNamedDomainObjectSet.getByName(DelegatingNamedDomainObjectSet.java:145)
    at org.ysb33r.grolifant5.api.core.runnable.GrolifantDefaultTask.<init>(GrolifantDefaultTask.groovy:75)
    at org.asciidoctor.gradle.model5.core.tasks.AsciidoctorTask.<init>(AsciidoctorTask.groovy)
@ysb33r, for reference: grolifant5-core 5.12.4, asciidoctor5-jvm-core-plugin 5.0.0, Gradle 9.9.0-milestone-2
and org.gradle.isolated-projects=true
y
Damn, I thought I fixed that.
I'll deal with the Grolifant one now
gitlab.com/ysb33rOrg/…/209 I can get that out today sometime, but I am not sure when the Asciidoctor Plugin can go out.
I made a quick 5.0.1 that fixes this and two other small issues. @Andres Almiray will release that when he has time.
I did not to any testing except for running the test suite. So there is still a chance that I have missed something. Anything that pops up now will have to wait at least two weeks.
l
Thanks, I will try it out as soon as its released
@ysb33r thanks for 5.0.1, it fixes the Isolated Projects failure. One more issue blocks me however:
AsciidoctorTask
computes
conversionSettings.sourceFiles
in its constructor as
sourceRootDir.zip(resolvedSourcePatterns) { dir, pats -> fileTree(dir).matching { include(pats) }.files }
. With CC on, that
zip
is evaluated when the cache entry is stored, even though the source dir is another task's
@OutputDirectory
. So when the sources are staged by a task in the same build, a clean build finishes the conversion as NO-SOURCE, and the next build discards the cache entry ("an input to unknown location has changed").
y
Can you raise an issue for it please? I'll try to look at it next week.
l
I made a fix in a local version of asciidoctor-gradle-plugin and it fully works on
gradle/gradle
I'm going to create an issue and pr for asciidoctor-gradle-plugin
👆@ysb33r, feel free to do what you want with my github issue and pr