Home | History | Annotate | Download | only in src
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <project name="AndroidMockRuntime" default="runtime.build" basedir="..">
      3   <!-- Global Properties -->
      4   <property file="../build.properties"/>
      5 
      6   <!-- Android Mock Runtime Properties -->
      7   <property name="runtime.bin" value="bin"/>
      8   <property name="runtime.class-bin" value="bin/classes"/>
      9   <property name="runtime.deploy-jar" value="AndroidMockRuntime.jar"/>
     10   <property name="runtime.java-files" value="${java-package}/AndroidMock.java 
     11     ${java-package}/MockObject.java ${java-package}/UsesMocks.java"/>
     12   <property name="runtime.nodeps-jar" value="AndroidMockRuntime-nodeps.jar"/>
     13 
     14   <!-- Classpaths -->
     15   <path id="path">
     16     <pathelement location="${lib-folder}/${easymock-jar}"/>
     17   </path>
     18 
     19   <!-- Private Build Targets -->
     20   <target name="-runtime.dirs">
     21     <mkdir dir="${runtime.bin}"/>
     22     <mkdir dir="${runtime.class-bin}"/>
     23   </target>
     24 
     25   <target name="-runtime.clean-staging">
     26     <delete dir="${staging}"/>
     27   </target>
     28 
     29   <!-- Public Build Targets -->
     30   <target name="runtime.clean" depends="-runtime.clean-staging">
     31     <delete file="${runtime.deploy-jar}"/>
     32     <delete file="${runtime.nodeps-jar}"/>
     33     <delete dir="${runtime.class-bin}"/>
     34   </target>
     35 
     36   <target name="runtime.build" depends="-runtime.clean-staging,-runtime.dirs"
     37       description="Builds the Android Mock Runtime library jar file without dependencies included.">
     38     <javac destdir="${runtime.class-bin}" target="1.5" srcdir="${source-base}"
     39         includes="${runtime.java-files}" debug="true">
     40       <classpath refid="path"/>
     41     </javac>
     42     <jar destfile="${runtime.bin}/${runtime.nodeps-jar}" basedir="${runtime.class-bin}"/>
     43   </target>
     44 
     45   <target name="runtime.build-deploy" depends="runtime.build"
     46       description="Builds the Android Mock Runtime library jar file with dependencies included.">
     47     <unjar dest="${staging}">
     48       <fileset dir=".">
     49         <include name="${runtime.bin}/${runtime.nodeps-jar}"/>
     50         <include name="${lib-folder}/${easymock-jar}"/>
     51       </fileset>
     52     </unjar>
     53     <jar destfile="${runtime.bin}/${runtime.deploy-jar}" basedir="${staging}"/>
     54   </target>
     55 </project>