@@ -7,6 +7,14 @@ plugins {
7
7
id " hr-java-library"
8
8
}
9
9
10
+ configurations {
11
+ themezip
12
+ }
13
+
14
+ dependencies {
15
+ themezip ' org.hibernate.infra:hibernate-asciidoctor-theme:6.0.0.Final@zip'
16
+ }
17
+
10
18
ext {
11
19
projectsToSkipWhenAggregatingJavadocs = [
12
20
' example' ,
@@ -21,6 +29,23 @@ rootProject.subprojects { subproject ->
21
29
}
22
30
}
23
31
32
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
+ // Prepare the theme for Javadocs/Asciidoc
34
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
+ tasks. register(' unpackTheme' , Copy ) {
36
+ def unpackDir = rootProject. layout. buildDirectory. dir(" unpacked-theme" )
37
+
38
+ onlyIf {
39
+ ! unpackDir. get(). asFile. exists()
40
+ }
41
+ destinationDir = unpackDir. get(). asFile
42
+
43
+ def zipFile = configurations. themezip. singleFile
44
+ from zipTree(zipFile)
45
+
46
+ dependsOn configurations. themezip
47
+ }
48
+
24
49
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25
50
// Aggregated JavaDoc
26
51
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -50,6 +75,9 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) {
50
75
windowTitle = ' Hibernate Reactive API documentation'
51
76
docTitle = " Hibernate Reactive API documentation ($project . version )"
52
77
bottom = " Copyright © $inceptionYear -$currentYear <a href=\" http://redhat.com\" >Red Hat, Inc</a>. All Rights Reserved."
78
+ // Pick the styles for the JDK that is used to "build" the Javadocs:
79
+ stylesheetFile = rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
80
+ .dir(" hibernate-asciidoctor-theme" ). dir(" javadoc" ). dir(" jdk21" ). file(" stylesheet.css" ). asFile
53
81
use = true
54
82
options. encoding = ' UTF-8'
55
83
@@ -90,6 +118,8 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) {
90
118
classpath + = subProject. sourceSets. main. output + subProject. sourceSets. main. compileClasspath
91
119
}
92
120
}
121
+
122
+ dependsOn ' unpackTheme'
93
123
}
94
124
95
125
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -104,27 +134,47 @@ asciidoctor {
104
134
def renderReferenceDocumentationTask = tasks. register( ' renderReferenceDocumentation' , AsciidoctorTask ) {
105
135
description = ' Renders the Reference Documentation in HTML format using Asciidoctor.'
106
136
sourceDir = file( ' src/main/asciidoc/reference' )
137
+ asciidoctorj {
138
+ version ' 3.0.0'
139
+ docExtensions(project(' :local-build-asciidoctor-extensions' ))
140
+ }
141
+
107
142
sources {
108
143
include ' index.adoc'
109
144
}
110
145
111
146
resources {
112
147
from( sourceDir ) {
113
148
include ' images/**'
149
+ }
150
+ from(rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
151
+ .dir(" hibernate-asciidoctor-theme" ). dir(" asciidoc" )) {
114
152
include ' css/**'
153
+ include ' images/**'
154
+ include ' script/**'
115
155
}
116
156
}
117
157
118
158
outputDir = project. layout. buildDirectory. dir( " asciidoc/reference/html_single" ). get(). asFile
119
159
options logDocuments : true
120
160
121
161
attributes icons : ' font' ,
122
- ' source-highlighter' : ' rouge' ,
123
- experimental : true ,
124
- linkcss : true ,
125
- majorMinorVersion : project. projectVersion. family,
126
- fullVersion : project. version. toString(),
127
- docinfo : ' private'
162
+ ' source-highlighter' : ' rouge' ,
163
+ majorMinorVersion : project. projectVersion. family,
164
+ fullVersion : project. version. toString(),
165
+ stylesdir : " css" ,
166
+ ' iconfont-remote' : false ,
167
+ ' iconfont-name' : ' font-awesome/css/solid' ,
168
+ docinfo : ' shared,private' ,
169
+ docinfodir : rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
170
+ .dir(" hibernate-asciidoctor-theme" ). dir(" asciidoc" ). dir(" docinfo" ). dir(' hibernate' ). asFile. absolutePath,
171
+ ' html.meta.project-key' : ' orm' ,
172
+ ' html.outdated-content.project-key' : ' orm' ,
173
+ ' html-meta-description' : ' Hibernate Reactive, reactive API for Hibernate ORM - Reference Documentation' ,
174
+ ' html-meta-keywords' : ' hibernate, reactive, hibernate reactive, database, db, vert.x' ,
175
+ ' html-meta-version-family' : project. projectVersion. family
176
+
177
+ dependsOn ' unpackTheme'
128
178
}
129
179
130
180
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments