@@ -6,6 +6,14 @@ plugins {
66 id " org.asciidoctor.jvm.convert"
77}
88
9+ configurations {
10+ themezip
11+ }
12+
13+ dependencies {
14+ themezip ' org.hibernate.infra:hibernate-asciidoctor-theme:6.0.0.Final@zip'
15+ }
16+
917ext {
1018 projectsToSkipWhenAggregatingJavadocs = [
1119 ' example' ,
@@ -20,6 +28,23 @@ rootProject.subprojects { subproject ->
2028 }
2129}
2230
31+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+ // Prepare the theme for Javadocs/Asciidoc
33+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34+ tasks. register(' unpackTheme' , Copy ) {
35+ def unpackDir = rootProject. layout. buildDirectory. dir(" unpacked-theme" )
36+
37+ onlyIf {
38+ ! unpackDir. get(). asFile. exists()
39+ }
40+ destinationDir = unpackDir. get(). asFile
41+
42+ def zipFile = configurations. themezip. singleFile
43+ from zipTree(zipFile)
44+
45+ dependsOn configurations. themezip
46+ }
47+
2348// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2449// Aggregated JavaDoc
2550// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -49,6 +74,9 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) {
4974 windowTitle = ' Hibernate Reactive API documentation'
5075 docTitle = " Hibernate Reactive API documentation ($project . version )"
5176 bottom = " Copyright © $inceptionYear -$currentYear <a href=\" http://redhat.com\" >Red Hat, Inc</a>. All Rights Reserved."
77+ // Pick the styles for the JDK that is used to "build" the Javadocs:
78+ stylesheetFile = rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
79+ .dir(" hibernate-asciidoctor-theme" ). dir(" javadoc" ). dir(" jdk21" ). file(" stylesheet.css" ). asFile
5280 use = true
5381 options. encoding = ' UTF-8'
5482
@@ -89,6 +117,8 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) {
89117 classpath + = subProject. sourceSets. main. output + subProject. sourceSets. main. compileClasspath
90118 }
91119 }
120+
121+ dependsOn ' unpackTheme'
92122}
93123
94124// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -103,27 +133,47 @@ asciidoctor {
103133def renderReferenceDocumentationTask = tasks. register( ' renderReferenceDocumentation' , AsciidoctorTask ) {
104134 description = ' Renders the Reference Documentation in HTML format using Asciidoctor.'
105135 sourceDir = file( ' src/main/asciidoc/reference' )
136+ asciidoctorj {
137+ version ' 3.0.0'
138+ docExtensions(project(' :local-build-asciidoctor-extensions' ))
139+ }
140+
106141 sources {
107142 include ' index.adoc'
108143 }
109144
110145 resources {
111146 from( sourceDir ) {
112147 include ' images/**'
148+ }
149+ from(rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
150+ .dir(" hibernate-asciidoctor-theme" ). dir(" asciidoc" )) {
113151 include ' css/**'
152+ include ' images/**'
153+ include ' script/**'
114154 }
115155 }
116156
117157 outputDir = project. layout. buildDirectory. dir( " asciidoc/reference/html_single" ). get(). asFile
118158 options logDocuments : true
119159
120160 attributes icons : ' font' ,
121- ' source-highlighter' : ' rouge' ,
122- experimental : true ,
123- linkcss : true ,
124- majorMinorVersion : project. projectVersion. family,
125- fullVersion : project. version. toString(),
126- docinfo : ' private'
161+ ' source-highlighter' : ' rouge' ,
162+ majorMinorVersion : project. projectVersion. family,
163+ fullVersion : project. version. toString(),
164+ stylesdir : " css" ,
165+ ' iconfont-remote' : false ,
166+ ' iconfont-name' : ' font-awesome/css/solid' ,
167+ docinfo : ' shared,private' ,
168+ docinfodir : rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
169+ .dir(" hibernate-asciidoctor-theme" ). dir(" asciidoc" ). dir(" docinfo" ). dir(' hibernate' ). asFile. absolutePath,
170+ ' html.meta.project-key' : ' orm' ,
171+ ' html.outdated-content.project-key' : ' orm' ,
172+ ' html-meta-description' : ' Hibernate Reactive, reactive API for Hibernate ORM - Reference Documentation' ,
173+ ' html-meta-keywords' : ' hibernate, reactive, hibernate reactive, database, db, vert.x' ,
174+ ' html-meta-version-family' : project. projectVersion. family
175+
176+ dependsOn ' unpackTheme'
127177}
128178
129179// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments