@@ -131,50 +131,57 @@ asciidoctor {
131131 enabled = false
132132}
133133
134- def renderReferenceDocumentationTask = tasks. register( ' renderReferenceDocumentation' , AsciidoctorTask ) {
135- description = ' Renders the Reference Documentation in HTML format using Asciidoctor.'
136- sourceDir = file( ' src/main/asciidoc/reference' )
134+ def renderReferenceDocumentationTask = tasks. register( " renderReferenceDocumentation" , AsciidoctorTask ) {
135+ description = " Renders the Reference Documentation in HTML format using Asciidoctor."
136+ notCompatibleWithConfigurationCache( " AsciidoctorGradlePlugin does not support configuration cache yet" )
137+
138+ // use of provider to obtain info and cache the value
139+ def versionFamily = providers. provider { project. projectVersion. family }
140+ def fullVersion = providers. provider { project. version. toString() }
141+ def asciidocReference = layout. projectDirectory. dir(" src/main/asciidoc/reference" )
142+ def unpackedThemeAsciidoc = rootProject. layout. buildDirectory. dir(" unpacked-theme/hibernate-asciidoctor-theme/asciidoc" )
143+ def docInfoHibernate = rootProject. layout. buildDirectory. dir(" unpacked-theme/hibernate-asciidoctor-theme/asciidoc/docinfo/hibernate" )
144+
137145 asciidoctorj {
138- version ' 3.0.0'
139- docExtensions(project(' :local-build-asciidoctor-extensions' ) )
146+ version = " 3.0.0"
147+ docExtensions( project( " :local-build-asciidoctor-extensions" ) )
140148 }
141149
142150 sources {
143- include ' index.adoc'
151+ include( " index.adoc" )
144152 }
145153
146154 resources {
147- from( sourceDir ) {
148- include ' images/**'
155+ from( asciidocReference ) {
156+ include( " images/**" )
149157 }
150- from(rootProject. layout. buildDirectory. dir(" unpacked-theme" ). get()
151- .dir(" hibernate-asciidoctor-theme" ). dir(" asciidoc" )) {
152- include ' css/**'
153- include ' images/**'
154- include ' script/**'
158+ from( unpackedThemeAsciidoc ) {
159+ include( " css/**" , " images/**" , " script/**" )
155160 }
156161 }
157162
158- outputDir = project. layout. buildDirectory. dir( " asciidoc/reference/html_single" ). get(). asFile
159- options logDocuments : true
163+ outputDir = layout. buildDirectory. dir( " asciidoc/reference/html_single" )
160164
161- attributes icons : ' font' ,
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' : ' reactive' ,
172- ' html-outdated-content-project-key' : ' reactive' ,
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
165+ options( logDocuments : true )
176166
177- dependsOn ' unpackTheme'
167+ attributes(
168+ icons : " font" ,
169+ " source-highlighter" : " rouge" ,
170+ majorMinorVersion : versionFamily,
171+ fullVersion : fullVersion,
172+ stylesdir : " css" ,
173+ " iconfont-remote" : false ,
174+ " iconfont-name" : " font-awesome/css/solid" ,
175+ docinfo : " shared,private" ,
176+ docinfodir : docInfoHibernate,
177+ " html.meta.project-key" : " reactive" ,
178+ " html.outdated-content.project-key" : " reactive" ,
179+ " html-meta-description" : " Hibernate Reactive, reactive API for Hibernate ORM - Reference Documentation" ,
180+ " html-meta-keywords" : " hibernate, reactive, hibernate reactive, database, db, vert.x" ,
181+ " html-meta-version-family" : versionFamily,
182+ )
183+
184+ dependsOn( tasks. named( " unpackTheme" ) )
178185}
179186
180187// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments