I believe you could use the XMLProperties task to achieve this.
<xmlproperty file="AndroidManifest.xml"/>
Should give you:
manifest(android:versionCode)="1"
manifest(android:versionName)="1.0"
According to the definition in the Ant manual though I haven't tried/tested it.