Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
get date of compilation — Gideros Forum

get date of compilation

In the about part of my app i want to write the version of the app according to the date it was compiled. is there an automatic way to get this so i don't need to edit it manually all the time (as usually i do forget)?

Comments

  • hgy29hgy29 Maintainer
    There is no builtin way, but you could write a plugin script to do that
  • thanks for the fast answer,
    for me it would take too much time to write the script, so unless somebody else also likes the idea i have to live with the manual solution.
  • hgy29hgy29 Maintainer
    Actually it is not that difficult: here is an example supporting android only:
    <plugin
     name="Build Date"
     description="Create a BUILD-DATE file in assets containg the build date">
      <target name="AndroidStudio,APK">
    	<lua>
    		local f=io.open(Export.getProperty("sys.exportDir").."/app/src/main/assets/assets/BUILD-DATE","w")
    		f:write(os.time())
    		f:close()
    		local f=io.open(Export.getProperty("sys.exportDir").."/app/src/main/assets/assets/allfiles.txt","a+")
    		f:write("BUILD-DATE\n")
    		f:close()
    	</lua>
     </target>
    </plugin>

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.