Currently, the Java compiler in AndroidIDE (which provides Java language features in the editor) is based on JDK 17 (nb-javac). Android projects can already use Java 17 language features in the Java source files (source) and support for JDK 21 will be added eventually (in AGP). For this reason, porting JDK 21's Java compiler for the IDE should be considered now.
In the existing compiler, there are features from nb-javac that we use. When porting the Java 21 compiler, we need to make sure that those changes from are also included.
Currently, the Java compiler in AndroidIDE (which provides Java language features in the editor) is based on JDK 17 (nb-javac). Android projects can already use Java 17 language features in the Java source files (source) and support for JDK 21 will be added eventually (in AGP). For this reason, porting JDK 21's Java compiler for the IDE should be considered now.
In the existing compiler, there are features from nb-javac that we use. When porting the Java 21 compiler, we need to make sure that those changes from are also included.
Resources :