Skip to content

Commit

Permalink
Add build time to self-compiled builds (#846)
Browse files Browse the repository at this point in the history
Add build time to self-compiled builds
  • Loading branch information
SteWers authored Dec 31, 2024
1 parent 449d3d4 commit d275121
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def GITHUB_BRANCH = System.env.GITHUB_REF?.replaceFirst("^refs/.*/", "")
def runProguardInDebug = false
def isRunningOnCI = System.getenv("CI") == "true"

final BUILD_DATE = new Date().toZonedDateTime().toEpochSecond()

android {
namespace 'me.hufman.androidautoidrive'

Expand All @@ -54,7 +56,7 @@ android {
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'me.hufman.androidautoidrive.DexOpenerAndroidJUnitRunner'
archivesBaseName = "androidautoidrive-${androidGitVersion.name()}"
buildConfigField "long", "COMMIT_TIME", ((grgit != null && !androidGitVersion.name().contains("-dirty")) ? grgit.head().dateTime.toEpochSecond() : 0L) + "L"
buildConfigField "long", "COMMIT_TIME", ((grgit != null && !androidGitVersion.name().contains("-dirty")) ? grgit.head().dateTime.toEpochSecond() : BUILD_DATE) + "L"
manifestPlaceholders = [
spotify_api_key: System.env.AndroidAutoIdrive_SpotifyApiKey ? System.env.AndroidAutoIdrive_SpotifyApiKey : AndroidAutoIdrive_SpotifyApiKey,
appAuthRedirectScheme: applicationId
Expand Down

0 comments on commit d275121

Please sign in to comment.