I just reproduced the existing logic to make it fit in, it may be possible to do this.  I'm afraid I'm not an ant expert.  If this is possible, can't it be done for both sets of version numbers?