JAL-1994 bugfix in build.xml to prevent proguard from obfuscating dynamically accesse... bug/JAL-1994_Jalviewlite-json-parser-in-browsers
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Thu, 21 Jan 2016 10:02:08 +0000 (10:02 +0000)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Thu, 21 Jan 2016 10:02:08 +0000 (10:02 +0000)
appletlib/jsoup-1.8.1.jar [new file with mode: 0644]
appletlib/plugin.jar [new file with mode: 0644]
build.xml
jalviewApplet.jar [new file with mode: 0644]

diff --git a/appletlib/jsoup-1.8.1.jar b/appletlib/jsoup-1.8.1.jar
new file mode 100644 (file)
index 0000000..ae717d4
Binary files /dev/null and b/appletlib/jsoup-1.8.1.jar differ
diff --git a/appletlib/plugin.jar b/appletlib/plugin.jar
new file mode 100644 (file)
index 0000000..d19dcc5
Binary files /dev/null and b/appletlib/plugin.jar differ
index 42ef13f..43bab6f 100755 (executable)
--- a/build.xml
+++ b/build.xml
       </fileset>
       <pathelement location="appletlib/${jmolJar}" />
       <pathelement location="lib/${varnaJar}" />
-      <pathelement location="lib/${jsoup}" />
-      <pathelement location="lib/${jsonSimple}" />
-      <pathelement location="lib/${javaJson}" />
+      <pathelement location="appletlib/${jsoup}" />
+      <pathelement location="appletlib/${jsonSimple}" />
+      <pathelement location="appletlib/${javaJson}" />
 
     </path>
     <!-- default location for outputting javadoc -->
   <path id="obfuscateDeps.path">
     <pathelement location="${applet.jre.tools}" />
     <pathelement location="appletlib/${jmolJar}" />
+    <pathelement location="lib/${varnaJar}" />
+    <pathelement location="appletlib/${jsoup}" />
     <pathelement location="appletlib/${jsonSimple}" />
     <pathelement location="appletlib/${javaJson}" />
+    <pathelement location="appletlib/plugin.jar" />
   </path>
   <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
 
-  <proguard>
-    <injar file="in.jar" />
-    <outjar file="${jalviewLiteJar}" />
-    <libraryjar refid="obfuscateDeps.path" />
+  <proguard verbose="true" >
+    <injar file="in.jar" />    
+    <outjar file="${jalviewLiteJar}" />    
+    <libraryjar refid="obfuscateDeps.path" />    
     <dontwarn />
     <keep access="public" type="class" name="jalview.bin.JalviewLite">
       <field access="public" />
       <method access="public" />
       <constructor access="public" />
     </keep>
+
+    <keep name="jalview.json.binding**">
+      <constructor/>
+      <method name="*"/>
+    </keep>
+   
+    <keep access="public" type="class" name="MCview.PDBfile">
+      <field access="public" />
+      <method access="public" />
+      <constructor access="public" />
+    </keep>
+
+    <keep access="public" type="class" name="jalview.ws.jws1.Annotate3D">
+      <field access="public" />
+      <method access="public" />
+      <constructor access="public" />
+    </keep>
+    
+    <keep access="public" type="class" name="jalview.ext.jmol.JmolParser">
+      <field access="public" />
+      <method access="public" />
+      <constructor access="public" />
+    </keep>
+    
+    
     <!--      -libraryjars "${obfuscateDeps}"
       -injars      in.jar
       -outjars     jalviewApplet.jar
       <include name="${resourceDir}/**/*" />
       <include name="${helpDir}/**/*" />
       <include name="appletlib/${jmolJar}" />
+      <include name="appletlib/${jsonSimple}" />
+      <include name="appletlib/${javaJson}" />
       <exclude name="**/*locales" />
       <exclude name="*locales/**" />
       <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
 
   <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
   <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
+  <copy file="appletlib/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true" />
+  <copy file="appletlib/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true" />
   <!-- finally, replace any launchApp servlet tags with a version specification -->
   <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}&quot;">
     <replacetoken>
diff --git a/jalviewApplet.jar b/jalviewApplet.jar
new file mode 100644 (file)
index 0000000..8baee13
Binary files /dev/null and b/jalviewApplet.jar differ