gradle-retrolambda
gradle-retrolambda copied to clipboard
Error using frameworks compiled with Java 8 to test pure java projects
Hi,
I have an Android project with a pure java (i.e. not Android) project dependency. I'm using AssertJ, version 3 of which is compiled using Java 8, for unit tests. I have all the relevant JAVA*_HOME variables set, and gradle is running using Java 8.
What I observe:
- I can run the unit tests for the Android project just fine from both Android Studio and the command line.
- The unit tests for the library project run fine from Android Studio.
- The unit tests for the library project fail when I run them from the command line with
java.lang.UnsupportedClassVersionError: org/assertj/core/api/Assertions : Unsupported major.minor version 52.0.
I have an example project here. For me, running ./gradlew lib:test will induce the failure.
Can you provide any advice? I've already taken all the steps suggested in other issues which mention this error (e.g. #133).
Great work on this project btw.
I have this same issue. Did you figure anything out?
@Arnesen Unfortunately not, although I haven't had a chance to look at this for a while.
Unsupported major.minor version 52.0 usually indicates that whatever you're trying to run there needs Java 8 and you're not running it with Java 8.
I just ran into this exact issue.