Earlier quoted context omitted.
Java is castrated on purpose on Android as means to sell Kotlin. If that wasn't the case, Google would support Java latest with all features, alongside Kotlin, and let the best win. See how much market update Kotlin has outside Android, when it isn't being pushed and needs to compete against Java vLatest on equal terms.
Blame Oracle. If they had been more forward looking and a bit less greedy, Java vLatest would be the default language on Android.
Android is Google's J++, which Sun sued and won.
Kotlin is Google's C#.
Plus everyone keeps forgetting Kotlin is a JVM based language, Android Studio and Gradle are implemented in JVM languages, JVM are implemented in a mix of C, C++ and Java (zero Kotlin), Android still uses Java, only that Google only takes out of OpenJDK what they feel like, and currentl that is Java 17 LTS, most of the work on OpenJDK was done by Oracle employees.