Checking two conditions before compiling using Ant build -


i want check presence of dependent files before code compiled. doing following

<available file="xx" property="isxxavailable"/> <available file="yy" property="isyyavailable"/>     

for compilation want check whether both properties true. go ahead compilation

<target name="compile" depends="init" unless="isxxavailable" unless="isyyavailable"> 

is possible check both properties during compiling

you can 'and' 2 'available' condtions single 1 :

<condition property="files.available">   <and>     <available file="xx"/>     <available file="yy"/>   </and> </condition> 

then can use condition in same way doing in target

http://ant.apache.org/manual/tasks/condition.html


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -