diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index d2bd5c334a..d44a0a4301 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -4,6 +4,12 @@ import org.asciidoctor.gradle.jvm.pdf.AsciidoctorPdfTask plugins { id 'org.asciidoctor.jvm.convert' version '3.3.2' id 'org.asciidoctor.jvm.pdf' version '3.3.2' + id "org.asciidoctor.jvm.gems" version "3.3.2" +} + +repositories { + mavenCentral() + ruby.gems() } /* @@ -39,6 +45,8 @@ dependencies { reportAggregation project(':hibernate-ant') reportAggregation project(':hibernate-enhance-maven-plugin') reportAggregation project(':hibernate-jpamodelgen') + + asciidoctorGems 'rubygems:rouge:4.1.1' } @@ -67,6 +75,7 @@ tasks.register('buildDocsForPublishing') { asciidoctorj { + requires 'rouge' modules { pdf { version '2.3.7' @@ -74,7 +83,7 @@ asciidoctorj { } attributes icons: 'font', experimental: true, - 'source-highlighter': 'prettify', + 'source-highlighter': 'rouge', majorMinorVersion: rootProject.ormVersion.family, fullVersion: rootProject.ormVersion.fullName diff --git a/documentation/src/main/asciidoc/introduction/Hibernate_Introduction.adoc b/documentation/src/main/asciidoc/introduction/Hibernate_Introduction.adoc index 65bbc49018..924d7df33b 100644 --- a/documentation/src/main/asciidoc/introduction/Hibernate_Introduction.adoc +++ b/documentation/src/main/asciidoc/introduction/Hibernate_Introduction.adoc @@ -339,7 +339,6 @@ public class Main { // export the inferred database schema sessionFactory.getSchemaManager().exportMappedObjects(true); - // persist an entity sessionFactory.inTransaction(session -> { session.persist(new Book("9781932394153", "Hibernate in Action"));