Android Question Can I use #CustomBuildAction to write out #VersionName to Version.txt

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I would like to use CustomBuildAction to write a out the #VersionName into a file called Version.txt

Is this possible?
 

drgottjr

Expert
Licensed User
Longtime User
just write your own custombuildaction. easy peasy: follow the simple syntax of the custombuildaction directive, run cmd.exe, have cmd.exe run a .bat file.
i've done it. the only trick in your case will be to grep the version id from your .b4a project source. it's there. once you have that, you can echo it to your version.txt file. hint: the whole thing takes place from your project's objects folder. the way compiletime.jar works is to save compiletime.txt to your assets folder. it does that by using ..\files\compiletime.txt. that's your clue.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0
Top