moved to castor-1.1-cycle - a specially patched version of castor relating to jira...
[jalview.git] / build.xml
index aa0ca67..c872cfe 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -68,6 +68,8 @@
                <property name="outputDir" value="classes" />
                <property name="packageDir" value="dist" />
                <property name="outputJar" value="jalview.jar" />
+                <!-- Jalview Applet JMol Jar Dependency -->
+                <property name="jmolJar" value="Jmol-11.0.2.jar" />
                <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
                <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
                <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
                </path>
                <!-- The Location of the java 1.1.8 jdk -->
                <property name="java118.home" value="C:\Sun\jdk1.1.8" />
+               <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip"/>
+               <!-- jre for 1.4 version
+               <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
+               -->
                <!-- the classpath for building the 1.1 applet -->
                <path id="jalviewlite.deps">
                        <fileset dir="${java118.home}">
                                <include name="lib/classes.zip"/>
                        </fileset>
-               <pathelement location="lib/jmol.jar"/>
+               <pathelement location="lib/${jmolJar}"/>
          </path>
        </target>
 
     target="1.1"
     srcdir="${sourceDir}" 
     destdir="${outputDir}"
-    classpath="lib/JmolApplet.jar"
+    classpath="lib/${jmolJar}"
        includes="jalview/appletgui/**"
        excludes="ext/**,MCview/**,org/**,vamsas/**"
        />
   </target>
 
   <target name="obfuscate" depends="packageApplet">
+    <path id="obfuscateDeps.path">
+    <pathelement location="${applet.jre.tools}"/>
+    <pathelement location="lib/${jmolJar}"/>
+    </path>
     <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
     <proguard>
-      -libraryjars "${java.home}/lib/rt.jar";lib/JmolApplet.jar
+      <injar file="in.jar"/>
+      <outjar file="jalviewApplet.jar"/>
+      <libraryjar refid="obfuscateDeps.path"/>
+      <keep access="public" type="class"
+      name="jalview.bin.JalviewLite">
+        <field access="public"/>
+        <method access="public"/>
+        <constructor access="public"/>
+      </keep>
+<!--      -libraryjars "${obfuscateDeps}"
       -injars      in.jar
       -outjars     jalviewApplet.jar
       -keep public class jalview.bin.JalviewLite
        { public * ; }
+       -->
     </proguard>
     <delete file="in.jar"/>
   </target>