This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-grpc.git
The following commit(s) were added to refs/heads/main by this push:
new 1ad39c29 Upgrade Gradle wrapper from 7.6.4 to 8.14.5 (#759)
1ad39c29 is described below
commit 1ad39c29d3edcc88938a1c85f25443362ee09394
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Sat Jun 27 19:31:39 2026 +0800
Upgrade Gradle wrapper from 7.6.4 to 8.14.5 (#759)
* chore: upgrade Gradle wrapper from 7.6.4 to 8.12
Motivation:
Gradle 7.6.4 bundles Groovy 3.0.13 which has a GroovyBugError when
TestKit runs in-process (withDebug(true)) on JDK 17, causing
NoClassDefFoundError for org.codehaus.groovy.vmplugin.v7.Java7.
This blocks all gradle-plugin tests in CI.
Modification:
Upgrade Gradle wrapper from 7.6.4 to 8.12 in all three Gradle
projects: gradle-plugin, plugin-tester-java, plugin-tester-scala.
Updated gradle-wrapper.properties and gradlew scripts.
Result:
Gradle 8.12 bundles a compatible Groovy version, resolving the
in-process TestKit initialization failure on JDK 17.
Tests:
cd gradle-plugin && ./gradlew clean test
References:
None - infrastructure upgrade
* chore: use Gradle 8.14.5 instead of 8.12
Use the latest patch version in the 8.x line for best JDK
compatibility (supports up to JDK 24) while avoiding Gradle 9.x
breaking API changes.
* fix: restore gradlew scripts with wrapper jar download fallback
The gradlew scripts on main include a curl-based fallback to download
gradle-wrapper.jar when it's missing (the jar is in .gitignore).
Running ./gradlew wrapper replaced them with standard scripts lacking
this mechanism, causing CI failures.
* fix: wire Gradle license resources through processResources
Motivation:
Gradle 8.14.5 fails the Gradle test CI job because compileTestGroovy sees
files written by copyLicenseToBuildResources in build/resources/main without a
declared task dependency.
Modification:
Move the Gradle plugin LICENSE, NOTICE, and DISCLAIMER resource copy into
processResources and remove the separate Copy task and jar dependency.
Result:
Gradle owns the resource output directory, so test compilation and
publishing no longer trip implicit dependency validation.
Tests:
- export
JAVA_HOME=/Users/hepin/Library/Java/JavaVirtualMachines/azul-17.0.17/Contents/Home;
cd gradle-plugin && ./gradlew clean test publishToMavenLocal --console=plain
--stacktrace: passed
- export
JAVA_HOME=/Users/hepin/Library/Java/JavaVirtualMachines/azul-17.0.17/Contents/Home;
sbt codegen/publishM2 scalapb-protoc-plugin/publishM2 +runtime/publishM2:
passed
- git diff --check: passed
References:
Refs #759
* fix: relax Scala 3 scripted future patience
Motivation:
CI exposed a timing-sensitive Scala 3 scripted test failure when server
binding took longer than ScalaTest futureValue default timeout.
Modification:
Set an explicit ScalaFutures PatienceConfig in both Scala 3 scripted
greeter specs and remove the unused patience import.
Result:
The Scala 3 scripted examples tolerate normal CI startup latency.
Tests:
- scalafmt
sbt-plugin/src/sbt-test/scala3/01-basic-client-server/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
sbt-plugin/src/sbt-test/scala3/02-scala3-sourcegen/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
- failed; current scalafmt dialect rejected existing Scala 3
significant-indentation syntax at the class declaration
- JDK 17: sbt ++3.3.* "sbt-plugin/scripted scala3/01-basic-client-server" -
passed
- JDK 17: sbt ++3.3.* "sbt-plugin/scripted scala3/*" - passed
- git diff --check - passed
References:
Refs #759
* fix: make Scala 3 scripted specs scalafmt-compatible
Motivation:
The native scalafmt PR check formats changed files with --mode
diff-ref=origin/main and the existing Scala 3 scripted test syntax failed to
parse under the repository scalafmt configuration.
Modification:
Use brace syntax in the two changed Scala 3 scripted greeter specs while
keeping the explicit ScalaFutures patience configuration.
Result:
The native scalafmt check can parse the changed scripted specs and the
Scala 3 scripted tests still pass.
Tests:
- scalafmt --mode diff-ref=origin/main - passed
- scalafmt --list --mode diff-ref=origin/main - passed
- JDK 17: sbt ++3.3.* "sbt-plugin/scripted scala3/*" - passed
- git diff --check - passed
References:
Refs #759
---
gradle-plugin/build.gradle | 13 ++++++-------
gradle-plugin/gradle/wrapper/gradle-wrapper.properties | 5 ++---
plugin-tester-java/gradle/wrapper/gradle-wrapper.properties | 2 +-
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
.../scala/example/myapp/helloworld/GreeterServiceSpec.scala | 9 ++++++---
.../scala/example/myapp/helloworld/GreeterServiceSpec.scala | 9 ++++++---
6 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/gradle-plugin/build.gradle b/gradle-plugin/build.gradle
index 9d8aa5c5..04a5d83d 100644
--- a/gradle-plugin/build.gradle
+++ b/gradle-plugin/build.gradle
@@ -116,13 +116,12 @@ jar {
}
}
-jar.dependsOn('copyLicenseToBuildResources')
-
-tasks.register('copyLicenseToBuildResources', Copy) {
- from layout.projectDirectory.file("../LICENSE")
- from layout.projectDirectory.file("../NOTICE")
- from layout.projectDirectory.file("../DISCLAIMER")
- into layout.buildDirectory.dir("resources/main/META-INF")
+processResources {
+ into('META-INF') {
+ from layout.projectDirectory.file("../LICENSE")
+ from layout.projectDirectory.file("../NOTICE")
+ from layout.projectDirectory.file("../DISCLAIMER")
+ }
}
repositories {
diff --git a/gradle-plugin/gradle/wrapper/gradle-wrapper.properties
b/gradle-plugin/gradle/wrapper/gradle-wrapper.properties
index 1a529636..4b5ccd72 100644
--- a/gradle-plugin/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle-plugin/gradle/wrapper/gradle-wrapper.properties
@@ -1,8 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
-
-#Wed Feb 28 11:38:51 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
+networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
diff --git a/plugin-tester-java/gradle/wrapper/gradle-wrapper.properties
b/plugin-tester-java/gradle/wrapper/gradle-wrapper.properties
index 6e45e9ae..0bb3f212 100644
--- a/plugin-tester-java/gradle/wrapper/gradle-wrapper.properties
+++ b/plugin-tester-java/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
diff --git a/plugin-tester-scala/gradle/wrapper/gradle-wrapper.properties
b/plugin-tester-scala/gradle/wrapper/gradle-wrapper.properties
index 89e746b7..eaab892f 100644
--- a/plugin-tester-scala/gradle/wrapper/gradle-wrapper.properties
+++ b/plugin-tester-scala/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
diff --git
a/sbt-plugin/src/sbt-test/scala3/01-basic-client-server/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
b/sbt-plugin/src/sbt-test/scala3/01-basic-client-server/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
index e13799f6..813ee49f 100644
---
a/sbt-plugin/src/sbt-test/scala3/01-basic-client-server/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
+++
b/sbt-plugin/src/sbt-test/scala3/01-basic-client-server/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
@@ -7,7 +7,7 @@
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
-package example.myapp.helloworld;
+package example.myapp.helloworld
import scala.concurrent.duration._
@@ -20,12 +20,14 @@ import pekko.grpc.GrpcClientSettings
import example.myapp.helloworld.grpc._
import org.scalatest.concurrent.ScalaFutures
-import org.scalatest.concurrent.PatienceConfiguration
import org.scalatest.matchers.should.Matchers
import org.scalatest.time.{ Millis, Seconds, Span }
import org.scalatest.wordspec.AnyWordSpec
-class GreeterServiceSpec extends AnyWordSpec with Matchers with ScalaFutures:
+class GreeterServiceSpec extends AnyWordSpec with Matchers with ScalaFutures {
+ implicit val patience: PatienceConfig =
+ PatienceConfig(timeout = Span(10, Seconds), interval = Span(100, Millis))
+
implicit val system: ActorSystem = ActorSystem("GreeterServiceSpec")
val binding = Http()
@@ -45,3 +47,4 @@ class GreeterServiceSpec extends AnyWordSpec with Matchers
with ScalaFutures:
r.message shouldBe "Hello, Dave!"
}
}
+}
diff --git
a/sbt-plugin/src/sbt-test/scala3/02-scala3-sourcegen/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
b/sbt-plugin/src/sbt-test/scala3/02-scala3-sourcegen/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
index e13799f6..813ee49f 100644
---
a/sbt-plugin/src/sbt-test/scala3/02-scala3-sourcegen/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
+++
b/sbt-plugin/src/sbt-test/scala3/02-scala3-sourcegen/src/test/scala/example/myapp/helloworld/GreeterServiceSpec.scala
@@ -7,7 +7,7 @@
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
-package example.myapp.helloworld;
+package example.myapp.helloworld
import scala.concurrent.duration._
@@ -20,12 +20,14 @@ import pekko.grpc.GrpcClientSettings
import example.myapp.helloworld.grpc._
import org.scalatest.concurrent.ScalaFutures
-import org.scalatest.concurrent.PatienceConfiguration
import org.scalatest.matchers.should.Matchers
import org.scalatest.time.{ Millis, Seconds, Span }
import org.scalatest.wordspec.AnyWordSpec
-class GreeterServiceSpec extends AnyWordSpec with Matchers with ScalaFutures:
+class GreeterServiceSpec extends AnyWordSpec with Matchers with ScalaFutures {
+ implicit val patience: PatienceConfig =
+ PatienceConfig(timeout = Span(10, Seconds), interval = Span(100, Millis))
+
implicit val system: ActorSystem = ActorSystem("GreeterServiceSpec")
val binding = Http()
@@ -45,3 +47,4 @@ class GreeterServiceSpec extends AnyWordSpec with Matchers
with ScalaFutures:
r.message shouldBe "Hello, Dave!"
}
}
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]