diff --git a/.github/policies/msgraph-sdk-java-core-branch-protection.yml b/.github/policies/msgraph-sdk-java-core-branch-protection.yml index 0ee8a9b2a..bd251f2ff 100644 --- a/.github/policies/msgraph-sdk-java-core-branch-protection.yml +++ b/.github/policies/msgraph-sdk-java-core-branch-protection.yml @@ -38,7 +38,7 @@ configuration: - license/cla - Build - lint-api-level - - Analyze + - Analyze (java) - build # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean requiresStrictStatusChecks: false @@ -76,7 +76,7 @@ configuration: - license/cla - Build - lint-api-level - - Analyze + - Analyze (java) - build # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean requiresStrictStatusChecks: false @@ -111,7 +111,7 @@ configuration: requiresLinearHistory: false # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status requiredStatusChecks: - - Analyze + - Analyze (java) - Build - build - license/cla diff --git a/.github/workflows/api-level-lint.yml b/.github/workflows/api-level-lint.yml index 902e7347e..29f94cf37 100644 --- a/.github/workflows/api-level-lint.yml +++ b/.github/workflows/api-level-lint.yml @@ -18,8 +18,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 18 + distribution: 'temurin' + java-version: 20 - name: Setup Android SDK uses: android-actions/setup-android@v2.0.10 - name: Add execution right to the script diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index bf6a09bcd..cf9e4b9a9 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -26,8 +26,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 18 - distribution: 'adopt' + java-version: 20 + distribution: 'temurin' cache: gradle - name: Download file run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH @@ -58,8 +58,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 18 - distribution: 'adopt' + java-version: 20 + distribution: 'temurin' cache: gradle - name: Download file run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d024376b5..4df5e327f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,51 +1,86 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# name: "CodeQL" on: - workflow_dispatch: push: - branches: [dev, master] + branches: [ "dev", "master" ] pull_request: # The branches below must be a subset of the branches above - branches: [dev] + branches: [ "dev" ] schedule: - cron: '0 1 * * 4' + workflow_dispatch: jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - name: Checkout repository uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - name: Set up JDK + uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 18 + java-version: 20 + distribution: 'temurin' + cache: gradle # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 - # Override language selection by uncommenting this and choosing your languages with: - languages: java + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # - name: Autobuild + # uses: github/codeql-action/autobuild@v2 # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - #- run: | - # make bootstrap - # make release + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index ea1f6ef13..425e1eb63 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -19,8 +19,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 18 - distribution: 'adopt' + java-version: 20 + distribution: 'temurin' cache: gradle - name: Easy detect-secrets uses: RobertFischer/detect-secrets-action@v2.0.0 diff --git a/.github/workflows/sample-build-check.yml b/.github/workflows/sample-build-check.yml index 6c2bfc43d..39a29e605 100644 --- a/.github/workflows/sample-build-check.yml +++ b/.github/workflows/sample-build-check.yml @@ -14,8 +14,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 18 + distribution: 'temurin' + java-version: 20 - name: Add execution right to the script run: chmod +x gradlew working-directory: ./samples/deviceCodeSample @@ -28,8 +28,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 18 + distribution: 'temurin' + java-version: 20 - name: Add execution right to the script run: chmod +x gradlew working-directory: ./samples/interactiveBrowserSample diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 12a91e118..47c67ebe0 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -19,8 +19,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 18 - distribution: 'adopt' + java-version: 20 + distribution: 'temurin' cache: gradle - name: Cache SonarCloud packages uses: actions/cache@v3 diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar index 41d9927a4..c1962a79e 100644 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 59bc51a20..37aef8d3f 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew index 1b6c78733..aeb74cbb4 100644 --- a/android/gradlew +++ b/android/gradlew @@ -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/. @@ -80,13 +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##*/} - -# 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"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,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 @@ -193,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 @@ -205,6 +210,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/android/gradlew.bat b/android/gradlew.bat index 107acd32c..93e3f59f1 100644 --- a/android/gradlew.bat +++ b/android/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,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,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 +76,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 diff --git a/build.gradle b/build.gradle index e37eca6ae..7fe1aa2b8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,3 @@ -/* - * This file was generated by the Gradle 'init' task. - * - * This generated file contains a sample Java Library project to get you started. - * For more details take a look at the Java Libraries chapter in the Gradle - * User Manual available at https://docs.gradle.org/6.6/userguide/java_library_plugin.html - */ - plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' @@ -20,18 +12,21 @@ plugins { java { modularity.inferModulePath = true + withSourcesJar() + withJavadocJar() } test { useJUnitPlatform() finalizedBy jacocoTestReport // report is always generated after tests run } + jacocoTestReport { dependsOn test // tests are required to run before generating the report } jacoco { - toolVersion = "0.8.7" + toolVersion = "0.8.10" } spotbugsMain { @@ -39,7 +34,7 @@ spotbugsMain { reports { html { required - destination = file("$buildDir/reports/spotbugs/main/spotbugs.html") + outputLocation = file("$buildDir/reports/spotbugs/main/spotbugs.html") stylesheet = 'fancy-hist.xsl' } } @@ -50,7 +45,7 @@ spotbugsTest { reports { html { required - destination = file("$buildDir/reports/spotbugs/test/spotbugs.html") + outputLocation = file("$buildDir/reports/spotbugs/test/spotbugs.html") stylesheet = 'fancy-hist.xsl' } } @@ -74,7 +69,6 @@ sourceSets { repositories { // You can declare any Maven/Ivy/file repository here. mavenCentral() - maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } // for jacoco, until 0.8.7 gets released } apply from: "gradle/dependencies.gradle" @@ -108,16 +102,6 @@ tasks.jar { } } -task sourceJar(type: Jar) { - from sourceSets.main.allJava - archiveClassifier = 'sources' -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - from javadoc.destinationDir - archiveClassifier = 'javadoc' -} - publishing { publications { @@ -127,8 +111,6 @@ publishing { artifactId project.property('mavenArtifactId') version "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}${mavenArtifactSuffix}" from components.java - artifact sourceJar - artifact javadocJar pom.withXml { def root = asNode() root.appendNode('name', 'Microsoft Graph Core SDK for Java') @@ -149,8 +131,6 @@ publishing { def pomFile = file("${project.buildDir}/generated-pom.xml") writeTo(pomFile) } - artifact sourceJar - artifact javadocJar } mavenCentralRelease(MavenPublication) { @@ -163,8 +143,6 @@ publishing { def pomFile = file("${project.buildDir}/generated-pom.xml") writeTo(pomFile) } - artifact sourceJar - artifact javadocJar } } repositories { @@ -212,8 +190,9 @@ def fixAscNames = { name -> } compileJava { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 + options.compilerArgs << "-parameters" + sourceCompatibility = '1.8' + targetCompatibility = '1.8' } def getVersionCode() { @@ -226,8 +205,6 @@ def getVersionName() { artifacts { archives jar - archives sourceJar - archives javadocJar } def customizePom(pom) { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927a4..c1962a79e 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 59bc51a20..37aef8d3f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c78733..aeb74cbb4 100755 --- a/gradlew +++ b/gradlew @@ -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/. @@ -80,13 +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##*/} - -# 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"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,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 @@ -193,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 @@ -205,6 +210,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 107acd32c..93e3f59f1 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,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,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 +76,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 diff --git a/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.jar b/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.jar index 249e5832f..c1962a79e 100644 Binary files a/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.jar and b/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.properties b/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.properties index ae04661ee..37aef8d3f 100644 --- a/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.properties +++ b/samples/deviceCodeSample/gradle/wrapper/gradle-wrapper.properties @@ -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-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/samples/deviceCodeSample/gradlew b/samples/deviceCodeSample/gradlew index a69d9cb6c..aeb74cbb4 100644 --- a/samples/deviceCodeSample/gradlew +++ b/samples/deviceCodeSample/gradlew @@ -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/. @@ -80,13 +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##*/} - -# 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"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,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 @@ -193,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 diff --git a/samples/deviceCodeSample/gradlew.bat b/samples/deviceCodeSample/gradlew.bat index f127cfd49..93e3f59f1 100644 --- a/samples/deviceCodeSample/gradlew.bat +++ b/samples/deviceCodeSample/gradlew.bat @@ -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% diff --git a/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.jar b/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.jar index 249e5832f..c1962a79e 100644 Binary files a/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.jar and b/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.properties b/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.properties index ae04661ee..37aef8d3f 100644 --- a/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.properties +++ b/samples/interactiveBrowserSample/gradle/wrapper/gradle-wrapper.properties @@ -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-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/samples/interactiveBrowserSample/gradlew b/samples/interactiveBrowserSample/gradlew index a69d9cb6c..aeb74cbb4 100644 --- a/samples/interactiveBrowserSample/gradlew +++ b/samples/interactiveBrowserSample/gradlew @@ -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/. @@ -80,13 +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##*/} - -# 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"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,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 @@ -193,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 diff --git a/samples/interactiveBrowserSample/gradlew.bat b/samples/interactiveBrowserSample/gradlew.bat index f127cfd49..93e3f59f1 100644 --- a/samples/interactiveBrowserSample/gradlew.bat +++ b/samples/interactiveBrowserSample/gradlew.bat @@ -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%