From bd9407d3f0ef8a1f94fedc5b68fc1e05c129b562 Mon Sep 17 00:00:00 2001 From: Nick Hudson Date: Mon, 21 Oct 2013 17:01:26 +0100 Subject: Update Stroke's build to use "target=1.6" and "source=1.6" when compiling This is a change that was made in the isode repository some months ago (as part of some other isode-specific changes) which did not get propagated into the swift repository. If you're on a system with Java7, then by default when you build Stroke you'll get classfiles that only for for Java7 and later (you can't run them under Java6 for example). This causes problems in two specific cases: 1) some unit tests fail with java.lang.VerifyError 2) stroke's jar file will not be compatible with Android The unit tests which fail show errors like this: java.lang.VerifyError: Instruction type does not match stack map in method com.isode.stroke.base.ByteArrayTest.byteify([I)[B at offset 31 at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) this appears to be due to a limitation of Cobertura 1.9, and is supposedly fixed with Cobertura 2.0.3 https://github.com/stevesaliman/gradle-cobertura-plugin/issues/2 However, when I tried using the updated version of cobertura there appear to be other issues, so I think that needs looking at separately. The other problem with 1.7 is that Android doesn't yet support 1.7 format class files, and so you need to build with -target=1.6 if you want to be able to use the resultant stroke.jar on Android. So for these reasons, and because Stroke has no need of any 1.7 features, it seems pragmatic to change the "source" and "target" parameters of the build files to use 1.6. I'll look at the cobertura thing separately. Test-information: Checked out stroke, added this change, did a build/test to make sure things worked ok. Unit tests work ok (before this change, they fail with java.lang.* errors) Change-Id: I8ad3b8e341eebef13ae647d6e66706e4265432ca diff --git a/build-jzlib.xml b/build-jzlib.xml index 31eeeea..b34b222 100644 --- a/build-jzlib.xml +++ b/build-jzlib.xml @@ -19,7 +19,9 @@ - + - + @@ -63,7 +66,10 @@ - + -- cgit v0.10.2-6-g49f6