Improved: Upgrade to gradle 7.6 - support jdk 8 -> 17
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
*/
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) {
@@ -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 ->
+ 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',
