Skip to content

Commit

Permalink
Update Gradle 7.5.1 (#1590)
Browse files Browse the repository at this point in the history
* Update Gradle 7.5.1

* Upload all test reports

* Add `--add-open` for tests on Java 16+

* Publish build scan
  • Loading branch information
Goooler committed Aug 18, 2022
1 parent 3c6eaca commit 2d32778
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gradle-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
- uses: gradle/gradle-build-action@v2
- name: Build with release Kotlin version
run: ./gradlew clean build ktlint --no-daemon
- name: Build with dev Kotlin version
run: ./gradlew -PkotlinDev clean build ktlint --no-daemon
- name: Upload test results
uses: actions/upload-artifact@v3
if: failure()
with:
name: Test artifacts
path: 'ktlint/build/reports/tests/**'
path: '**/build/reports/tests/**'
if-no-files-found: warn
- name: Build with dev Kotlin version
run: ./gradlew -PkotlinDev clean build ktlint --no-daemon
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ Several methods for which it is unlikely that they are used by API consumers hav
* Allow file and directory paths in CLI-parameter "--editorconfig" ([#1580](https://github.com/pinterest/ktlint/pull/1580))
* Update Kotlin development version to `1.7.20-beta` and Kotlin version to `1.7.10`.
* Update release scripting to set version number in mkdocs documentation ([#1575](https://github.com/pinterest/ktlint/issue/1575)).
* Update Gradle to `7.5.1` version

### Removed
* Remove support to generate IntelliJ IDEA configuration files as this no longer fits the scope of the ktlint project ([#701](https://github.com/pinterest/ktlint/issues/701))
Expand Down
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ tasks.register("publishNewRelease", DefaultTask.class) {
dependsOn(announceTask, homebrewTask, tasks.named("githubRelease"))
}

tasks.withType(Wrapper).configureEach {
gradleVersion = libs.versions.gradle
distributionSha256Sum = libs.versions.gradleSha256
distributionType = Wrapper.DistributionType.BIN
tasks.wrapper {
gradleVersion = libs.versions.gradle.get()
distributionSha256Sum = libs.versions.gradleSha256.get()
}
8 changes: 8 additions & 0 deletions buildSrc/src/main/kotlin/ToolchainForTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ private fun Project.addJdkVersionTests(jdkVersion: Int) {
languageVersion.set(JavaLanguageVersion.of(jdkVersion))
},
)
if (jdkVersion > 16) {
// https://docs.gradle.org/7.5/userguide/upgrading_version_7.html#removes_implicit_add_opens_for_test_workers
val jvmArgs = listOf(
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED",
)
setJvmArgs(jvmArgs)
}
}
tasks.named("check") {
dependsOn(jdkVersionTests)
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
gradle = "7.4"
gradleSha256 = "8cc27038d5dbd815759851ba53e70cf62e481b87494cc97cfd97982ada5ba634"
gradle = "7.5.1"
gradleSha256 = "f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4"
kotlin = "1.7.10" # Keep in sync with buildSrc/build.gradle.kts

[plugins]
Expand Down
31 changes: 31 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@
<sha256 value="956e45085e52ea5ef32d34671ebb84eb1c41a83c4549af26e68635f1061798d3" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="com.gradle" name="gradle-enterprise-gradle-plugin" version="3.10.2">
<artifact name="gradle-enterprise-gradle-plugin-3.10.2.jar">
<pgp value="314fe82e5a4c5377bca2edec5208812e1e4a6db0"/>
</artifact>
<artifact name="gradle-enterprise-gradle-plugin-3.10.2.pom">
<sha256 value="57603c9a75a9ef86ce30b1cb2db728d3cd9caf1be967343f1fc2316c85df5653" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="com.gradle" name="gradle-enterprise-gradle-plugin" version="3.8.1">
<artifact name="gradle-enterprise-gradle-plugin-3.8.1.jar">
<pgp value="314fe82e5a4c5377bca2edec5208812e1e4a6db0"/>
Expand All @@ -212,6 +220,11 @@
<sha256 value="e47a53196079934edf14b36b4b77e380d17327a3d8eeab05ba061ca3fc1334a5" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="com.gradle.enterprise" name="com.gradle.enterprise.gradle.plugin" version="3.10.2">
<artifact name="com.gradle.enterprise.gradle.plugin-3.10.2.pom">
<sha256 value="1ba8bac013e739c94e42ffe2c0fd4bf018a448013293b3062eacbe66f93ddfd8" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="com.gradle.enterprise" name="com.gradle.enterprise.gradle.plugin" version="3.8.1">
<artifact name="com.gradle.enterprise.gradle.plugin-3.8.1.pom">
<sha256 value="9fc8ccc9212ea0903c17dbea3c3dfb406d6db5490b6e65aa13a7af1fecda82b4" origin="Generated by Gradle because artifact wasn't signed"/>
Expand Down Expand Up @@ -291,6 +304,14 @@
<sha256 value="2bbed4a6eae63ce1998882009581eb7bfc3ed4e4e9e1ac52e9f3c309f672491e" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="org.gradle.kotlin" name="gradle-kotlin-dsl-plugins" version="2.3.3">
<artifact name="gradle-kotlin-dsl-plugins-2.3.3.jar">
<sha256 value="ba63ebb9e874a798510b5888a159622ef4e4d59f82e54d755ddcf5e60bf1257f" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
<artifact name="gradle-kotlin-dsl-plugins-2.3.3.module">
<sha256 value="7b6bac1405119485fc9d694771024be4a509e874efcf38b22f947b85f99c8a9c" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="org.gradle.kotlin.kotlin-dsl" name="org.gradle.kotlin.kotlin-dsl.gradle.plugin" version="2.1.6">
<artifact name="org.gradle.kotlin.kotlin-dsl.gradle.plugin-2.1.6.pom">
<sha256 value="572125e4c117e91c135ba6a60ba26124aabb67c62ea3a709045ad621d6ddf9c7" origin="Generated by Gradle"/>
Expand All @@ -301,11 +322,21 @@
<sha256 value="61eaad5e5449288e912bdb16fa7c83f6718565c034cb7bf0916641a14f627a06" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="org.gradle.kotlin.kotlin-dsl" name="org.gradle.kotlin.kotlin-dsl.gradle.plugin" version="2.3.3">
<artifact name="org.gradle.kotlin.kotlin-dsl.gradle.plugin-2.3.3.pom">
<sha256 value="5cd2b71ed043af0e1969d2292bfdaa251fb858dc78f7a32ef0249f246c53c905" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="org.jetbrains" name="markdown" version="0.2.4">
<artifact name="markdown-metadata-0.2.4.jar">
<sha256 value="23955bb4bbc929f7a98d79eb63ae91ae430abf80123315310f7eb433cf7b90d4" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-klib-commonizer-embeddable" version="1.6.21">
<artifact name="kotlin-klib-commonizer-embeddable-1.6.21.jar">
<sha256 value="d6381a7eaebb7e48fca76bf5bb9e5f43fa56dde6fd5105cae8de135e63280f70" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-gradle-plugin" version="1.7.20-Beta">
<artifact name="kotlin-gradle-plugin-1.7.20-Beta-gradle71.jar">
<sha256 value="d23bc1b37838ca9a1d444e1f65b5e1668c23449778c984498de2503f741eefba" origin="Generated by Gradle because artifact wasn't signed"/>
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions 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
distributionSha256Sum=8cc27038d5dbd815759851ba53e70cf62e481b87494cc97cfd97982ada5ba634
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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%

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
}
}

Expand Down

0 comments on commit 2d32778

Please sign in to comment.