From b7e7aeee9e2b4d42f753ab147eb95677939103a5 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 3 Mar 2018 12:16:16 +0100 Subject: [PATCH] Reset Java source compatibility to 1.7 (Java 7) The following wild problem appeared: Smack currently checks for Android API compatiblity by creating a extra 'compileAndroid' task, which has the boot classpath set to the corresponding android.jar of the minimum Android API level required by Smack. This ensures that the task failes if we use methods which are not part of this Android API level. Now setting javac's source/target compatibility level to Java 8 in itself is not a problem, newer Android build toolchains will desugar most Java 8 ishms to the Java 7 flavor supported by the dex tool, hence Android projects are able to consume a Java 8 enabled Smack. But as soon as we use lambdas with an minimum Android API level lower than 26, the compileAndroid task will fail with: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodHandles$Lookup not found. Re-opens SMACK-801. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 80e0d72d7..f94204b6b 100644 --- a/build.gradle +++ b/build.gradle @@ -96,7 +96,7 @@ allprojects { junitVersion = '4.11' } group = 'org.igniterealtime.smack' - sourceCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = 1.7 targetCompatibility = sourceCompatibility version = shortVersion if (isSnapshot) {