What's the best way to filter (replace tokens) in Android resources with the new build system?


(stian.osterhaug) #1

I have the resource file res/values/version.xml that looks like this:

<resources>
<string name="build_number">${build.number}</string>
<string name="build_date">${build.date}</string>
</resources>

I want to replace ${build.number} and ${build.date} with my VCS revision and current date. How would I do this with the new Android build system?

Would it be better to put it in meta-data in AndroidManifest.xml, if so, how would I accomplish that?