Adding build date / time to Android project

I would like to use TIME and DATE macros in Java, as well as in C. However, I know that they do not exist. I looked at various sites and saw offers such as http://www.rgagnon.com/javadetails/java-0532.html . I understand that this can be accomplished by creating a custom build.xml file, but I'm reluctant to tear this far from the Android toolchain.

Eclipse Builder may have been a viable solution, but modifying files outside of Eclipse seems unreasonable.

Does anyone have a suggestion to access the build date / time from their Android app without a special build.xml file? Can I use the build.properties file, Eclipse Builder, or something else?

+5
source share
1 answer

I would recommend using the build.properties file written by ant script registered as a project builder. As part of the ant builder configuration, you can specify which resources need to be updated after the build, so the fact that you are writing this file external to Eclipse will not be a big problem. Remember to configure the original control system to ignore this build.properties file.

0
source

All Articles