@@ -6,6 +6,28 @@ plugins {
66 id " local.module"
77}
88
9+ configurations {
10+ themezip
11+ }
12+
13+ dependencies {
14+ themezip ' org.hibernate.infra:hibernate-asciidoctor-theme:5.1.1.Final@zip'
15+ }
16+
17+ tasks. register(' unpackTheme' , Copy ) {
18+ def unpackDir = rootProject. layout. buildDirectory. dir(" unpacked-theme" )
19+
20+ onlyIf {
21+ ! unpackDir. get(). asFile. exists()
22+ }
23+ destinationDir = unpackDir. get(). asFile
24+
25+ def zipFile = configurations. themezip. singleFile
26+ from zipTree(zipFile)
27+
28+ dependsOn configurations. themezip
29+ }
30+
931tasks. withType(Javadoc ). configureEach {
1032 def currentYear = new GregorianCalendar (). get( Calendar . YEAR )
1133
@@ -21,7 +43,9 @@ tasks.withType(Javadoc).configureEach {
2143 configure( options ) {
2244 windowTitle = " Hibernate Javadocs ($project . name )"
2345 docTitle = " Hibernate Javadocs ($project . name : $project . version )"
24- stylesheetFile = rootProject. file( " shared/javadoc/stylesheet.css" )
46+ // Pick the styles for the JDK that is used to "build" the Javadocs:
47+ stylesheetFile = rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
48+ .dir(" hibernate-asciidoctor-theme" ). dir(" javadoc" ). dir(" jdk21" ). file(" stylesheet.css" ). asFile
2549 bottom = " Copyright © 2001-$currentYear <a href=\" https://redhat.com\" >Red Hat, Inc.</a> All Rights Reserved."
2650
2751 // The javadoc folder contains cached versions of the respective element-list files to avoid release issues when servers are down
@@ -47,4 +71,5 @@ tasks.withType(Javadoc).configureEach {
4771
4872 addBooleanOption(' Xdoclint:none' , true )
4973 }
50- }
74+ dependsOn tasks. unpackTheme
75+ }
0 commit comments