This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 74dcc3b749 GROOVY-11918: Bump to latest asciidoctorj versions
74dcc3b749 is described below

commit 74dcc3b749a7d2dbaf1da1d115af4b01d528b8cd
Author: Paul King <[email protected]>
AuthorDate: Sat Apr 11 08:00:55 2026 +1000

    GROOVY-11918: Bump to latest asciidoctorj versions
---
 .../groovy/org.apache.groovy-asciidoctor.gradle    | 40 ++++-----
 gradle/verification-metadata.xml                   | 95 +++++++++++++++++++++-
 settings.gradle                                    |  1 +
 subprojects/asciidoc-extensions/build.gradle       | 34 ++++++++
 .../asciidoctor/DocLinkExtensionRegistry.java      | 37 +++++++++
 .../groovy/asciidoctor/DocLinkMacroProcessor.java  | 76 +++++++++++++++++
 ...ciidoctor.jruby.extension.spi.ExtensionRegistry | 15 ++++
 versions.properties                                |  7 +-
 8 files changed, 271 insertions(+), 34 deletions(-)

diff --git a/build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle 
b/build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle
index 06df2625a6..056391d1fa 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle
@@ -42,11 +42,15 @@ configurations {
 tasks.withType(AbstractAsciidoctorTask).configureEach {
     outputs.cacheIf { true }
     
usesService(ConcurrentExecutionControlBuildService.restrict(AbstractAsciidoctorTask,
 gradle))
+    configurations 'asciidocExtensions'
+    jvm {
+        jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", 
"--add-opens", "java.base/java.io=ALL-UNNAMED")
+        jvmArgs("-Xmx2g")
+    }
 }
 
 asciidoctor {
     baseDirFollowsSourceFile()
-    configurations 'asciidocExtensions'
     def (full, major, minor, patch, flavor) = (groovyVersion =~ 
/(\d+)\.(\d++)\.(\d+)(?:-(.+))?/)[0]
     logDocuments = true
     sourceDir = project.file('src/spec/doc')
@@ -63,9 +67,6 @@ asciidoctor {
         }
         into 'assets'
     }
-    jvm {
-        jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", 
"--add-opens", "java.base/java.io=ALL-UNNAMED")
-    }
     attributes 'source-highlighter': 'prettify',
             groovyversion: groovyVersion,
             'groovy-major-version': major,
