Titanium currently support "Java 7" language features.
In Titanium 9.0.0, we would like to add "Java 8" language features for the core SDK and all modules. This is needed since some 3rd party Android libraries use the Java 8 language, but we're currently unable to compile them into a module or via hyperloop.
Android has limited support for Java 8 language features which Google documents below. Note that older Android OS versions support less Java 8 features.
We don't support Java 8 because Titanium is currently limited to using the "dex" command line tool in the Android SDK which only supports up to Java 7. Google's "d8" command line tool supports Java 8. If we update our Titanium build system to use gradle, then we can easily add support for this.
Support can be added via the following "build.gradle" settings...
We should add a Java 8 feature to our core Titanium code to prove that Java 8 compilation works for both the SDK and an app build. In our TiUIView.java code, I recommend that we change the following code...
...to use a Java 8 lambda as follows...
We can then test the above via a Titanium Ti.UI.Button object's "click" event.