1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

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.
This commit is contained in:
Florian Schmaus 2018-03-03 12:16:16 +01:00
parent 7c9060c32b
commit b7e7aeee9e

View file

@ -96,7 +96,7 @@ allprojects {
junitVersion = '4.11' junitVersion = '4.11'
} }
group = 'org.igniterealtime.smack' group = 'org.igniterealtime.smack'
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = 1.7
targetCompatibility = sourceCompatibility targetCompatibility = sourceCompatibility
version = shortVersion version = shortVersion
if (isSnapshot) { if (isSnapshot) {