lambda 🎉

This commit is contained in:
Riccardo Balbo 2020-04-02 13:42:21 +02:00
parent 0c6f240222
commit 728a05c4f3
5 changed files with 34 additions and 0 deletions

View File

@ -9,6 +9,7 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'me.tatarka:gradle-retrolambda:3.7.1'
} }
} }
@ -22,6 +23,8 @@ allprojects {
apply plugin: 'base' apply plugin: 'base'
apply from: file('version.gradle') apply from: file('version.gradle')
apply plugin: 'me.tatarka.retrolambda'
// This is applied to all sub projects // This is applied to all sub projects
subprojects { subprojects {
if(!project.name.equals('jme3-android-examples')) { if(!project.name.equals('jme3-android-examples')) {
@ -251,3 +254,10 @@ if (skipPrebuildLibraries != "true" && buildNativeProjects != "true") {
wrapper { wrapper {
gradleVersion = '5.6.4' gradleVersion = '5.6.4'
} }
retrolambda {
javaVersion JavaVersion.VERSION_1_7
incremental true
jvmArgs '-noverify'
}

View File

@ -0,0 +1,6 @@
package com.jme3.util.functional;
public interface Function<R,T> {
R eval(T t);
}

View File

@ -0,0 +1,6 @@
package com.jme3.util.functional;
public interface NoArgFunction<R> {
R eval();
}

View File

@ -0,0 +1,6 @@
package com.jme3.util.functional;
public interface NoArgVoidFunction {
void eval();
}

View File

@ -0,0 +1,6 @@
package com.jme3.util.functional;
public interface VoidFunction<T> {
void eval(T t);
}