Skip to content

Commit

Permalink
Merge branch 'dev=dynesshely'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Mar 12, 2023
2 parents 1787a2f + 97e2879 commit 738d990
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion kitx_mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import java.time.Duration
import java.time.LocalDateTime
import java.time.ZoneOffset

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -21,9 +25,13 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

def currentUTC = LocalDateTime.now(ZoneOffset.UTC)
def specifiedTime = LocalDateTime.of(2005, 6, 6, 0, 0, 0)
def deltaDays = Duration.between(specifiedTime, currentUTC).toDays()

def majorVersion = "3.23.04"
def majorVersionCode = 100000
def buildVersionCode = ((new Date().getTime() - new Date("6/6/2005").getTime()) / 86400000 - 9 as int)
def buildVersionCode = deltaDays % 65535 as int

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
Expand Down

0 comments on commit 738d990

Please sign in to comment.