@@ -74,6 +75,10 @@ asciidoctor {
             'groovy-full-version': groovyVersion,
             'groovy-short-version': "${major}.${minor}",
             'javaParserVersion': versions.javaParser,
+            'jdk-base-url': 
"https://docs.oracle.com/en/java/javase/${17}/docs/api/index.html";,
+            'gjdk-base-url': 
"https://docs.groovy-lang.org/${versions.groovy}/html/groovy-jdk/index.html";,
+            'gapi-base-url': 
"https://docs.groovy-lang.org/${versions.groovy}/html/gapi/index.html";,
+            'gapid-base-url': 
"https://docs.groovy-lang.org/${versions.groovy}/html/gapi/";,
             doctype: 'book',
             revnumber: groovyVersion,
             icons: 'font',
@@ -93,34 +98,17 @@ asciidoctorj {
     resolutionStrategy {
         it.disableDependencyVerification()
     }
-    def baseUrls = [
-        jdk  : 
"https://docs.oracle.com/en/java/javase/${17}/docs/api/index.html";,
-        gjdk : 
"https://docs.groovy-lang.org/${versions.groovy}/html/groovy-jdk/index.html";,
-        gapi : 
"https://docs.groovy-lang.org/${versions.groovy}/html/gapi/index.html";,
-        gapid: "https://docs.groovy-lang.org/${versions.groovy}/html/gapi/";,
-    ]
-    for (def entry : baseUrls.entrySet()) {
-        def macroName = entry.key
-        def baseUrl = entry.value
-        docExtensions """
-            inline_macro(name: '${macroName}') { parent, target, attributes ->
-                def classNameAndAnchor = target.split('#')
-                def className = classNameAndAnchor[0]
-                def anchor = classNameAndAnchor.length > 1 ? 
classNameAndAnchor[1] : null
-                def baseURL = '${baseUrl}'
-                def base = className == 'index' ?
-                        baseURL : baseURL + '?' + className.replace('.', '/') 
+ '.html' + (anchor ? '#' + anchor : '')
-                createPhraseNode(parent, 'anchor', attributes.text ?: target, 
attributes, [type: ':link', target: base])
-            }
-        """
-    }
+    docExtensions project(':asciidoc-extensions')
     modules {
         diagram.version(versions.asciidoctorDiagram)
         pdf.version(versions.asciidoctorPdf)
-        groovyDsl.version(versions.asciidoctorGroovyDsl)
     }
 }
 
+dependencies {
+    asciidocExtensions 
"org.asciidoctor:asciidoctorj-diagram-plantuml:${versions.asciidoctorDiagramPlantuml}"
+}
+
 // skip the asciidoctor task if there's no directory with asciidoc files
 asciidoctor.onlyIf { project.file('src/spec/doc').exists() }
 
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 3548dc098c..8193964f67 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -127,15 +127,12 @@
          <ignored-key id="F13D3E721D56BD54" reason="Key couldn't be downloaded 
from any key server"/>
          <ignored-key id="F5C81DE10A0B8ECC" reason="Key couldn't be downloaded 
from any key server"/>
          <ignored-key id="FE66BCA17E67AE6F" reason="Key couldn't be downloaded 
from any key server"/>
-         <ignored-key id="530AA5F25C25011F" reason="Key couldn't be downloaded 
from any key server"/>
-         <ignored-key id="340B090F727518D8" reason="Key couldn't be downloaded 
from any key server"/>
       </ignored-keys>
       <trusted-keys>
          <trusted-key id="0181A4828FA27B6BE6F1F5A68611CD28F472E006">
             <trusting group="org.apache.maven"/>
             <trusting group="org.jline"/>
          </trusted-key>
-         <trusted-key id="F3184BCD55F4D016E30D4C9BF42E87F9665015C9" 
group="org.jsoup"/>
          <trusted-key id="019082BC00E0324E2AEF4CF00D3B328562A119A7" 
group="org.openjdk.jmh"/>
          <trusted-key id="0191E61ACBBE76323AC15C83B5AD94BDD6BDB924" 
group="me.champeau.openbeans" name="openbeans" version="1.0.2"/>
          <trusted-key id="04543577D6A9CC626239C50C7ECBD740FF06AEB5">
@@ -151,7 +148,6 @@
          <trusted-key id="077E8893A6DCC33DD4A4D5B256E73BA9A0B592D0" 
group="org.apache.logging.log4j"/>
          <trusted-key id="0785B3EFF60B1B1BEA94E0BB7C25280EAE63EBE5" 
group="^org[.]apache[.]httpcomponents($|([.].*))" regex="true"/>
          <trusted-key id="0A123C1ED3F13A6A0140E166C71FB765CD9DE313" 
group="org.apache.ant"/>
-         <trusted-key id="BED597EFC4BF399D3283F697432DC97E7B73F0B6" 
group="org.apache.ant"/>
          <trusted-key id="120D6F34E627ED3A772EBBFE55C7E5E701832382" 
group="org.yaml" name="snakeyaml"/>
          <trusted-key id="19BEAB2D799C020F17C69126B16698A4ADF4D638" 
group="org.checkerframework" name="checker-qual"/>
          <trusted-key id="1D85469D8559C2E1DF5F925131D2D79DF7E85DD3" 
group="org.jcommander" name="jcommander" version="1.83"/>
@@ -215,6 +211,7 @@
          <trusted-key id="AA417737BD805456DB3CBDDE6601E5C08DCCBB96" 
group="info.picocli" name="picocli"/>
          <trusted-key id="AAAA9D3F580C7223DBD1FF425746EE07D997DDB6" 
group="net.jqwik"/>
          <trusted-key id="AD296CA014321485EB6780FF8B8E0CB0F6A7657E" 
group="org.asciidoctor"/>
+         <trusted-key id="AF7104B493974EA5DDF5044355101494C452D7A2" 
group="org.crac"/>
          <trusted-key id="B02137D875D833D9B23392ECAE5A7FB608A0221C">
             <trusting group="org.apache.maven"/>
             <trusting group="org.codehaus.plexus"/>
@@ -247,6 +244,11 @@
          </trusted-key>
          <trusted-key id="EA313384CA0EBA950EA017E937890E298D9A2BFA" 
group="com.eed3si9n.jarjar"/>
          <trusted-key id="EAFC1F3B2FCED6AFD046C7D5734AEF3D43509290" 
group="org.osgi"/>
+         <trusted-key id="EC23FD5875DFF32547D5257F631ECF66932B28BA">
+            <trusting group="com.github.jnr"/>
+            <trusting group="com.headius"/>
+            <trusting group="^org[.]jruby($|([.].*))" regex="true"/>
+         </trusted-key>
          <trusted-key id="EE0CA873074092F806F59B65D364ABAA39A47320" 
group="com.google.errorprone" name="error_prone_annotations"/>
          <trusted-key id="EF97D052DF6F6975A4E8C495AB9BC6BE0524BAD3">
             <trusting group="com.github.jnr"/>
@@ -464,11 +466,21 @@
             <sha512 
value="7c2bbfa9cf0bf32749b06ecc55f2b01118739f1922187e839a4c011d30981e7ce36370051182a406c143246dd4653ed9498e8b2f83c5b65e6767cb8d95381020"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="com.github.jnr" name="jnr-enxio" version="0.32.18">
+         <artifact name="jnr-enxio-0.32.18.jar">
+            <sha512 
value="9dcc59ff72b1f9f397feda7690ae648fe7bdf64eb608aa4a8bf5f48354285652e70617dab72973e84dd0a8b9f8c2bb64625ff8299ee277478272dfebb97ef1f6"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="com.github.jnr" name="jnr-ffi" version="2.2.16">
          <artifact name="jnr-ffi-2.2.16.jar">
             <sha512 
value="1e0f16331bf31faf7e5837410fc363b3657ebd471da5c17d60f9366c819ab15b91f48c05b7a77b03ca25ccfba2caad65407fea83d595c283e0b038c883348145"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="com.github.jnr" name="jnr-ffi" version="2.2.17">
+         <artifact name="jnr-ffi-2.2.17.jar">
+            <sha512 
value="43aeb2c08f92045d44d852f4cfc31f9094134e856f5bd27e8d1625704395e338371a889061ea0aef8a4303dad4320987904eb9c3f313fe97aef65fe3ac97fc3e"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="com.github.jnr" name="jnr-netdb" version="1.2.0">
          <artifact name="jnr-netdb-1.2.0.jar">
             <sha512 
value="dfb143b2a3962bcdb7775d79a501aa93c2e8b7322a4ea3b29e976f6b1701ec93824cfb1ca7b564498ee56e664c18ea09cfd4123ac335058b90502c517f05f5d9"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
@@ -479,11 +491,21 @@
             <sha512 
value="14e823b07da84a2250bef0a2c41e44b9f390e8be2334fa06112dbd46039233b8ddbe5623308382dc61acde3d50d6df51e5d7055b726f5450716d7b41015c325e"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="com.github.jnr" name="jnr-posix" version="3.1.20">
+         <artifact name="jnr-posix-3.1.20.jar">
+            <sha512 
value="1bcb26600291a8684825d092d318447fbb56f069adbf8765d3fba208fc90e394e2d792dea0e9ce319bcc09a9a3f35f99678f8c8a3cd03365ddbb23e2545911b0"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="com.github.jnr" name="jnr-unixsocket" 
version="0.38.22">
          <artifact name="jnr-unixsocket-0.38.22.jar">
             <sha512 
value="f3cf66c964a97a93c8d2f75245c2c5a7457c0f21a062119add2e8a9c5dec6d2397ba302050cc235d01978a8b4d4596b2b8dbd4d860c59843d48c39edeeb84457"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="com.github.jnr" name="jnr-unixsocket" 
version="0.38.23">
+         <artifact name="jnr-unixsocket-0.38.23.jar">
+            <sha512 
value="d2dfbe0e5a5d86d102903af1d55ce1211d2f602d73262f080d3917723a18a673890b0ec8786ee7ae9ac378595cf2ad260ac28495ef6f971f542f4ffe4dc76b43"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="com.github.jnr" name="jnr-x86asm" version="1.0.2">
          <artifact name="jnr-x86asm-1.0.2.jar">
             <pgp value="0057FBD7F284A1C1B4F1E891EE6E41E5483F557D"/>
@@ -1728,6 +1750,11 @@
             <sha512 
value="2d9b0d3a98e15f0131078669e12c537a111558454b25d1edcdbdc1ce14f6a3be8372042cd510c4cd83deaad69f308594ce2717b16117aeea05e4d90c4a4c991d"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="org.asciidoctor" name="asciidoctorj" version="3.0.1">
+         <artifact name="asciidoctorj-3.0.1.jar">
+            <sha512 
value="f544fb6c8c122c5721286c511c2a01d253bbc1495701d5536dc54082a4c1b07e6385e74b4193d7b7b6b1f74dee2a4c6385253191cae8eda3a27e36a03257a2b5"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.asciidoctor" name="asciidoctorj-api" 
version="2.5.11">
          <artifact name="asciidoctorj-api-2.5.11.jar">
             <sha512 
value="93ff1b8fc521b6a570a2bd354ec0c1aff40ca01c2b07d06cb931568f912ecdd2c60f35a035fecf9b5f607675eb268935debb027f932117c69d67965a7b8e6056"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
@@ -1738,11 +1765,31 @@
             <sha512 
value="4340fe15492346712807805c17157012b1574b05929bebcba5c0ea06c293a5e31cbe3469d6b4d1c1e6c4dbdbd0577cbf4c9b11ae626cc522d0ebbffb75dc475c"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="org.asciidoctor" name="asciidoctorj-api" 
version="3.0.1">
+         <artifact name="asciidoctorj-api-3.0.1.jar">
+            <sha512 
value="0cf9571f72a4f8638abbf348ebf090d87e20e1cd516e8a927b832912155e480526fc8988c9ead63127cd7bf3350dc0ed361e56148d07c1c6cb5a721408cff75e"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.asciidoctor" name="asciidoctorj-diagram" 
version="2.2.17">
          <artifact name="asciidoctorj-diagram-2.2.17.jar">
             <sha512 
value="fef5ad644db433c46b31c4007953fbb9e83e6306b9f13550dad4e207c80e854ec2594e3e2c0a2abd08d7cdfc524cd4a8c5af11d46b53f4808a1b853653d15ed0"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="org.asciidoctor" name="asciidoctorj-diagram" 
version="3.0.1">
+         <artifact name="asciidoctorj-diagram-3.0.1.jar">
+            <sha512 
value="e274a9808ea85309713d03844e0ceae6bb8056d81e64d60d22b950d06a06b3a96d29cc44da540f1e03958e279729bed1533548e37aaaf8bbf9238009468ac9b2"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
+      <component group="org.asciidoctor" name="asciidoctorj-diagram" 
version="3.2.1">
+         <artifact name="asciidoctorj-diagram-3.2.1.jar">
+            <sha512 
value="76dea5189290d1d4c0908eb80928ab48e7596eaabd5795989d277c6eeb493ecd8055c97860e7973c0dfa2ab6ab75ed6315d73af11ee52c9e8b040a15ae0f4256"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
+      <component group="org.asciidoctor" name="asciidoctorj-diagram-batik" 
version="1.19">
+         <artifact name="asciidoctorj-diagram-batik-1.19.jar">
+            <sha512 
value="647f3a026bc4a8d1ac37787549bfb67cb626114a7efbd91644e1c44a700bb700e042dd6e4e4de89873af7b3fa0fb77277c58ef4784c8b99c45b4b59310121454"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.asciidoctor" name="asciidoctorj-diagram-ditaamini" 
version="1.0.3">
          <artifact name="asciidoctorj-diagram-ditaamini-1.0.3.jar">
             <sha512 
value="6e3a109fb5e2743bf413640953b3096a892760d93212098d4dc2315671d07d1c7133bfe6b347b85a9fdcbc99ccdf0249332b93bbadc52b79896b8c5078935dae"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
@@ -1753,6 +1800,11 @@
             <sha512 
value="781fcbf6ef5af6e7fd2db8490a130adce2d3da81d768fb20726bec9068396017f4d95cfeaed363ab5c21b582394c8c9febc2fa610f1fae87958c71998dd676c3"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="org.asciidoctor" name="asciidoctorj-diagram-plantuml" 
version="1.2026.2">
+         <artifact name="asciidoctorj-diagram-plantuml-1.2026.2.jar">
+            <sha512 
value="8a7f7294078e5979767c14f9569c6f18d9118ce4d1ce01af504976eb736ff53d5f44b839e0873fa36358b90ec769c0578933f87ef12621f89905683c25231b86"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.asciidoctor" name="asciidoctorj-groovy-dsl" 
version="2.0.2">
          <artifact name="asciidoctorj-groovy-dsl-2.0.2.jar">
             <pgp value="36390DE6A0E61EE4C7B4BA02C1D3063467F1EBD1"/>
@@ -1931,6 +1983,11 @@
             <sha512 
value="50cc6a6ae143ce6a7e42d21d7fc049a252c63ee8f1cb7ceff6a7a97bc4a0f4b4dda646d108e175b7fe2eaa3214b04c75672c6abee7fafb5b587809a916500215"
 origin="Generated by Gradle"/>
          </artifact>
       </component>
+      <component group="org.crac" name="crac" version="1.5.0">
+         <artifact name="crac-1.5.0.jar">
+            <sha512 
value="062f49bbabcf2d56e171ff988d21437fbf98b1734b3704bfdcfbcca98fadfbb10e9bfbae6d3f74f1bf04e9190cfe87686174b30f8c58592f9721fdef8827c99d"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.cyclonedx" name="cyclonedx-core-java" 
version="11.0.1">
          <artifact name="cyclonedx-core-java-11.0.1.jar">
             <pgp value="DC61AE5DFD409C64F592AC1A6FD54E1F311B47E9"/>
@@ -2231,22 +2288,42 @@
             <sha512 
value="a3ca12e57a48c3d8401329ada8ea80f8e3587a282095778c35e44f875324c7b75b9c9c0534d864fdfcc61fcd2b46742246c733e09b135050d24fa5ee08a4319a"
 origin="Generated by Gradle"/>
          </artifact>
       </component>
+      <component group="org.jruby" name="jruby" version="9.4.14.0">
+         <artifact name="jruby-9.4.14.0.jar">
+            <sha512 
value="c83b9271a2f14ac4a853bd3831da192e39d7cd982adf5d741dc31c5dba711d49f14506a84926d80f9d45ce5a72cb2723b5f7b1cce72be5c3fc35109dba9de105"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.jruby" name="jruby" version="9.4.8.0">
          <artifact name="jruby-9.4.8.0.jar">
             <sha512 
value="464f2ec65a873596853f685a991547b821dfa7c373df572d7b5cf223f889f5a277fe9dfaa747cce9dbb915657e94602e35528ac32c8aae84d0c2ac6cbb4784b7"
 origin="Generated by Gradle"/>
          </artifact>
       </component>
+      <component group="org.jruby" name="jruby-base" version="9.4.14.0">
+         <artifact name="jruby-base-9.4.14.0.jar">
+            <sha512 
value="c34fae360e7efacac60aa4bd83a5c3f0fe581b78beaa196d1e886e89e096fa5004e75c9f033f29bba1fcbcc6ec57841a0c481080693cd6c8653afeb33300b13b"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.jruby" name="jruby-base" version="9.4.8.0">
          <artifact name="jruby-base-9.4.8.0.jar">
             <sha512 
value="0354fd050b01ecc7b4d0cec5cb55799afd0258dbf534e21a4fc4e9a875800e96454f151a85904a437cfb63e740373d9ecae29c115c07dd1328d2771bb826fedd"
 origin="Generated by Gradle"/>
          </artifact>
       </component>
+      <component group="org.jruby" name="jruby-complete" version="9.4.14.0">
+         <artifact name="jruby-complete-9.4.14.0.jar">
+            <sha512 
value="5d76502d2587307eac9948a3fcc1fec4ccc17f3f11c9283851afa4c631d997ecbde0940c94db57f13e85fa0331bba786841b8d2c51e74f97189d644661ea79f3"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.jruby" name="jruby-complete" version="9.4.5.0">
          <artifact name="jruby-complete-9.4.5.0.jar">
             <pgp value="416952B945B78A34C6C7678562EBFC78FE4156D1"/>
             <sha512 
value="01a12f35f9259003b0be9bb4f7e2f36a174cb67eed600b07884f946fb203b143ce0bd2543e74032e83b11afdadd56e5aa22f3c02628fdff27956b8f5f3fa8290"
 origin="Generated by Gradle"/>
          </artifact>
       </component>
+      <component group="org.jruby" name="jruby-stdlib" version="9.4.14.0">
+         <artifact name="jruby-stdlib-9.4.14.0.jar">
+            <sha512 
value="abfd3448ecbd46ff87ddc33a58afdbdf239a284263e32be24ed123ebda6955b655e13aca742c3957b5d3d63e4acd201f2a2f92f4ec87531aef486789f9fbbce4"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.jruby" name="jruby-stdlib" version="9.4.8.0">
          <artifact name="jruby-stdlib-9.4.8.0.jar">
             <sha512 
value="86935ea1f3fe51134ea4c902389b4eb18e397e448b84ea0ab0b3db31288dd6d54be38aadc1f7a27895c986fa5aa2c75c8d1579c3bc27a67d5765f0a72cf979db"
 origin="Generated by Gradle"/>
@@ -2263,11 +2340,21 @@
             <sha512 
value="625210aa07d1e08bf2f5fdc9da6c491a4e5a56e7db297cba1aa73636670ac1d62f3fd763716ef6ede862456b17169272ed9c8461d07100f95262163dc9c18ef8"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="org.jruby.jcodings" name="jcodings" version="1.0.63">
+         <artifact name="jcodings-1.0.63.jar">
+            <sha512 
value="280e989a1af7679da82bb9adb27a8c4e08c8da09f0bb93c380a36bfe7071c62bc9e7248b634d9e04f3ab275ec0672a44f8ab41dca8c10128c4351b6302275e84"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.jruby.joni" name="joni" version="2.2.1">
          <artifact name="joni-2.2.1.jar">
             <sha512 
value="e4fa4dda7478d5254b80aa77014d6df05317ac55d957da9ade6c9a80968aaf49d87d58930b8ddd44333270fa38984649858655b54c3aa8463602e0da8902d53a"
 origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
          </artifact>
       </component>
+      <component group="org.jruby.joni" name="joni" version="2.2.5">
+         <artifact name="joni-2.2.5.jar">
+            <sha512 
value="8723a3d245c39d289c409b4be7b8ab6071c1aa459b9b73562b316b829096335bea51df98df15d9bcabc9eb5bc0437f90ecfa269089faf34ca81daf81659f254d"
 origin="Generated by Gradle"/>
+         </artifact>
+      </component>
       <component group="org.jsoup" name="jsoup" version="1.22.1">
          <artifact name="jsoup-1.22.1.jar">
             <sha512 
value="6f229021019146af5fc1e40edd05c96b93cf4eb9e2de11a6b7055849b9480c6abb7b416c0a8974cac3500c9147f00735f4684ee7f891b756f2fed0c76aa219c3"
 origin="Generated by Gradle"/>
diff --git a/settings.gradle b/settings.gradle
index a6d7cebf24..52d38fb580 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -82,6 +82,7 @@ def subprojects = [
         'groovy-typecheckers',
         'groovy-xml',
         'groovy-yaml',
+        'asciidoc-extensions',
         'performance',
         'tests-preview',
         'binary-compatibility',
diff --git a/subprojects/asciidoc-extensions/build.gradle 
b/subprojects/asciidoc-extensions/build.gradle
new file mode 100644
index 0000000000..cfcbaa411e
--- /dev/null
+++ b/subprojects/asciidoc-extensions/build.gradle
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+plugins {
+    id 'org.apache.groovy-common'
+    id 'java-library'
+}
+
+repositories {
+    mavenCentral()
+}
+
+dependencies {
+    compileOnly "org.asciidoctor:asciidoctorj:${versions.asciidoctorj}"
+}
+
+sonarqube {
+    skipProject = true
+}
diff --git 
a/subprojects/asciidoc-extensions/src/main/java/org/apache/groovy/asciidoctor/DocLinkExtensionRegistry.java
 
b/subprojects/asciidoc-extensions/src/main/java/org/apache/groovy/asciidoctor/DocLinkExtensionRegistry.java
new file mode 100644
index 0000000000..a679e7f2fd
--- /dev/null
+++ 
b/subprojects/asciidoc-extensions/src/main/java/org/apache/groovy/asciidoctor/DocLinkExtensionRegistry.java
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.groovy.asciidoctor;
+
+import org.asciidoctor.Asciidoctor;
+import org.asciidoctor.jruby.extension.spi.ExtensionRegistry;
+
+/**
+ * Automatically registers the documentation link inline macros
+ * (jdk, gjdk, gapi, gapid) when this JAR is on the AsciidoctorJ classpath.
+ */
+public class DocLinkExtensionRegistry implements ExtensionRegistry {
+    @Override
+    public void register(Asciidoctor asciidoctor) {
+        asciidoctor.javaExtensionRegistry()
+                .inlineMacro(new DocLinkMacroProcessor("jdk", false))
+                .inlineMacro(new DocLinkMacroProcessor("gjdk", false))
+                .inlineMacro(new DocLinkMacroProcessor("gapi", false))
+                .inlineMacro(new DocLinkMacroProcessor("gapid", true));
+    }
+}
diff --git 
a/subprojects/asciidoc-extensions/src/main/java/org/apache/groovy/asciidoctor/DocLinkMacroProcessor.java
 
b/subprojects/asciidoc-extensions/src/main/java/org/apache/groovy/asciidoctor/DocLinkMacroProcessor.java
new file mode 100644
index 0000000000..9cf388132c
--- /dev/null
+++ 
b/subprojects/asciidoc-extensions/src/main/java/org/apache/groovy/asciidoctor/DocLinkMacroProcessor.java
@@ -0,0 +1,76 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.groovy.asciidoctor;
+
+import org.asciidoctor.ast.PhraseNode;
+import org.asciidoctor.ast.StructuralNode;
+import org.asciidoctor.extension.InlineMacroProcessor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Inline macro processor that generates documentation links.
+ * Used for jdk:, gjdk:, gapi:, and gapid: macros in Groovy's asciidoc sources.
+ * <p>
+ * The base URL is read from a document attribute named "{macroName}-base-url".
+ * For example, the "jdk" macro reads the "jdk-base-url" attribute.
+ */
+public class DocLinkMacroProcessor extends InlineMacroProcessor {
+
+    private final String baseUrlAttribute;
+    private final boolean directPath;
+
+    /**
+     * @param macroName     the macro name (e.g. "jdk", "gapi")
+     * @param directPath    if true, appends the class path directly to the 
base URL
+     *                      (for gapid); if false, appends via "?" query 
separator (for jdk/gjdk/gapi)
+     */
+    public DocLinkMacroProcessor(String macroName, boolean directPath) {
+        super(macroName);
+        this.baseUrlAttribute = macroName + "-base-url";
+        this.directPath = directPath;
+    }
+
+    @Override
+    public PhraseNode process(StructuralNode parent, String target, 
Map<String, Object> attributes) {
+        String baseUrl = (String) 
parent.getDocument().getAttribute(baseUrlAttribute);
+        String[] parts = target.split("#", 2);
+        String className = parts[0];
+        String anchor = parts.length > 1 ? parts[1] : null;
+
+        String href;
+        if ("index".equals(className)) {
+            href = baseUrl;
+        } else {
+            String classPath = className.replace('.', '/') + ".html";
+            if (directPath) {
+                href = baseUrl + classPath + (anchor != null ? "#" + anchor : 
"");
+            } else {
+                href = baseUrl + "?" + classPath + (anchor != null ? "#" + 
anchor : "");
+            }
+        }
+
+        Map<String, Object> options = new HashMap<>();
+        options.put("type", ":link");
+        options.put("target", href);
+        Object text = attributes.get("text");
+        return createPhraseNode(parent, "anchor", text != null ? (String) text 
: target, attributes, options);
+    }
+}
diff --git 
a/subprojects/asciidoc-extensions/src/main/resources/META-INF/services/org.asciidoctor.jruby.extension.spi.ExtensionRegistry
 
b/subprojects/asciidoc-extensions/src/main/resources/META-INF/services/org.asciidoctor.jruby.extension.spi.ExtensionRegistry
new file mode 100644
index 0000000000..97824d9d2d
--- /dev/null
+++ 
b/subprojects/asciidoc-extensions/src/main/resources/META-INF/services/org.asciidoctor.jruby.extension.spi.ExtensionRegistry
@@ -0,0 +1,15 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+org.apache.groovy.asciidoctor.DocLinkExtensionRegistry
diff --git a/versions.properties b/versions.properties
index b06d457390..90388e6edf 100644
--- a/versions.properties
+++ b/versions.properties
@@ -15,11 +15,10 @@
 
 ant=1.10.17
 antlr4=4.13.2.7
-# later asciidoctorDiagram versions seem to break some diagrams
-asciidoctorDiagram=2.2.17
-asciidoctorGroovyDsl=2.0.2
+asciidoctorDiagram=3.0.1
+asciidoctorDiagramPlantuml=1.2026.2
 asciidoctorPdf=2.3.23
-asciidoctorj=2.5.11
+asciidoctorj=3.0.1
 asm=9.9.1
 bridger=1.6.Final
 checkstyle=12.3.1

Reply via email to