Skip to content

Commit f54f193

Browse files
sebersolebeikov
authored andcommitted
HHH-16962 - General documentation improvements
https://hibernate.atlassian.net/browse/HHH-16962 (cherry picked from commit 32f635e)
1 parent 8b3c686 commit f54f193

File tree

5 files changed

+47
-26
lines changed

5 files changed

+47
-26
lines changed

documentation/documentation.gradle

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,23 @@ def renderTopicalGuidesTask = tasks.register( 'renderTopicalGuides', Asciidoctor
282282

283283
def gettingStartedGuideHtmlDir = layout.buildDirectory.dir( "asciidoc/quickstart/html_single" )
284284

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+
285297
def renderGettingStartedGuideHtmlTask = tasks.register( 'renderGettingStartedGuideHtmlTask', AsciidoctorTask ) { task ->
286298
group = "Documentation"
287299
description = 'Renders the Getting Started Guides (quickstarts) in HTML format using Asciidoctor.'
288300
inputs.property "hibernate-version", project.ormVersion
301+
finalizedBy buildTutorialZipTask
289302

290303
sourceDir = file( 'src/main/asciidoc/quickstart/guides' )
291304
sources 'index.adoc'
@@ -325,18 +338,6 @@ def renderGettingStartedGuidePdfTask = tasks.register( 'renderGettingStartedGuid
325338
attributes jpaJavadocUrlPrefix: "https://javaee.github.io/javaee-spec/javadocs/javax/persistence/"
326339
}
327340

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-
340341
def renderGettingStartedGuidesTask = tasks.register( 'renderGettingStartedGuides' ) { task ->
341342
task.group = "Documentation"
342343
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" ) {
658659
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
659660
// Migration Guide
660661

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+
661674
def renderMigrationGuideTask = tasks.register( "renderMigrationGuide", AsciidoctorTask ) { task ->
662675
group = "Documentation"
663-
description = 'Renders the Migration Guide in HTML format using Asciidoctor.'
676+
description = "Renders the Migration Guide in HTML format using Asciidoctor."
664677

678+
dependsOn copyMigrationGuideTask
665679
inputs.property "hibernate-version", project.ormVersion
666680

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' )
670684

671685
attributes linkcss: true,
672686
stylesheet: "css/hibernate.css"

local-build-plugins/src/main/java/org/hibernate/orm/docs/DocumentationPublishingPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void apply(Project project) {
6060
(task) -> {
6161
task.getCurrentlyBuildingFamily().convention( docPubDsl.getReleaseFamilyIdentifier() );
6262
task.getDocServerUrl().convention( docPubDsl.getDocServerUrl() );
63-
task.getMigrationGuideDirectory().convention( project.getLayout().getBuildDirectory().dir( "asciidoc/migration-guide" ) );
63+
task.getMigrationGuideDirectory().convention( project.getLayout().getBuildDirectory().dir( "documentation/migration-guide" ) );
6464
}
6565
);
6666

local-build-plugins/src/main/java/org/hibernate/orm/docs/PublishMigrationGuide.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public Property<String> getDocServerUrl() {
5454
return docServerUrl;
5555
}
5656

57+
58+
@Input
5759
public Property<ReleaseFamilyIdentifier> getCurrentlyBuildingFamily() {
5860
return currentlyBuildingFamily;
5961
}

local-build-plugins/src/main/java/org/hibernate/orm/post/DeprecationReportTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class DeprecationReportTask extends AbstractJandexAwareTask {
3232
public DeprecationReportTask() {
3333
setDescription( "Generates a report for things considered deprecated" );
3434
reportFile = getProject().getObjects().fileProperty();
35-
reportFile.convention( getProject().getLayout().getBuildDirectory().file( "orm/reports/deprecating.txt" ) );
35+
reportFile.convention( getProject().getLayout().getBuildDirectory().file( "orm/reports/deprecated.txt" ) );
3636
}
3737

3838
@Override
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
= Hibernate {{version-here}}
1+
:family: 6.3
2+
:version: 6.3.0.Final
3+
4+
= Hibernate {version}
25
Steve Ebersole
36
:awestruct-tags: ["Hibernate ORM", "Releases"]
47
:awestruct-layout: blog-post
5-
:version: {{version-here}}
6-
:docs-url: https://docs.jboss.org/hibernate/orm/{version}
8+
:docs-url: https://docs.jboss.org/hibernate/orm/{family}
79
:javadocs-url: {docs-url}/javadocs
810
:migration-guide-url: {docs-url}/migration-guide/migration-guide.html
11+
:intro-guide-url: {docs-url}/introduction/html_single/Hibernate_Introduction.html
912
:user-guide-url: {docs-url}/userguide/html_single/Hibernate_User_Guide.html
1013

1114
// Text ...
@@ -15,15 +18,17 @@ Steve Ebersole
1518

1619
For additional details, see:
1720

18-
- the link:{user-guide-url}[User Guide]
19-
- the link:{migration-guide-url}[Migration Guide]
2021
- the https://hibernate.org/orm/releases/6.0/[release page]
22+
- the link:{migration-guide-url}[Migration Guide]
23+
- the link:{intro-guide-url}[Hibernate 6 Introduction]
24+
- the link:{user-guide-url}[User Guide]
2125

2226
See also the following resources related to supported APIs:
2327

24-
- the link:{docs-url}/incubating/incubating.txt[incubating API report] - `@Incubating`
25-
- the link:{docs-url}/deprecated/deprecated.txt[deprecated API report] - `@Deprecated` + `@Remove`
26-
- the link:{docs-url}/internals/internal.txt[internal API report] - internal packages, `@Internal`
28+
- the https://hibernate.org/community/compatibility-policy/[compatibility policy]
29+
- the link:{docs-url}/incubating/incubating.txt[incubating API report] (`@Incubating`)
30+
- the link:{docs-url}/deprecated/deprecated.txt[deprecated API report] (`@Deprecated` + `@Remove`)
31+
- the link:{docs-url}/internals/internal.txt[internal API report] (internal packages, `@Internal`)
2732

2833
Visit the https://hibernate.org/community/[website] for details on getting in touch with us.
2934

0 commit comments

Comments
 (0)