diff --git a/build.gradle b/build.gradle index 85e39a33..5c5bfd78 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,5 @@ +import java.text.SimpleDateFormat + // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { @@ -9,7 +11,7 @@ buildscript { // https://developer.android.com/studio/releases/gradle-plugin.html ext.version_gradle_tools = "3.1.0" // https://developer.android.com/topic/libraries/support-library/revisions.html - ext.version_library_appcompat = "27.1.0" + ext.version_library_appcompat = "27.1.1" // https://github.com/JakeWharton/butterknife/releases ext.version_library_butterknife = "8.8.1" // https://github.com/guardianproject/NetCipher/releases @@ -88,3 +90,10 @@ ext.getGitHash = { -> return 'unknown' } } +@SuppressWarnings(["UnnecessaryQualifiedReference", "SpellCheckingInspection", "GroovyUnusedDeclaration"]) +// Returns the build date in a RFC3339 compatible format. TZ is always converted to UTC +static String getBuildDate() { + final SimpleDateFormat RFC3339_LIKE = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'") + RFC3339_LIKE.setTimeZone(TimeZone.getTimeZone("UTC")) + return RFC3339_LIKE.format(new Date()) +}