Fixed
Status Update
Comments
mm...@google.com <mm...@google.com>
tn...@google.com <tn...@google.com>
tn...@google.com <tn...@google.com> #2
Fixed by Change-Id: I85eda08a9779fbb4c12168a98d10b03201051a15 for an upcoming 8.2 canary. I would link to it but it looks like the mirror branch isn't replicating, will get that sorted.
From the change notes:
+**8.2**
+
+* For unit tests, you can now specify the language level to be used
+ for Kotlin and Java. For example, if your unit test is using Java
+ records, add `.javaLanguageLevel("17")` to your `lint()` test
+ configuration.
+
Description
DESCRIBE THE ISSUE IN DETAIL:
Android lint in AGP 8.2+ requires Java 17, but does not support Java 17 language features in tests like records or sealed classes.
STEPS TO REPRODUCE:
record example
sealed example