I\'m trying to use a java.lang.function.Function in my java 8 code base, but i keep getting the following error in Intellij.
Usage of API
If you are using Gradle, don't forget to make sure the following is set to 1.8 and not 1.5 (for instance for some bizarre reason in Intelij it defaults to 1.5) so no matter what you do at the project level to set the compiler compatibility level, this setting will cause it to continue giving you trouble with Java 8 features that it would not recognize:
version '1.0-SNAPSHOT'
apply plugin: 'groovy'
apply plugin: 'java'
sourceCompatibility = 1.8