Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions documentation/documentation.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,13 @@ asciidoctorj {
'doc-main-dir': project(':documentation').layout.projectDirectory.dir('src').dir("main").asFile.absolutePath,
'doc-generated-content-dir': project(':documentation').layout.buildDirectory.dir('asciidoc').get()
.dir("fragments").asFile.absolutePath,
'theme-main-dir': rootProject.layout.buildDirectory.dir("unpacked-theme").get()
'theme-main-dir': project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc").asFile.absolutePath,
stylesdir: "css",
'iconfont-remote': false,
'iconfont-name': 'font-awesome/css/solid',
docinfo: 'shared,private',
docinfodir: rootProject.layout.buildDirectory.dir("unpacked-theme").get()
docinfodir: project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc").dir("docinfo").dir('hibernate').asFile.absolutePath,
'html.meta.project-key': 'orm',
'html-outdated-content-project-key': 'orm',
Expand All @@ -282,7 +282,7 @@ def renderTopicalLoggingGuideHtmlTask = tasks.register( 'renderTopicalLoggingGui
from( 'src/main/asciidoc/topical/' ) {
include '**/images/**'
}
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand All @@ -304,7 +304,7 @@ def renderTopicalRegistriesGuideHtmlTask = tasks.register( 'renderTopicalRegistr
from( 'src/main/asciidoc/topical/' ) {
include '**/images/**'
}
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand All @@ -327,7 +327,7 @@ def renderTopicalGuideHtmlTask = tasks.register( 'renderTopicalGuideHtml', Ascii
from( 'src/main/asciidoc/topical/' ) {
include '**/images/**'
}
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -376,7 +376,7 @@ def renderGettingStartedGuideHtmlTask = tasks.register( 'renderGettingStartedGui
attributes jpaJavadocUrlPrefix: "https://javaee.github.io/javaee-spec/javadocs/javax/persistence/"

resources {
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -425,7 +425,7 @@ def renderIntroductionHtmlTask = tasks.register( 'renderIntroductionHtml', Ascii
from( 'src/main/asciidoc/introduction/' ) {
include 'images/**'
}
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -484,7 +484,7 @@ def renderQueryLanguageGuideHtmlTask = tasks.register( 'renderQueryLanguageGuide
from( 'src/main/asciidoc/querylanguage/' ) {
include 'images/**'
}
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -531,7 +531,7 @@ def renderRepositoriesHtmlTask = tasks.register( 'renderRepositoriesHtml', Ascii
from( 'src/main/asciidoc/repositories/' ) {
include 'images/**'
}
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -747,7 +747,7 @@ def renderUserGuideHtmlTask = tasks.register( 'renderUserGuideHtml', Asciidoctor
from( 'src/main/asciidoc/userguide/' ) {
include 'images/**'
}
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -781,7 +781,7 @@ def renderIntegrationGuideHtmlTask = tasks.register( "renderIntegrationGuideHtml
from( 'src/main/asciidoc/integrationguide/' ) {
include 'images/**'
}
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -833,7 +833,7 @@ def renderWhatsNewTask = tasks.register( "renderWhatsNew", AsciidoctorTask ) {
outputDir = project.layout.buildDirectory.dir( 'asciidoc/whats-new' )

resources {
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -876,7 +876,7 @@ def renderMigrationGuideTask = tasks.register( "renderMigrationGuide", Asciidoct
outputDir = project.layout.buildDirectory.dir( 'asciidoc/migration-guide' )

resources {
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand All @@ -900,7 +900,7 @@ def renderDialectGuideTask = tasks.register( 'renderDialectGuide', AsciidoctorTa
attributes 'generated-report-dir': layout.buildDirectory.dir( 'orm/generated' ).get()

resources {
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand All @@ -925,7 +925,7 @@ def renderLoggingReportTask = tasks.register( 'renderLoggingReport', Asciidoctor
task.outputDir = project.layout.buildDirectory.dir( 'asciidoc/logging' )

task.resources {
from(rootProject.layout.buildDirectory.dir("unpacked-theme").get()
from(project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc")) {
include 'css/**'
include 'images/**'
Expand Down Expand Up @@ -986,7 +986,7 @@ tasks.withType(AsciidoctorPdfTask).configureEach {
executionMode = ExecutionMode.JAVA_EXEC

asciidoctorj {
requires rootProject.layout.buildDirectory.dir("unpacked-theme").get()
requires project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("asciidoc").dir("theme").file("hibernate.rb").asFile.absolutePath
}

Expand Down
13 changes: 5 additions & 8 deletions local-build-plugins/src/main/groovy/local.javadoc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ configurations {
}

dependencies {
themezip 'org.hibernate.infra:hibernate-asciidoctor-theme:6.0.2.Final@zip'
themezip 'org.hibernate.infra:hibernate-asciidoctor-theme:6.0.4.Final@zip'
}

tasks.register('unpackTheme', Copy) {
def unpackDir = rootProject.layout.buildDirectory.dir("unpacked-theme")

onlyIf {
!unpackDir.get().asFile.exists()
}
def unpackThemeTask = tasks.register('unpackTheme', Copy) {
def unpackDir = project.layout.buildDirectory.dir("unpacked-theme")
destinationDir = unpackDir.get().asFile

def zipFile = configurations.themezip.singleFile
Expand All @@ -33,6 +29,7 @@ tasks.withType(Javadoc).configureEach {

inputs.property "ormVersion", project.extensions.ormBuildDetails.hibernateVersion
inputs.property "currentYear", currentYear
inputs.property "theme-location", unpackThemeTask.get().destinationDir

// exclude any generated sources and internal packages
exclude 'org/hibernate/grammars'
Expand All @@ -44,7 +41,7 @@ tasks.withType(Javadoc).configureEach {
windowTitle = "Hibernate Javadocs ($project.name)"
docTitle = "Hibernate Javadocs ($project.name : $project.version)"
// Pick the styles for the JDK that is used to "build" the Javadocs:
stylesheetFile = rootProject.layout.buildDirectory.dir("unpacked-theme").get()
stylesheetFile = project.layout.buildDirectory.dir("unpacked-theme").get()
.dir("hibernate-asciidoctor-theme").dir("javadoc").dir("jdk21").file("stylesheet.css").asFile
bottom = "Copyright &copy; 2001-$currentYear <a href=\"https://redhat.com\">Red Hat, Inc.</a> All Rights Reserved."

Expand Down