evant / gradle-retrolambda
posted
Category: IDE Plugins
Minimum SDK Level: Unknown :(

Badge

View in Github Github project information
Starred: 4277
Forks: 400
Watchers: 205
Open Issues: 59

Snapshot pictures

No snapshot for this library yet.

Description

This plugin will automatically build your java or android project with
retrolambda, giving you lambda goodness on java 6 or 7. It relies on the
wonderful retrolambda by Esko
Luontola.

Note: The minimum android gradle plugin is 1.0.0.

Usage

  1. Download jdk8.

  2. Add the following to your build.gradle

    buildscript {
      repositories {
         mavenCentral()
      }
    
      dependencies {
         classpath 'me.tatarka:gradle-retrolambda:3.2.2'
      }
    }
    
    // Required because retrolambda is on maven central
    repositories {
      mavenCentral()
    }
    
    apply plugin: 'com.android.application' //or apply plugin: 'java'
    apply plugin: 'me.tatarka.retrolambda'
    

    alternatively, you can use the new plugin syntax for gradle 2.1+

    plugins {
      id "me.tatarka.retrolambda" version "3.2.2"
    }
    
  3. There is no step three!

The plugin will compile the source code with java8 and then replace the class
files with the output of retrolambda.