diff --git a/pbj-core/gradle/wrapper/gradle-wrapper.jar b/pbj-core/gradle/wrapper/gradle-wrapper.jar index 8bdaf60c7..b1b8ef56b 100644 Binary files a/pbj-core/gradle/wrapper/gradle-wrapper.jar and b/pbj-core/gradle/wrapper/gradle-wrapper.jar differ diff --git a/pbj-core/gradle/wrapper/gradle-wrapper.properties b/pbj-core/gradle/wrapper/gradle-wrapper.properties index fbe9ce9f8..b52fb7e71 100644 --- a/pbj-core/gradle/wrapper/gradle-wrapper.properties +++ b/pbj-core/gradle/wrapper/gradle-wrapper.properties @@ -1,8 +1,9 @@ -# SPDX-License-Identifier: Apache-2.0 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/pbj-core/gradlew b/pbj-core/gradlew index adff685a0..b9bb139f7 100755 --- a/pbj-core/gradlew +++ b/pbj-core/gradlew @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/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/. diff --git a/pbj-core/gradlew.bat b/pbj-core/gradlew.bat index e509b2dd8..aa5f10b06 100644 --- a/pbj-core/gradlew.bat +++ b/pbj-core/gradlew.bat @@ -23,8 +23,8 @@ @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @@ -51,7 +51,7 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -65,7 +65,7 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line @@ -73,21 +73,10 @@ goto fail @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:end -@rem End local scope for the variables with windows NT shell -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! -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 - -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/PbjCompilerTask.java b/pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/PbjCompilerTask.java index b00f78ec0..db9c8f90d 100644 --- a/pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/PbjCompilerTask.java +++ b/pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/PbjCompilerTask.java @@ -9,6 +9,7 @@ import org.gradle.api.internal.file.FileOperations; import org.gradle.api.provider.Property; import org.gradle.api.provider.SetProperty; +import org.gradle.api.tasks.CacheableTask; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.InputFiles; import org.gradle.api.tasks.Internal; @@ -20,6 +21,7 @@ import org.gradle.api.tasks.TaskAction; /** Gradle Task that generates java src code from protobuf proto schema files. */ +@CacheableTask public abstract class PbjCompilerTask extends SourceTask { /** diff --git a/pbj-core/pbj-grpc-helidon/src/main/resources/META-INF/services/io.helidon.webserver.http2.spi.Http2SubProtocolProvider b/pbj-core/pbj-grpc-helidon/src/main/resources/META-INF/services/io.helidon.webserver.http2.spi.Http2SubProtocolProvider deleted file mode 100644 index c0a553e36..000000000 --- a/pbj-core/pbj-grpc-helidon/src/main/resources/META-INF/services/io.helidon.webserver.http2.spi.Http2SubProtocolProvider +++ /dev/null @@ -1,2 +0,0 @@ -# This file shouldn't be needed, because the module declaration? -com.hedera.pbj.grpc.helidon.PbjProtocolProvider diff --git a/pbj-core/pbj-grpc-helidon/src/main/resources/META-INF/services/io.helidon.webserver.spi.ProtocolConfigProvider b/pbj-core/pbj-grpc-helidon/src/main/resources/META-INF/services/io.helidon.webserver.spi.ProtocolConfigProvider deleted file mode 100644 index 018e2071a..000000000 --- a/pbj-core/pbj-grpc-helidon/src/main/resources/META-INF/services/io.helidon.webserver.spi.ProtocolConfigProvider +++ /dev/null @@ -1,2 +0,0 @@ -# This file shouldn't be needed, because the module declaration? -com.hedera.pbj.grpc.helidon.PbjProtocolConfigProvider diff --git a/pbj-core/settings.gradle.kts b/pbj-core/settings.gradle.kts index 3f25de492..5746b306b 100644 --- a/pbj-core/settings.gradle.kts +++ b/pbj-core/settings.gradle.kts @@ -1,8 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -import org.gradlex.javamodule.moduleinfo.ExtraJavaModuleInfoPluginExtension -import org.gradlex.jvm.dependency.conflict.resolution.JvmDependencyConflictsExtension - -plugins { id("org.hiero.gradle.build") version "0.6.3" } +plugins { id("org.hiero.gradle.build") version "0.7.7" } javaModules { directory(".") { @@ -10,20 +7,3 @@ javaModules { module("pbj-compiler") // no 'module-info.java' } } - -// The patch rules below can be removed once "org.hiero.gradle.build" contains the following update: -// https://github.com/hiero-ledger/hiero-gradle-conventions/issues/444 -@Suppress("UnstableApiUsage") -gradle.lifecycle.beforeProject { - plugins.withId("org.hiero.gradle.base.jpms-modules") { - configure { - patch.module("io.prometheus:simpleclient") { - addRuntimeOnlyDependency("io.prometheus:simpleclient_tracer_common") - } - } - configure { - module("io.micrometer:micrometer-registry-otlp", "micrometer.registry.otlp") - module("io.opentelemetry.proto:opentelemetry-proto", "io.opentelemetry.proto") - } - } -} diff --git a/pbj-integration-tests/build.gradle.kts b/pbj-integration-tests/build.gradle.kts index 32b0ebfd6..4f5cfcead 100644 --- a/pbj-integration-tests/build.gradle.kts +++ b/pbj-integration-tests/build.gradle.kts @@ -26,6 +26,7 @@ jvmDependencyConflicts.consistentResolution { javaModuleDependencies { moduleNameToGA.put("com.hedera.pbj.integration.tests", "com.hedera.pbj:pbj-integration-tests") + moduleNameToGA.put("com.hedera.pbj.grpc.common", "com.hedera.pbj:pbj-grpc-common") } mainModuleInfo { @@ -71,10 +72,7 @@ configurations.testRuntimeClasspath { } // IMPROVE: Test code should not have a direct dependency to 'com.hedera.pbj.compiler' -dependencies { - jmhImplementation("com.hedera.pbj:pbj-grpc-common") - testImplementation("com.hedera.pbj:pbj-compiler") { isTransitive = false } -} +dependencies { testImplementation("com.hedera.pbj:pbj-compiler") { isTransitive = false } } dependencyAnalysis { issues { all { onAny { exclude("com.hedera.pbj:pbj-compiler") } } } } diff --git a/pbj-integration-tests/gradle/wrapper/gradle-wrapper.jar b/pbj-integration-tests/gradle/wrapper/gradle-wrapper.jar index 8bdaf60c7..b1b8ef56b 100644 Binary files a/pbj-integration-tests/gradle/wrapper/gradle-wrapper.jar and b/pbj-integration-tests/gradle/wrapper/gradle-wrapper.jar differ diff --git a/pbj-integration-tests/gradle/wrapper/gradle-wrapper.properties b/pbj-integration-tests/gradle/wrapper/gradle-wrapper.properties index fbe9ce9f8..b52fb7e71 100644 --- a/pbj-integration-tests/gradle/wrapper/gradle-wrapper.properties +++ b/pbj-integration-tests/gradle/wrapper/gradle-wrapper.properties @@ -1,8 +1,9 @@ -# SPDX-License-Identifier: Apache-2.0 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/pbj-integration-tests/gradlew b/pbj-integration-tests/gradlew index adff685a0..b9bb139f7 100755 --- a/pbj-integration-tests/gradlew +++ b/pbj-integration-tests/gradlew @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/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/. diff --git a/pbj-integration-tests/gradlew.bat b/pbj-integration-tests/gradlew.bat index e509b2dd8..aa5f10b06 100644 --- a/pbj-integration-tests/gradlew.bat +++ b/pbj-integration-tests/gradlew.bat @@ -23,8 +23,8 @@ @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @@ -51,7 +51,7 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -65,7 +65,7 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line @@ -73,21 +73,10 @@ goto fail @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:end -@rem End local scope for the variables with windows NT shell -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! -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 - -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/pbj-integration-tests/settings.gradle.kts b/pbj-integration-tests/settings.gradle.kts index 252222efa..b955135df 100644 --- a/pbj-integration-tests/settings.gradle.kts +++ b/pbj-integration-tests/settings.gradle.kts @@ -3,7 +3,7 @@ pluginManagement { includeBuild("../pbj-core") // use locally built 'pbj-core' (Gradle plugin) } -plugins { id("org.hiero.gradle.build") version "0.6.3" } +plugins { id("org.hiero.gradle.build") version "0.7.7" } dependencyResolutionManagement { // To use locally built 'pbj-runtime'