Skip to content

Commit 5b16094

Browse files
committed
Upgrade Gradle wrapper to version 8.6. (#484)
Disable Editorconfig plugin due to incompatibility; compatible version would raise minimum required Java version to 16. See also metafacture/metafacture-fix#341.
1 parent 6375a07 commit 5b16094

File tree

7 files changed

+51
-38
lines changed

7 files changed

+51
-38
lines changed

build.gradle

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import java.util.regex.Matcher
1818

1919
plugins {
2020
id 'org.ajoberstar.grgit' version '2.3.0'
21-
id 'org.ec4j.editorconfig' version '0.0.3'
21+
//id 'org.ec4j.editorconfig' version '0.0.3'
2222
id 'org.sonarqube' version '2.6.2'
2323
id 'io.codearte.nexus-staging' version '0.30.0'
2424
}
@@ -54,19 +54,19 @@ project(':metafacture-runner') {
5454
apply plugin: 'java'
5555
}
5656

57-
editorconfig {
58-
excludes = [
59-
'**/*.beacon',
60-
'**/*.bgzf',
61-
'**/*.bz2',
62-
'**/*.bzip2',
63-
'**/*.gzip',
64-
'**/*.xz',
65-
'**/.*',
66-
'**/bin',
67-
'gradlew*'
68-
]
69-
}
57+
//editorconfig {
58+
// excludes = [
59+
// '**/*.beacon',
60+
// '**/*.bgzf',
61+
// '**/*.bz2',
62+
// '**/*.bzip2',
63+
// '**/*.gzip',
64+
// '**/*.xz',
65+
// '**/.*',
66+
// '**/bin',
67+
// 'gradlew*'
68+
// ]
69+
//}
7070

7171
task editorconfigChecker(type: Exec, group: 'Verification') {
7272
executable 'misc/bin/editorconfig-checker'
@@ -79,8 +79,7 @@ subprojects {
7979
apply plugin: 'checkstyle'
8080
apply plugin: 'maven-publish'
8181

82-
editorconfigCheck.dependsOn(editorconfigChecker)
83-
check.dependsOn(editorconfigCheck)
82+
check.dependsOn(editorconfigChecker)
8483
check.dependsOn(javadoc)
8584

8685
sourceCompatibility = 1.8
@@ -98,15 +97,15 @@ subprojects {
9897
task sourceJar(type: Jar) {
9998
dependsOn tasks.classes
10099
from sourceSets.main.allJava
101-
classifier 'sources'
100+
archiveClassifier = 'sources'
102101
description 'Creates a jar containing the source files of this project.'
103102
group 'build'
104103
}
105104

106105
task javadocJar(type: Jar) {
107106
dependsOn tasks.javadoc
108107
from tasks.javadoc
109-
classifier 'javadoc'
108+
archiveClassifier = 'javadoc'
110109
description 'Creates a jar containing the javadoc of this project.'
111110
group 'build'
112111
}

gradle/wrapper/gradle-wrapper.jar

2.36 KB
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=bed1da33cca0f557ab13691c77f38bb67388119e4794d113e051039b80af9bb1
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
3+
distributionSha256Sum=9631d53cf3e74bfa726893aee1f8994fee4e060c401335946dba2156f440f24c
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
5+
networkTimeout=10000
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
8080
esac
8181
done
8282

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

8888
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8989
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac
@@ -205,6 +209,12 @@ set -- \
205209
org.gradle.wrapper.GradleWrapperMain \
206210
"$@"
207211

212+
# Stop when "xargs" is not available.
213+
if ! command -v xargs >/dev/null 2>&1
214+
then
215+
die "xargs is not available"
216+
fi
217+
208218
# Use "xargs" to parse quoted args.
209219
#
210220
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4041

4142
set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44+
if %ERRORLEVEL% equ 0 goto execute
4445

4546
echo.
4647
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7576

7677
:end
7778
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
if %ERRORLEVEL% equ 0 goto mainEnd
7980

8081
:fail
8182
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8283
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
84+
set EXIT_CODE=%ERRORLEVEL%
85+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
86+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87+
exit /b %EXIT_CODE%
8588

8689
:mainEnd
8790
if "%OS%"=="Windows_NT" endlocal

metafacture-runner/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ configurations {
2727
provided {
2828
description = 'provided libraries'
2929
}
30+
31+
// The plugins configuration needs to be on the runtime classpath:
32+
runtimeClasspath.extendsFrom plugins
3033
}
3134

3235
dependencies {
@@ -58,9 +61,6 @@ dependencies {
5861
plugins project(':metafacture-yaml')
5962
plugins project(':metamorph')
6063

61-
// The plugins configuration needs to be on the runtime classpath:
62-
runtimeClasspath configurations.plugins
63-
6464
// In a perfect world the slf4j binding would be a provided dependency so that
6565
// the user can replace it easily with a different binding. However, slf4j
6666
// does not use the context class loader for loading its binding but the same
@@ -117,7 +117,7 @@ distributions {
117117
from configurations.provided
118118
}
119119
from('src/main/scripts') {
120-
filter(ReplaceTokens, tokens: [jarfile: 'lib/' + jar.archiveName ])
120+
filter(ReplaceTokens, tokens: [jarfile: 'lib/' + jar.archiveFileName.get() ])
121121
filteringCharset = 'UTF-8'
122122
fileMode = 0755
123123
}
@@ -140,15 +140,15 @@ def metamorph() {
140140

141141
distTar {
142142
compression = Compression.GZIP
143-
classifier = 'dist'
143+
archiveClassifier = 'dist'
144144
archiveExtension = 'tar.gz'
145145
}
146146

147147
distZip {
148-
classifier = 'dist'
148+
archiveClassifier = 'dist'
149149
}
150150

151151
task('fluxCommands', type: JavaExec, description: 'Print available Flux commands') {
152152
classpath = sourceSets.main.runtimeClasspath
153-
main = 'org.metafacture.flux.HelpPrinter'
153+
mainClass = 'org.metafacture.flux.HelpPrinter'
154154
}

metamorph/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ sourceSets {
3838
// for test TestMetamorphMacros#issue227_shouldSupportXincludeForMacros()
3939
// to work properly. A better solution would be to enable xinclude to load
4040
// resources from the classpath.
41-
output.resourcesDir = sourceSets.test.java.outputDir
41+
output.resourcesDir = sourceSets.test.java.classesDirectory
4242
}
4343
}

0 commit comments

Comments
 (0)