This is an automated email from the ASF dual-hosted git repository.
fanningpj 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 a32381d8 try to ensure Java 17 as release target for classes (#505)
a32381d8 is described below
commit a32381d8316bbdd1c6a54fa430d13243a3f8fa82
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Sep 11 09:10:29 2025 +0100
try to ensure Java 17 as release target for classes (#505)
---
gradle-plugin/build.gradle | 5 +++++
maven-plugin/src/main/maven/plugin.xml | 4 ++++
project/Common.scala | 2 ++
3 files changed, 11 insertions(+)
diff --git a/gradle-plugin/build.gradle b/gradle-plugin/build.gradle
index 6c1ceda1..605e6366 100644
--- a/gradle-plugin/build.gradle
+++ b/gradle-plugin/build.gradle
@@ -44,6 +44,11 @@ gradlePlugin {
}
}
+tasks.withType(JavaCompile) {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+}
+
publishing {
publications.withType(MavenPublication) {
pom {
diff --git a/maven-plugin/src/main/maven/plugin.xml
b/maven-plugin/src/main/maven/plugin.xml
index 2a3a5492..2e668808 100644
--- a/maven-plugin/src/main/maven/plugin.xml
+++ b/maven-plugin/src/main/maven/plugin.xml
@@ -6,6 +6,10 @@
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-grpc-maven-plugin</artifactId>
<goalPrefix>pekko-grpc</goalPrefix>
+ <configuration>
+ <source>17</source>
+ <target>17</target>
+ </configuration>
<mojos>
<mojo>
<goal>generate</goal>
diff --git a/project/Common.scala b/project/Common.scala
index ba528431..e6b6739b 100644
--- a/project/Common.scala
+++ b/project/Common.scala
@@ -81,6 +81,8 @@ object Common extends AutoPlugin {
"-Wconf:cat=feature:silent")),
Compile / console / scalacOptions ~=
(_.filterNot(consoleDisabledOptions.contains)),
javacOptions ++= List("-Xlint:unchecked", "-Xlint:deprecation"),
+ Compile / compile / javacOptions ++= Seq("--release", "17"),
+ Compile / compile / scalacOptions ++= Seq("-release", "17"),
Compile / doc / scalacOptions := scalacOptions.value ++ Seq(
"-doc-title",
"Apache Pekko gRPC",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]