Yes, I'm not sure what the best approach is here. One approach is to separate the template and the code by having an AndroidManifest.template file, with ${domainData} holding the place where the domains should be spliced in. The script could then read in the template file and emit the manifest.