Skip to content

Commit 7baf264

Browse files
author
Tim te Beek
authored
Add recipe to upgrade to Java 17, which also upgrades from 8 to 11 first (#128)
1 parent 84790ed commit 7baf264

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/main/resources/META-INF/rewrite/java-version-17.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ type: specs.openrewrite.org/v1beta/recipe
1818
name: org.openrewrite.java.migrate.JavaVersion17
1919
displayName: Change Maven Java version property values to 17
2020
description: Change maven.compiler.source and maven.compiler.target values to 17.
21+
tags:
22+
- java17
23+
- compiler
2124
recipeList:
2225
- org.openrewrite.maven.ChangePropertyValue:
2326
key: java.version
@@ -31,4 +34,3 @@ recipeList:
3134
key: maven.compiler.target
3235
newValue: 17
3336
addIfMissing: false
34-
- org.openrewrite.java.migrate.lang.StringFormatted
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Copyright 2022 the original author or authors.
3+
# <p>
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# <p>
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
# <p>
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
---
17+
type: specs.openrewrite.org/v1beta/recipe
18+
name: org.openrewrite.java.migrate.UpgradeJava17
19+
displayName: Upgrade to Java 17
20+
description: This recipe will apply changes commonly needed when migrating to Java 17, including intermediate versions.
21+
tags:
22+
- java17
23+
- lombok
24+
recipeList:
25+
- org.openrewrite.java.migrate.Java8toJava11
26+
# Update compiler source and target versions
27+
- org.openrewrite.java.migrate.JavaVersion17
28+
- org.openrewrite.java.migrate.lang.StringFormatted
29+
- org.openrewrite.java.migrate.lombok.LombokValToFinalVar

0 commit comments

Comments
 (0)