Skip to content

Commit c1f27d2

Browse files
authored
feat!: remove java11 support and expand java21 test coverage (#356)
1 parent b6d37e5 commit c1f27d2

File tree

13 files changed

+27
-27
lines changed

13 files changed

+27
-27
lines changed

.github/workflows/buildpack-integration-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ on:
1414
permissions: read-all
1515

1616
jobs:
17-
java11-buildpack-test:
17+
java21-buildpack-test:
1818
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@main
1919
with:
2020
http-builder-source: '/tmp/tests/conformance'
2121
http-builder-target: 'com.google.cloud.functions.conformance.HttpConformanceFunction'
2222
cloudevent-builder-source: '/tmp/tests/conformance'
2323
cloudevent-builder-target: 'com.google.cloud.functions.conformance.CloudEventsConformanceFunction'
2424
prerun: 'invoker/conformance/prerun.sh'
25-
builder-runtime: 'java11'
26-
builder-runtime-version: '11'
25+
builder-runtime: 'java21'
26+
builder-runtime-version: '21'
2727
builder-url: gcr.io/serverless-runtimes/google-22-full/builder/java:latest
2828
java17-buildpack-test:
2929
uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@main

.github/workflows/conformance.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
strategy:
1515
matrix:
1616
java: [
17-
11.x,
17+
17.x,
18+
21.x
1819
]
1920
steps:
2021
- name: Harden Runner

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up JDK
2525
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
2626
with:
27-
java-version: 11.x
27+
java-version: 17.x
2828
distribution: temurin
2929
- name: Build API with Maven
3030
run: (cd functions-framework-api/ && mvn install)

.github/workflows/unit.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ jobs:
1313
strategy:
1414
matrix:
1515
java: [
16-
11.x,
1716
17.x,
18-
21-ea
17+
21.x
1918
]
2019
steps:
2120
- name: Harden Runner
@@ -37,4 +36,4 @@ jobs:
3736
- name: Build with Maven
3837
run: (cd functions-framework-api/ && mvn install)
3938
- name: Test
40-
run: (cd invoker/ && mvn test)
39+
run: (cd invoker/ && mvn test)

.kokoro/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fi
6464
echo "pwd=$(pwd)"
6565

6666
# Make sure `JAVA_HOME` is set and using jdk11.
67-
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
67+
export JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64
6868
echo "JAVA_HOME=$JAVA_HOME"
6969
mvn clean deploy -B -q \
7070
-P sonatype-oss-release \

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ This project is divided into multiple packages, primarily:
3838
- `function-maven-plugin` - The Maven plugin for building functions
3939
- `conformance` - A set of functions used for conformance testing
4040

41-
### Setup JDK 11 / 17
41+
### Setup JDK 17 / 21
4242

43-
Install JDK 11 and 17. One way to install these is through [SDK man](https://sdkman.io/).
43+
Install JDK 17 and 21. One way to install these is through [SDK man](https://sdkman.io/).
4444

4545
```sh
46-
sdk install java 11.0.2-open
4746
sdk install java 17-open
47+
sdk install java 21-open
4848
sdk use java 17-open
49-
sdk use java 11.0.2-open
49+
sdk use java 21-open
5050
```
5151

5252
Verify Java version with:

function-maven-plugin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
</licenses>
4848

4949
<properties>
50-
<maven.compiler.source>11</maven.compiler.source>
51-
<maven.compiler.target>11</maven.compiler.target>
50+
<maven.compiler.source>17</maven.compiler.source>
51+
<maven.compiler.target>17</maven.compiler.target>
5252
</properties>
5353

5454
<dependencies>

function-maven-plugin/src/main/java/com/google/cloud/functions/plugin/DeployFunction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ public class DeployFunction extends CloudSdkMojo {
9898
* Runtime in which to run the function.
9999
*
100100
* <p>Required when deploying a new function; optional when updating an existing function. Default
101-
* to Java11.
101+
* to Java17.
102102
*/
103103
@Parameter(
104104
alias = "deploy.runtime",
105-
defaultValue = "java11",
105+
defaultValue = "java17",
106106
property = "function.deploy.runtime")
107-
String runtime = "java11";
107+
String runtime = "java17";
108108

109109
/**
110110
* The email address of the IAM service account associated with the function at runtime. The

function-maven-plugin/src/test/java/com/google/cloud/functions/plugin/DeployFunctionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void testDeployFunctionCommandLine() {
5353
"--env-vars-file=myfile",
5454
"--set-build-env-vars=env1=a,env2=b",
5555
"--build-env-vars-file=myfile2",
56-
"--runtime=java11",
56+
"--runtime=java17",
5757
"--quiet");
5858
assertThat(mojo.getCommands()).isEqualTo(expected);
5959
}

functions-framework-api/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
<artifactId>maven-compiler-plugin</artifactId>
7878
<version>${maven-compiler-plugin.version}</version>
7979
<configuration>
80-
<source>11</source>
81-
<target>11</target>
80+
<source>17</source>
81+
<target>17</target>
8282
</configuration>
8383
</plugin>
8484
<plugin>

0 commit comments

Comments
 (0)