@@ -7,6 +7,14 @@ plugins {
77 id " hr-java-library"
88}
99
10+ configurations {
11+ themezip
12+ }
13+
14+ dependencies {
15+ themezip ' org.hibernate.infra:hibernate-asciidoctor-theme:6.0.0.Final@zip'
16+ }
17+
1018ext {
1119 projectsToSkipWhenAggregatingJavadocs = [
1220 ' example' ,
@@ -21,6 +29,23 @@ rootProject.subprojects { subproject ->
2129 }
2230}
2331
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+
2449// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2550// Aggregated JavaDoc
2651// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -50,6 +75,9 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) {
5075 windowTitle = ' Hibernate Reactive API documentation'
5176 docTitle = " Hibernate Reactive API documentation ($project . version )"
5277 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
5381 use = true
5482 options. encoding = ' UTF-8'
5583
@@ -90,6 +118,8 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) {
90118 classpath + = subProject. sourceSets. main. output + subProject. sourceSets. main. compileClasspath
91119 }
92120 }
121+
122+ dependsOn ' unpackTheme'
93123}
94124
95125// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -104,27 +134,47 @@ asciidoctor {
104134def renderReferenceDocumentationTask = tasks. register( ' renderReferenceDocumentation' , AsciidoctorTask ) {
105135 description = ' Renders the Reference Documentation in HTML format using Asciidoctor.'
106136 sourceDir = file( ' src/main/asciidoc/reference' )
137+ asciidoctorj {
138+ version ' 3.0.0'
139+ docExtensions(project(' :local-build-asciidoctor-extensions' ))
140+ }
141+
107142 sources {
108143 include ' index.adoc'
109144 }
110145
111146 resources {
112147 from( sourceDir ) {
113148 include ' images/**'
149+ }
150+ from(rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
151+ .dir(" hibernate-asciidoctor-theme" ). dir(" asciidoc" )) {
114152 include ' css/**'
153+ include ' images/**'
154+ include ' script/**'
115155 }
116156 }
117157
118158 outputDir = project. layout. buildDirectory. dir( " asciidoc/reference/html_single" ). get(). asFile
119159 options logDocuments : true
120160
121161 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'
128178}
129179
130180// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments