Last active
January 18, 2016 15:57
-
-
Save zsoltk/3068257623f1e608ac02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will break incremental compilation | |
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim() | |
def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC")) | |
android { | |
defaultConfig { | |
buildConfigField "String", "GIT_SHA", "\"${gitSha}\"" | |
buildConfigField "String", "BUILD_TIME", "\"${buildTime}\"" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment