@@ -282,10 +282,23 @@ def renderTopicalGuidesTask = tasks.register( 'renderTopicalGuides', Asciidoctor
282
282
283
283
def gettingStartedGuideHtmlDir = layout. buildDirectory. dir( " asciidoc/quickstart/html_single" )
284
284
285
+ def buildTutorialZipTask = tasks. register( ' buildTutorialZip' , Zip ) { task ->
286
+ from ' src/main/asciidoc/quickstart/tutorials'
287
+ destinationDirectory. set( gettingStartedGuideHtmlDir )
288
+ archiveFileName = ' hibernate-tutorials.zip'
289
+ expand(
290
+ version : project. version,
291
+ slf4j : " 2.0.7" ,
292
+ junit : testLibs. versions. junit4. get(),
293
+ h2 : dbLibs. versions. h2. get()
294
+ )
295
+ }
296
+
285
297
def renderGettingStartedGuideHtmlTask = tasks. register( ' renderGettingStartedGuideHtmlTask' , AsciidoctorTask ) { task ->
286
298
group = " Documentation"
287
299
description = ' Renders the Getting Started Guides (quickstarts) in HTML format using Asciidoctor.'
288
300
inputs. property " hibernate-version" , project. ormVersion
301
+ finalizedBy buildTutorialZipTask
289
302
290
303
sourceDir = file( ' src/main/asciidoc/quickstart/guides' )
291
304
sources ' index.adoc'
@@ -325,18 +338,6 @@ def renderGettingStartedGuidePdfTask = tasks.register( 'renderGettingStartedGuid
325
338
attributes jpaJavadocUrlPrefix : " https://javaee.github.io/javaee-spec/javadocs/javax/persistence/"
326
339
}
327
340
328
- def buildTutorialZipTask = tasks. register( ' buildTutorialZip' , Zip ) { task ->
329
- from ' src/main/asciidoc/quickstart/tutorials'
330
- destinationDirectory. set( gettingStartedGuideHtmlDir )
331
- archiveFileName = ' hibernate-tutorials.zip'
332
- expand(
333
- version : project. version,
334
- slf4j : " 2.0.7" ,
335
- junit : testLibs. versions. junit4. get(),
336
- h2 : dbLibs. versions. h2. get()
337
- )
338
- }
339
-
340
341
def renderGettingStartedGuidesTask = tasks. register( ' renderGettingStartedGuides' ) { task ->
341
342
task. group = " Documentation"
342
343
task. description = ' Renders the Getting Started Guide in all formats, as well as the acccompanying tutorial zip.'
@@ -658,15 +659,28 @@ def renderIntegrationGuidesTask = tasks.register( "renderIntegrationGuides" ) {
658
659
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
659
660
// Migration Guide
660
661
662
+ def migrationGuideSourceStagingDir = layout. buildDirectory. dir( " tmp/asciidoc/migration-guide" )
663
+
664
+ def copyMigrationGuideTask = tasks. register( " copyMigrationGuide" , Copy ) {task ->
665
+ group = " Documentation"
666
+ description = " Copies migration-guide.adoc in preparation for rendering."
667
+
668
+ inputs. property " hibernate-version" , project. ormVersion
669
+
670
+ from rootProject. layout. projectDirectory. file( " migration-guide.adoc" )
671
+ into migrationGuideSourceStagingDir
672
+ }
673
+
661
674
def renderMigrationGuideTask = tasks. register( " renderMigrationGuide" , AsciidoctorTask ) { task ->
662
675
group = " Documentation"
663
- description = ' Renders the Migration Guide in HTML format using Asciidoctor.'
676
+ description = " Renders the Migration Guide in HTML format using Asciidoctor."
664
677
678
+ dependsOn copyMigrationGuideTask
665
679
inputs. property " hibernate-version" , project. ormVersion
666
680
667
- sources {
668
- include rootProject . layout . projectDirectory . file( ' migration-guide.adoc ' ) . asFile . canonicalPath
669
- }
681
+ sourceDir = migrationGuideSourceStagingDir
682
+
683
+ outputDir = project . layout . buildDirectory . dir( ' asciidoc/migration-guide ' )
670
684
671
685
attributes linkcss : true ,
672
686
stylesheet : " css/hibernate.css"
0 commit comments