I have a jenkins server that uses ANT to build my android project , what I need to do is to add the jenkins build number into my apk. So that I can do : getprop my.version on ADB . One idea I had was to write the jenkins build to a file and bundle that on the apk so that I can read this file and set the property on Accepting the INTENT . What I need to know is how to put a file in apk resources with ant? Can anyone help?
Asked
Active
Viewed 531 times
1 Answers
0
What's wrong with including the build number into the app version (with properly updating the AndroidManifest.xml) and then getting it from the package manager on the device when needed?

Alex P.
- 30,437
- 17
- 118
- 169
-
I think Jenkins will have to check out the source code in order to write to it, and It has to be read from getprop. – user1470618 May 27 '13 at 19:53
-
AFAIK, jenkins generates the build number whenever we fire a new build from it. So is there a way that we can put that generated build number back in to app so that it can be viewed in screens like About ? – user755499 Nov 28 '16 at 13:37