This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new e248654735 Improved: Upgrade to gradle 7.6 - support jdk 8 -> 17 (OFBIZ-12400) e248654735 is described below commit e2486547355a375a866f271ccead90f14c47b195 Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Wed Nov 30 13:40:37 2022 +0100 Improved: Upgrade to gradle 7.6 - support jdk 8 -> 17 (OFBIZ-12400) Only non functional AsciiDoc changes, unrelated to Gradle and JDK upgrades jleroux: I think we should also remove this block asciidoctorj { // jrubyVersion = '9.2.19.0' } Thanks: Ioan Eugen Stan --- build.gradle | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 612b1b3927..373a6fac09 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ */ import at.bxm.gradleplugins.svntools.tasks.SvnCheckout import org.apache.tools.ant.filters.ReplaceTokens -import org.asciidoctor.gradle.AsciidoctorTask +import org.asciidoctor.gradle.jvm.AsciidoctorTask /* ======================================================== * Project setup @@ -30,7 +30,8 @@ plugins { id 'checkstyle' id 'maven-publish' id 'at.bxm.svntools' version '3.1' - id 'org.asciidoctor.convert' version '2.4.0' // About org.asciidoctor.jvm.convert as it says itself: "If you need a production-ready version of the AsciidoctorJ plugin for Gradle use a 1.5.x release of 'org.asciidoctor.convert' instead" + id 'org.asciidoctor.jvm.convert' version '3.3.2' + id 'org.asciidoctor.jvm.pdf' version '3.3.2' id 'org.owasp.dependencycheck' version '7.3.0' apply false id 'se.patrikerdes.use-latest-versions' version '0.2.18' apply false id 'com.github.ben-manes.versions' version '0.42.0' apply false @@ -90,6 +91,10 @@ distributions.main.contents.from(rootDir) { include 'framework/**', 'applications/**', 'themes/**', 'plugins/**' } +asciidoctorj { +// jrubyVersion = '9.2.19.0' +} + javadoc { title='OFBiz trunk API' failOnError = true @@ -121,9 +126,10 @@ node { npmInstallCommand = System.getenv("CI") ? 'ci' : 'install' } - -sourceCompatibility = '11' -targetCompatibility = '11' +java { + sourceCompatibility(JavaVersion.VERSION_11) + targetCompatibility(JavaVersion.VERSION_11) +} // Java compile options, syntax gradlew -PXlint:none build tasks.withType(JavaCompile) { @@ -260,7 +266,7 @@ dependencies { implementation 'com.auth0:java-jwt:4.2.1' implementation 'org.jdom:jdom:1.1.3' // don't upgrade above 1.1.3, makes a lot of not obvious and useless complications, see last commits of OFBIZ-12092 for more implementation 'com.google.re2j:re2j:1.7' - implementation 'xerces:xercesImpl:2.12.2' + implementation 'xerces:xercesImpl:2.12.2' testImplementation 'org.hamcrest:hamcrest-library:2.2' // Enable junit4 to not depend on hamcrest-1.3 @@ -292,8 +298,6 @@ dependencies { junitReport 'junit:junit:4.13.2' junitReport 'org.apache.ant:ant-junit:1.10.12' - asciidoctor 'org.asciidoctor:asciidoctorj-pdf:1.5.3' // Tried to upgrade to 2.3.3, got "asciidoctor-1.5.8 conflicts with asciidoctor (~> 2.0" - asciidoctor 'org.jruby:jruby-complete:9.2.19.0' // bug workaround - see OFBIZ-9873, 9.3.9.0 does not work // Libraries downloaded manually implementation fileTree(dir: file("${rootDir}/lib"), include: '**/*.jar') @@ -581,7 +585,14 @@ task createTenant(group: ofbizServer, description: 'Create a new tenant in your // ========== Documentation tasks ========== tasks.withType(AsciidoctorTask) { task -> - backends 'html5', 'pdf' + outputOptions { + // I hate we have to do this - but jruby (asciidoctorj-pdf) and windows don't mix well + if (System.properties['os.name'].toLowerCase().contains('windows')) { + backends 'html5' + } else { + backends 'html5', 'pdf' + } + } attributes \ 'doctype': 'book', 'revnumber': 'Trunk',