diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml index 41bbce0e12..d0c808584a 100644 --- a/.github/workflows/cibuild.yml +++ b/.github/workflows/cibuild.yml @@ -42,6 +42,7 @@ jobs: java: - '8' - '11' + - '18' runner: - 'xvfb-run --auto-servernum {0}' include: diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index b1bb641b64..4dcdac2456 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -73,7 +73,7 @@ jobs: - 'ubuntu-latest' java: - '8' - - '17' + - '18' runner: - 'xvfb-run --auto-servernum {0}' name: Rebuild JDK${{ matrix.java }} ${{ matrix.os }} diff --git a/gradle-plugins/README.md b/gradle-plugins/README.md index a4f0427bf9..ee9dfb08b2 100644 --- a/gradle-plugins/README.md +++ b/gradle-plugins/README.md @@ -7,7 +7,8 @@ A Bnd Workspace build uses the information specified in the Bnd Workspace's `cnf The [`biz.aQute.bnd.gradle`][2] jar contains the Bnd Gradle Plugins. These plugins requires at least Gradle 6.7 for Java 8 to Java 15, at least Gradle 7.0 for Java 16, -and at least Gradle 7.3 for Java 17. +at least Gradle 7.3 for Java 17, +and at least Gradle 7.5 for Java 18. This README represents the capabilities and features of the Bnd Gradle Plugins in the branch containing this README. So for the `master` branch, this will be the [latest development SNAPSHOT build](#using-the-latest-development-snapshot-build-of-the-bnd-gradle-plugins). @@ -138,7 +139,7 @@ The FileCollection object to use as the classpath for the Bnd builder. The default value is _${project.sourceSets.main.compileClasspath}_. You will only need to specify this property if you want to specify additional classpath elements or replace the classpath. -### properties +### properties Properties that are available for evaluation of the Bnd instructions. The default is the properties of the Gradle task and project objects. @@ -382,7 +383,7 @@ This property must not be used for and is ignored in Bnd Workspace builds. If `true` failure reports will include optional requirements. The default is `true`. -### properties +### properties Properties that are available for evaluation of the Bnd instructions. The default is the properties of the Gradle task and project objects. @@ -436,7 +437,7 @@ The collection of files to use for locating bundles during the bndrun export. The default is _${project.sourceSets.main.runtimeClasspath}_ plus _${project.configurations.archives.artifacts.files}_. This property must not be used for and is ignored in Bnd Workspace builds. -### properties +### properties Properties that are available for evaluation of the Bnd instructions. The default is the properties of the Gradle task and project objects. @@ -496,9 +497,9 @@ The default is _${project.java.testResultsDir}/${task.name}_. ### javaLauncher Specify the default java executable to be used for execution. -This java launcher is used if the bndrun does not specify the `java` property or specifies it with the default value `java`. +This java launcher is used if the bndrun does not specify the `java` property or specifies it with the default value `java`. -### properties +### properties Properties that are available for evaluation of the Bnd instructions. The default is the properties of the Gradle task and project objects. @@ -609,9 +610,9 @@ This property must not be used for and is ignored in Bnd Workspace builds. ### javaLauncher Specify the default java executable to be used for execution. -This java launcher is used if the bndrun does not specify the `java` property or specifies it with the default value `java`. +This java launcher is used if the bndrun does not specify the `java` property or specifies it with the default value `java`. -### properties +### properties Properties that are available for evaluation of the Bnd instructions. The default is the properties of the Gradle task and project objects. diff --git a/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndBuilderPlugin.java b/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndBuilderPlugin.java index 2100abd2b3..5f33d02f80 100644 --- a/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndBuilderPlugin.java +++ b/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndBuilderPlugin.java @@ -46,6 +46,11 @@ public class BndBuilderPlugin implements Plugin { */ public static final String PLUGINID = "biz.aQute.bnd.builder"; + /** + * Default public constructor. + */ + public BndBuilderPlugin() {} + /** * Apply the {@code biz.aQute.bnd.builder} plugin to the specified project. */ diff --git a/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndPlugin.java b/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndPlugin.java index acdc1940cd..9e38f1ee7b 100644 --- a/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndPlugin.java +++ b/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndPlugin.java @@ -104,6 +104,11 @@ public class BndPlugin implements Plugin { private ObjectFactory objects; private aQute.bnd.build.Project bndProject; + /** + * Default public constructor. + */ + public BndPlugin() {} + /** * Apply the {@code biz.aQute.bnd} plugin to the specified project. */ diff --git a/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndWorkspacePlugin.java b/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndWorkspacePlugin.java index 97f6d451cf..ed7874aedb 100644 --- a/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndWorkspacePlugin.java +++ b/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndWorkspacePlugin.java @@ -50,6 +50,11 @@ public class BndWorkspacePlugin implements Plugin { private static final Pattern TASKNAME_SPLITTER = Pattern.compile(":"); private static final Set SPECIAL_FOLDERS = Sets.of("buildSrc", "gradle"); + /** + * Default public constructor. + */ + public BndWorkspacePlugin() {} + /** * Apply the {@code biz.aQute.bnd.workspace} plugin. */ diff --git a/gradle-plugins/biz.aQute.bnd.gradle/src/test/groovy/aQute/bnd/gradle/TestHelper.groovy b/gradle-plugins/biz.aQute.bnd.gradle/src/test/groovy/aQute/bnd/gradle/TestHelper.groovy index 7d5e0db30d..d894faa5db 100644 --- a/gradle-plugins/biz.aQute.bnd.gradle/src/test/groovy/aQute/bnd/gradle/TestHelper.groovy +++ b/gradle-plugins/biz.aQute.bnd.gradle/src/test/groovy/aQute/bnd/gradle/TestHelper.groovy @@ -39,6 +39,9 @@ class TestHelper { } private static String gradleVersion() { + if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_18)) { + return "7.5" + } if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) { return "7.3.2" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927a4d..249e5832f0 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fceae..8049c684f0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787337..a69d9cb6c2 100755 --- a/gradlew +++ b/gradlew @@ -205,6 +205,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index ac1b06f938..53a6b238d4 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal