2

I have the following in a text file

BuildVersion:R2 TestVersion:1000 AndroidVersion:6.0

and I need to Change "TestVersion" value dynamically using ant script?? Please advise,

1 Answer 1

5

Use a placeholder for "TestVersion" and replace it during the build process. Your text file will look like this:

BuildVersion:R2 @@TestVersion@@:1000 AndroidVersion:6.0

and your ant file will contain the following target element to replace @@TestVersion@@ with some other value:

<target name="replaceTestVersion">
    <replace file="YOUR_FILE">
        <replacefilter token="@@TestVersion@@" value="YOUR_NEW_VALUE" />
    </replace>
</target>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.