Retrolambda: Use Lambdas on Java 7
Retrolambda lets you run Java 8 code with lambda expressions on Java 7 or lower by transforming your Java 8 compiled bytecode so that it can run on a Java 7 runtime. After the transformation they are just a bunch of normal .class files, without adding any runtime dependencies. Here’s a tutorial on how to use Retrolambda in Android.
Add the following in the pom.xml,
<plugin> <groupId>net.orfjackal.retrolambda</groupId> <artifactId>retrolambda-maven-plugin</artifactId> <version>1.6.1</version> <executions> <execution> <goals> <goal>process-main</goal> <goal>process-test</goal> </goals> </execution> </executions> </plugin>