comparison build/build.xml @ 26:1bfff4a9a00a

Switching to ASM6 release
author afedorch
date Fri, 29 Sep 2017 10:37:46 -0700
parents 16cbc6c62174
children 4cfae0867822
comparison
equal deleted inserted replaced
6:a4cdd8a76bc9 7:b62691a9c668
27 27
28 <project name="JCov" default="build" basedir="."> 28 <project name="JCov" default="build" basedir=".">
29 29
30 <property file="release.properties"/> 30 <property file="release.properties"/>
31 <property file="build.properties"/> 31 <property file="build.properties"/>
32 <import file="check-dependecies.xml"/>
32 33
33 <!-- Build area --> 34 <!-- Build area -->
34 <property name="build.dir" location="${result.dir}/jcov_${build.version}"/> 35 <property name="build.dir" location="${result.dir}/jcov_${build.version}"/>
35 <property name="jcov.classpath" value="${asmjar}:${java.home}/lib/tools.jar"/> 36 <property name="jcov.classpath" value="${asm.jar}:${asm.util.jar}:${asm.tree.jar}:${java.home}/lib/tools.jar"/>
36 37
37 <!-- Temp dir is for files which do not appear in release directory --> 38 <!-- Temp dir is for files which do not appear in release directory -->
38 <property name="tmp.dir" location="${result.dir}/temp"/> 39 <property name="tmp.dir" location="${result.dir}/temp"/>
39 40
40 <property name="jcov.classes" location="${tmp.dir}/jcov_classes"/> 41 <property name="jcov.classes" location="${tmp.dir}/jcov_classes"/>
92 <delete dir="${build.dir}"/> 93 <delete dir="${build.dir}"/>
93 <delete dir="${tmp.dir}"/> 94 <delete dir="${tmp.dir}"/>
94 95
95 </target> 96 </target>
96 97
97 <target name="compare-checksum"> 98 <target name="prepare" depends="clean, verify-dependencies" description="checks dependencies">
98
99 <available file="${asmjar}" property="asm.present"/>
100 <fail unless="asm.present" message="Please, specify asm library"/>
101
102 <checksum file="${asmjar}" algorithm="sha1" property="${asmjar.checksum}" verifyproperty="asm.checksum.matches" />
103 <condition property="checksum.differs">
104 <equals arg1="${asm.checksum.matches}" arg2="false" />
105 </condition>
106 </target>
107
108 <target name="fail-if-checksum-differs" if="verify.strict" unless="verify.off">
109 <fail if="checksum.differs" message="wrong checksum for ASM dependency" />
110 </target>
111
112 <target name="verify-checksum" depends="compare-checksum, fail-if-checksum-differs" if="checksum.differs" unless="verify.off">
113 <echo message="warning: wrong checksum for ASM dependency" level="warning" />
114 </target>
115
116 <target name="prepare" depends="clean, verify-checksum" description="checks dependencies">
117 99
118 <condition property="javatest.present"> 100 <condition property="javatest.present">
119 <and> 101 <and>
120 <isset property="javatestjar"/> 102 <isset property="javatestjar"/>
121 <not> 103 <not>
199 <patternset id="jcov.services"> 181 <patternset id="jcov.services">
200 <include name="META-INF/services/**"/> 182 <include name="META-INF/services/**"/>
201 </patternset> 183 </patternset>
202 184
203 <target name="build-jcov" depends="compile" description="build jcov jar"> 185 <target name="build-jcov" depends="compile" description="build jcov jar">
204 <unjar src="${asmjar}" dest="${jcov.classes}"/> 186 <unjar src="${asm.jar}" dest="${jcov.classes}"/>
187 <unjar src="${asm.tree.jar}" dest="${jcov.classes}"/>
188 <unjar src="${asm.util.jar}" dest="${jcov.classes}"/>
205 189
206 <mkdir dir="${jcov.classes}/META-INF"/> 190 <mkdir dir="${jcov.classes}/META-INF"/>
207 <mkdir dir="${jcov.classes}/META-INF/services"/> 191 <mkdir dir="${jcov.classes}/META-INF/services"/>
208 <echo file="${jcov.classes}/META-INF/services/com.sun.tdk.jcov.report.ancfilters.DefaultAncFilter" 192 <echo file="${jcov.classes}/META-INF/services/com.sun.tdk.jcov.report.ancfilters.DefaultAncFilter"
209 append="false"> 193 append="false">