In order to truely stay Java 8 compatible, declaring a source and
target compatiblity is not sufficient. Source compatiblity means that
the input, i.e. the code written in Java is compatible with that
particular version of the Java Language Specification (JLS). And
target compatibitliy means that the produced Java bytecode is
compatible with that particular version of the Java Virtual Machine
Specificiation (JVMS).
But there is actually a third dimension: the runtime
library (rt.jar). If signatures of methods change over java releases
within the runtime library, then the produced bytecode, may contain
calls to methods that do not exist with that exact same signature in
older java versions.
For example the family of Buffer subclasses changed the return value
of certain functions, for example flip() to not return Buffer, but the
concrete type of the current instance, e.g. CharBuffer.
If we compile now with a newer JDK, where the return type is
CharBuffer and not Buffer, then executing on an older JDK, where the
return type is Buffer, then we get java.lang.NoSuchMethodError(s)
thrown at us.
Fixes SMACK-651.
to ensure that javadocAll works correctly. A nice side-effect, this
also ensures that the package-info.java symbolic links are still
correct and haven't been replaced by some IDE or editor with the
content of the link target.
This commit also changes the usage of the android.jar found in the
androidBootClasspath gradle variable, because
AndroidSmackInitializer.initialize(Context) pulls in
org.minidns.dnsserverlookup.android21.AndroidUsingLinkProperties
from minidns-android21, which has a @TargetApi annotation which is
only available on Android SDK API level 16 or higher. Otherwhise we
would get
> Task :smack-android:compileJava FAILED
/home/flo/.gradle/caches/modules-2/files-2.1/org.minidns/minidns-android21/0.3.0/13f273d095e51d701283062a25e867f3ff26d258/minidns-android21-0.3.0.jar(/org/minidns/dnsserverlookup/android21/AndroidUsingLinkProperties.class): warning: Cannot find annotation method 'value()' in type 'TargetApi': class file for android.annotation.TargetApi not found
/home/flo/.gradle/caches/modules-2/files-2.1/org.minidns/minidns-android21/0.3.0/13f273d095e51d701283062a25e867f3ff26d258/minidns-android21-0.3.0.jar(/org/minidns/dnsserverlookup/android21/AndroidUsingLinkProperties.class): warning: Cannot find annotation method 'value()' in type 'TargetApi'
error: warnings found and -Werror specified
1 error
when compiling smack-android.
Also add minidns-core as dependency to smack-core. This requires
increasing the minimum required Android SDK level to 9, as this is
what MiniDNS requires.
with the correct parameters to collect the jacocoReports from all
subprojects and put the jacocoTestReport.xml in the right place, so that
the coveralls plugin is able to find it.
This commit marks an important milestone with the addition of the
smack-android subproject. Smack is now able to run native on Android
without requiring any modifications, which makes the aSmack build
environment obsolete.
It was necessary to redesign the code for SASL authentication to achieve
this. Smack now comes with smack-sasl-provided for SASL implementations
that do not rely on additional APIs like javax for platforms where those
APIs are not available like Android.