A Gradle plugin that enables Java 8 lambda expressions and method references in Java 6, 7, and Android projects.
Gradle Retrolambda is a Gradle plugin that enables Java 8 language features—specifically lambda expressions and method references—in projects targeting older Java versions (6 or 7) or Android. It integrates the Retrolambda tool to transform modern Java bytecode into a format compatible with earlier JVMs, allowing developers to use concise lambda syntax without upgrading their runtime environment.
Java and Android developers working in environments constrained to Java 6 or 7, such as legacy systems, specific Android API levels, or corporate infrastructures that haven't adopted Java 8.
It provides a straightforward, build-integrated solution to adopt Java 8's lambda syntax while maintaining compatibility with older runtimes, reducing boilerplate code and improving code readability without requiring a full Java 8 migration.
A gradle plugin for getting java lambda support in java 6, 7 and android
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works directly with Android Gradle projects, enabling lambda expressions on Android without requiring Java 8, as shown in the compileOptions configuration for Android Studio setup.
By default, only processes changed class files to speed up build times, reducing overhead for large projects during development.
Allows targeting Java versions 5, 6, or 7 and supports custom Retrolambda JAR versions, giving developers control over the toolchain and compatibility.
Fully integrates with Proguard for code shrinking, with specific directives provided in the README to avoid warnings related to lambda classes.
Has documented problems with lint failing on lambda files and conflicts with older Google Play Services versions, requiring workarounds like adding '-noverify' to jvmArgs.
Only transforms lambda expressions and method references, not supporting other Java 8 features such as streams or default methods in interfaces without disabling incremental builds.
Introduces an extra bytecode transformation step that can complicate debugging and increase build time, especially when defaultMethods are enabled, forcing incremental builds off.