diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts index f5b86337c..c0367d693 100644 --- a/bom/build.gradle.kts +++ b/bom/build.gradle.kts @@ -48,7 +48,8 @@ publishing { } fun DefaultMavenPublication.unsetModuleDescriptorGenerator() { - @Suppress("NULL_FOR_NONNULL_TYPE") - val generator: TaskProvider = null - setModuleDescriptorGenerator(generator) +// TODO fix the migration issue +// @Suppress("NULL_FOR_NONNULL_TYPE") +// val generator: TaskProvider = null +// setModuleDescriptorGenerator(generator) } diff --git a/buildSrc/src/main/kotlin/Java9Modularity.kt b/buildSrc/src/main/kotlin/Java9Modularity.kt index abe933bb3..0c248108f 100644 --- a/buildSrc/src/main/kotlin/Java9Modularity.kt +++ b/buildSrc/src/main/kotlin/Java9Modularity.kt @@ -138,10 +138,11 @@ object Java9Modularity { source(compileTask.map { it.sources }) source(compileTask.map { it.javaSources }) // part of work-around for https://youtrack.jetbrains.com/issue/KT-60541 - source(compileTask.map { - @Suppress("INVISIBLE_MEMBER") - it.scriptSources - }) +// TODO fix the migration issue +// source(compileTask.map { +// @Suppress("INVISIBLE_MEMBER") +// it.scriptSources +// }) source(sourceFile) destinationDirectory.set(temporaryDir) multiPlatformEnabled.set(compileTask.get().multiPlatformEnabled) @@ -178,11 +179,12 @@ object Java9Modularity { @Suppress("DEPRECATION") if (taskKotlinLanguageVersion.get() < KotlinVersion.KOTLIN_2_0) { // part of work-around for https://youtrack.jetbrains.com/issue/KT-60541 - @Suppress("INVISIBLE_MEMBER") - commonSourceSet.from(compileTask.map { - @Suppress("INVISIBLE_MEMBER") - it.commonSourceSet - }) +// TODO fix the migration issue +// @Suppress("INVISIBLE_MEMBER") +// commonSourceSet.from(compileTask.map { +// @Suppress("INVISIBLE_MEMBER") +// it.commonSourceSet +// }) } else { multiplatformStructure.refinesEdges.set(compileTask.flatMap { it.multiplatformStructure.refinesEdges }) multiplatformStructure.fragments.set(compileTask.flatMap { it.multiplatformStructure.fragments }) diff --git a/formats/protobuf/proto-test-model/build.gradle.kts b/formats/protobuf/proto-test-model/build.gradle.kts index 99e2f8238..e546e035f 100644 --- a/formats/protobuf/proto-test-model/build.gradle.kts +++ b/formats/protobuf/proto-test-model/build.gradle.kts @@ -21,7 +21,7 @@ protobuf { java.toolchain.languageVersion.set(JavaLanguageVersion.of(8)) tasks.clean { - delete(protobuf.protobuf.generatedFilesBaseDir) + delete(protobuf.generatedFilesBaseDir) } sourceSets.main { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c9d8fd26a..b4dd92d1b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,11 @@ [versions] kotlin = "2.2.0" -kover = "0.8.2" +kover = "0.9.2" dokka = "2.0.0" knit = "0.5.0" bcv = "0.16.2" -animalsniffer = "1.7.1" -protobuf = "0.8.19" +animalsniffer = "2.0.1" +protobuf = "0.9.5" shadow = "8.1.1" jmh = "0.7.2" jmh-core = "1.37" diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e6441136f..8bdaf60c7 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 d7c3e6375..dc1fbfce0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d -distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-8.7-bin.zip +distributionSha256Sum=8fad3d78296ca518113f3d29016617c7f9367dc005f932bd9d93bf45ba46072b +distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-9.0.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a426..ef07e0162 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -112,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -203,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -211,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 7101f8e46..5eed7ee84 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -68,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/rules/rules-integration-tests/build.gradle.kts b/rules/rules-integration-tests/build.gradle.kts index 44edcf4d3..3a38e8588 100644 --- a/rules/rules-integration-tests/build.gradle.kts +++ b/rules/rules-integration-tests/build.gradle.kts @@ -1,5 +1,6 @@ import com.android.tools.r8.* import com.android.tools.r8.origin.* +import org.gradle.kotlin.dsl.support.serviceOf import org.jetbrains.kotlin.gradle.tasks.KotlinCompile /* @@ -124,11 +125,13 @@ val extractBaseJarTask = tasks.register("extractBaseJar") { jdkBinDir.resolve("jmod") } - exec { + // using internal `serviceOf` https://github.com/gradle/gradle/issues/34483 + serviceOf().exec { commandLine(jmodFile.absolutePath, "extract", baseJmod.absolutePath, "--dir", extractDir.absolutePath) } // pack class-files into jar - exec { + // using internal `serviceOf` https://github.com/gradle/gradle/issues/34483 + serviceOf().exec { commandLine( "jar", "--create",