Skip to content

Commit

Permalink
GROOVY-11138: Bump gradle to 8.5
Browse files Browse the repository at this point in the history
Co-authored-by: Schalk W. Cronjé <[email protected]>
  • Loading branch information
daniellansun and ysb33r committed Jan 8, 2024
1 parent 5a3cf7c commit 6149d5a
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 30 deletions.
4 changes: 2 additions & 2 deletions build-logic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ repositories {
}

dependencies {
implementation 'org.asciidoctor:asciidoctor-gradle-jvm:3.3.2'
implementation 'org.asciidoctor:asciidoctor-gradle-jvm-pdf:3.3.2'
implementation 'org.asciidoctor:asciidoctor-gradle-jvm:4.0.0'
implementation 'org.asciidoctor:asciidoctor-gradle-jvm-pdf:4.0.0'
implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:5.1.13'
implementation 'org.nosphere.apache:creadur-rat-gradle:0.8.1'
implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.5'
Expand Down
40 changes: 19 additions & 21 deletions build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ configurations {
asciidocExtensions
}

dependencies {
// TODO: Remove it after AsciidoctorJ 4.0.0 new release, workaround to fix NoClassDefFoundError on Gradle 7.6+,
// see https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/655#issuecomment-1374479836
asciidocExtensions gradleApi()
}

tasks.withType(AbstractAsciidoctorTask).configureEach {
outputs.cacheIf { true }
usesService(ConcurrentExecutionControlBuildService.restrict(AbstractAsciidoctorTask, gradle))
Expand Down Expand Up @@ -99,22 +93,26 @@ asciidoctorj {
resolutionStrategy {
it.disableDependencyVerification()
}
docExtensions {
def baseUrls = [
jdk: 'https://docs.oracle.com/en/java/javase/11/docs/api/index.html',
gjdk: "https://docs.groovy-lang.org/${vers}/html/groovy-jdk/index.html",
gapi: "https://docs.groovy-lang.org/${vers}/html/gapi/index.html",
gapid: "https://docs.groovy-lang.org/${vers}/html/gapi/",
]
baseUrls.each { macroName, baseURL ->
inline_macro(name: macroName) {
parent, target, attributes ->
def (className, anchor) = target.split('#') as List
def base = className == 'index' ?
baseURL : baseURL + '?' + className.replace('.', '/') + '.html' + (anchor ? '#' + anchor : '')
createPhraseNode(parent, 'anchor', attributes.text ?: target, attributes, [type: ':link', target: base])
def baseUrls = [
jdk: 'https://docs.oracle.com/en/java/javase/11/docs/api/index.html',
gjdk: "https://docs.groovy-lang.org/${vers}/html/groovy-jdk/index.html",
gapi: "https://docs.groovy-lang.org/${vers}/html/gapi/index.html",
gapid: "https://docs.groovy-lang.org/${vers}/html/gapi/",
]
for (def entry : baseUrls.entrySet()) {
def macroName = entry.key
def baseUrl = entry.value
docExtensions """
inline_macro(name: '${macroName}') { parent, target, attributes ->
def classNameAndAnchor = target.split('#')
def className = classNameAndAnchor[0]
def anchor = classNameAndAnchor.length > 1 ? classNameAndAnchor[1] : null
def baseURL = '${baseUrl}'
def base = className == 'index' ?
baseURL : baseURL + '?' + className.replace('.', '/') + '.html' + (anchor ? '#' + anchor : '')
createPhraseNode(parent, 'anchor', attributes.text ?: target, attributes, [type: ':link', target: base])
}
}
"""

This comment has been minimized.

Copy link
@daniellansun

daniellansun Jan 8, 2024

Author Contributor

@ysb33r works well without toString

}
modules {
diagram.version(versions.asciidoctorDiagram)
Expand Down
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,10 @@ tasks.named("dependencyUpdates")?.configure {
!(it.currentVersion.toLowerCase() ==~ UNSTABLE) && it.candidate.version.toLowerCase() ==~ UNSTABLE
}
}

artifacts {
grapesRuntimeElements file: jar.archiveFile.get().asFile, type: 'jar'
xstreamAstRuntimeElements file: jar.archiveFile.get().asFile, type: 'jar'
gparsRuntimeElements file: jar.archiveFile.get().asFile, type: 'jar'
loggingRuntimeElements file: jar.archiveFile.get().asFile, type: 'jar'
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ groovyTargetBytecodeVersion=11
targetJavaVersion=11

binaryCompatibilityBaseline=4.0.11
gradle_version=8.1.1
gradle_version=8.5

groovyJUnit_ms=512m
groovyJUnit_mx=2g
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 6 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
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"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -144,15 +141,15 @@ 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
# 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
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# 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"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down

0 comments on commit 6149d5a

Please sign in to comment.