Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6acc998e authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Remove Git-based versionCode generation

- Version 7000 is taken from last updated prebuilt repo apk
parent 47f40cf3
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -11,18 +11,7 @@ buildscript {
    }
}

def gitVersion = { ->
    def stdout = new ByteArrayOutputStream()
    exec {
        commandLine 'git', 'describe', '--tags', '--always', '--dirty'
        standardOutput = stdout
    }
    return stdout.toString().trim()
}

allprojects {
    version gitVersion()

    repositories {
        google()
        jcenter()
+0 −1
Original line number Diff line number Diff line
COMPILE_SDK_VERSION=29
MIN_SDK_VERSION=21
TARGET_SDK_VERSION=29
VERSION_OVERRIDE=0
android.enableJetifier=true
android.useAndroidX=true
+1 −17
Original line number Diff line number Diff line
@@ -2,21 +2,6 @@ apply plugin: 'com.android.application'
if (project.hasProperty('PLAY_STORE_SERVICE_ACCOUNT_CREDENTIALS')) {
    apply plugin: 'com.github.triplet.play'
}
// commit number is only relevant to the application project
def gitCommitNo = { ref ->
    def stdout = new ByteArrayOutputStream()
    try {
        exec {
            commandLine 'git', 'rev-list', '--count', ref
            standardOutput = stdout
        }

        return Integer.parseInt(stdout.toString().trim())
    }
    catch (Exception e) {
        return 0
    }
}

android {
    compileSdkVersion COMPILE_SDK_VERSION.toInteger()
@@ -24,8 +9,7 @@ android {
        applicationId "foundation.e.tasks"
        minSdkVersion MIN_SDK_VERSION.toInteger()
        targetSdkVersion TARGET_SDK_VERSION.toInteger()
        // spread version code to allow inserting versions if necessary
        versionCode gitCommitNo('refs/remotes/origin/master') * 99 + gitCommitNo('HEAD') + Integer.parseInt(VERSION_OVERRIDE)
        versionCode 7000
        versionName '1.4.2'
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"