Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gradle to the latest version 7.6 #1134

Merged
merged 2 commits into from
Dec 4, 2022
Merged
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
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')