@@ -6,6 +6,28 @@ plugins {
6
6
id " local.module"
7
7
}
8
8
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
+
9
31
tasks. withType(Javadoc ). configureEach {
10
32
def currentYear = new GregorianCalendar (). get( Calendar . YEAR )
11
33
@@ -21,7 +43,9 @@ tasks.withType(Javadoc).configureEach {
21
43
configure( options ) {
22
44
windowTitle = " Hibernate Javadocs ($project . name )"
23
45
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
25
49
bottom = " Copyright © 2001-$currentYear <a href=\" https://redhat.com\" >Red Hat, Inc.</a> All Rights Reserved."
26
50
27
51
// 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 {
47
71
48
72
addBooleanOption(' Xdoclint:none' , true )
49
73
}
50
- }
74
+ dependsOn tasks. unpackTheme
75
+ }
0 commit comments