Here’s a simple Ant build file:
<?xml version="1.0" encoding="UTF-8"?>
<project name="Project" default="build" basedir=".">
<property name="compressAssets" value="false"/>
<target name="build" depends="compress-assets"/>
<target name="compress-assets" if="compressAssets">
<echo message="executed"/>
</target>
</project>
compressAssets is set to false, so how come the compress-assets target is executed every time? Note the if property on the target.
ifdoes not check for the value of the property, it checks if the property has been set.From the documentation: