lambda 🎉

master
Riccardo Balbo 5 years ago
parent 0c6f240222
commit 728a05c4f3
  1. 10
      build.gradle
  2. 6
      jme3-core/src/main/java/com/jme3/util/functional/Function.java
  3. 6
      jme3-core/src/main/java/com/jme3/util/functional/NoArgFunction.java
  4. 6
      jme3-core/src/main/java/com/jme3/util/functional/NoArgVoidFunction.java
  5. 6
      jme3-core/src/main/java/com/jme3/util/functional/VoidFunction.java

@ -9,6 +9,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.1.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 from: file('version.gradle')
apply plugin: 'me.tatarka.retrolambda'
// This is applied to all sub projects
subprojects {
if(!project.name.equals('jme3-android-examples')) {
@ -250,4 +253,11 @@ if (skipPrebuildLibraries != "true" && buildNativeProjects != "true") {
wrapper {
gradleVersion = '5.6.4'
}
retrolambda {
javaVersion JavaVersion.VERSION_1_7
incremental true
jvmArgs '-noverify'
}

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

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

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

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