Closed Alia5 closed 6 years ago
This project also uses Streams, method references (invokedynamic
) and other Java 8 APIs, so I don't think it would be practical to retrofit it to Java 7 API-level.
You could try to use Retrolambda or force the compiler to emit java7 bytecode (https://stackoverflow.com/a/22610424), but i am not sure how good the result will be.
@BjoernPetersen You can add this to the android section of your build.gradle file to get many Java8 features on earlier SDKs
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
With this, "Java optional" and "java.awt.Color" are the things that hinder this form working on Android as far as I noticed yet.
@Alia5 Those features exclude most Stream/functional APIs (for SDK < 24). You're right about method references though, I remembered that wrong.
java.awt.Color will be removed in the next version (#36) to make this library android compatible. But I don't plan on backporting it to java7.
Closed due to inactivity. Please reopen the issue if needed.
Java optional prevents use on Android < SDK24 ;)