← Back to context

Comment by pjmlp

8 hours ago

It sure did, you use conditions, no need for contrib.

https://ant.apache.org/manual/Tasks/condition.html

The else part is easily done by repeating and negating the condition.

Two other advantages of Ant that MSBuild lacks in a sane way to this day, are macros, and proper documentation.

As of Ant 1.9.1, you can use 'if' and 'unless' attributes on any task or element in a target. I stopped using Ant a long time ago, but this was a pleasant discovery when I had to pick up an old Ant based project recently.

https://ant.apache.org/manual/ifunless.html

  • Nice, I was basing my answer on what was there initially.

    I always liked Ant, as I don't suffer from XML allergy.