Skip to content

Commit

Permalink
Merge pull request #1134 from robertpanzer/update-gradle
Browse files Browse the repository at this point in the history
Upgrade gradle to the latest version 7.6
  • Loading branch information
robertpanzer authored Dec 4, 2022
2 parents e8f11dc + e6545ff commit b425925
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ jobs:
- '8'
- '11'
- '17'
- '19'
os:
- ubuntu-latest
- macos-latest
exclude:
- os: macos-latest
java: '8'
- os: macos-latest
java: '19'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ Bug Fixes::

Build Improvement::

* Upgrade build to Gradle 7.5.1 (#1109)
* Upgrade build to Gradle 7.6 (#1563)
* Upgrade Spring Boot test to 3.0.0 (#1563)
* Run tests on Java 19 (#1563)
* Fix upstream tests forcing SNAPSHOT on Asciidoctor gem installation (#1123) (@abelsromero)
* Fix upstream build removing the explicit plugin repository (#1131)

Expand Down
5 changes: 5 additions & 0 deletions asciidoctorj-springboot-integration-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ dependencies {
}

test.dependsOn(':asciidoctorj-springboot-integration-test:springboot-app:assemble')

tasks.withType(JavaCompile).configureEach { task ->
task.options.release = 17
}

Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
plugins {
id 'org.springframework.boot' version '2.6.5'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '3.0.0'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}

group = 'org.asciidoctor.it'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

repositories {
mavenCentral()
Expand All @@ -20,6 +19,10 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.withType(JavaCompile).configureEach { task ->
task.options.release = 17
}

bootJar {
requiresUnpack '**/asciidoctorj-*.jar'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.asciidoctor.it.springboot;

import org.asciidoctor.Asciidoctor;
import org.asciidoctor.OptionsBuilder;
import org.asciidoctor.Options;
import org.asciidoctor.SafeMode;
import org.springframework.stereotype.Component;

Expand All @@ -15,11 +15,12 @@ public String convert(String source) {
return asciidoctor.convert(source, defaultOptions());
}

private OptionsBuilder defaultOptions() {
return OptionsBuilder.options()
private Options defaultOptions() {
return Options.builder()
.backend("html5")
.safe(SafeMode.SAFE)
.headerFooter(true)
.toFile(false);
.toFile(false)
.build();
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
8 changes: 6 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ include \
'asciidoctorj-distribution',
'asciidoctorj-documentation',
'asciidoctorj-wildfly-integration-test',
'asciidoctorj-springboot-integration-test',
'asciidoctorj-springboot-integration-test:springboot-app',
'asciidoctorj-test-support'

if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
include \
'asciidoctorj-springboot-integration-test',
'asciidoctorj-springboot-integration-test:springboot-app'
}

project(':asciidoctorj').projectDir = file('asciidoctorj-core')

0 comments on commit b425925

Please sign in to comment.