Setup and example how to use

suggest change

Setup Steps:

  1. Download and install jdk8.
  2. Add the following to your project’s main build.gradle
buildscript {
    repositories {

    dependencies {
        classpath 'me.tatarka:gradle-retrolambda:3.2.3'
  1. Now add this to your application module’s build.gradle
apply plugin: '' // or apply plugin: 'java'
apply plugin: 'me.tatarka.retrolambda'
  1. Add these lines to your application module’s build.gradle to inform the IDE of the language level:
android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8


So things like this:

button.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {

Become this:

button.setOnClickListener(v -> log("Clicked"));

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents