Skip to content

Commit 8afb866

Browse files
cushongoogle-java-format Team
authored andcommitted
Create a build rule for compiling deps at the Java STS language level
This allows building the Java > 11 logic in google-java-format into the jar regardless of what language level is configured for the entire build, and then dynamically enabling it when running on a new enough JDK, while remaining compatible with earlier JDK versions. PiperOrigin-RevId: 490074589
1 parent e322791 commit 8afb866

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/test/resources/com/google/googlejavaformat/java/testdata/B20844369.input

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
public class B20844369 {
22
private static final String ID_PATTERN =
3-
// TODO(user): add min/max lengths for the numbers here, e.g. android ID
3+
// TODO(daw): add min/max lengths for the numbers here, e.g. android ID
44
"(?:(?<androidId>\\d+)\\+)?" // optional Android ID
55
+ "(?<type>\\d+)" // type
66
+ ":"

core/src/test/resources/com/google/googlejavaformat/java/testdata/B20844369.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
public class B20844369 {
22
private static final String ID_PATTERN =
3-
// TODO(user): add min/max lengths for the numbers here, e.g. android ID
3+
// TODO(daw): add min/max lengths for the numbers here, e.g. android ID
44
"(?:(?<androidId>\\d+)\\+)?" // optional Android ID
55
+ "(?<type>\\d+)" // type
66
+ ":"

0 commit comments

Comments
 (0)