Files
comaps/android/build.gradle
Andrei Shkrob c600a4fd5d [android][sdk] Move drawables into sdk lib
Signed-off-by: Andrei Shkrob <github@shkrob.dev>
2025-07-31 07:19:55 +02:00

29 lines
928 B
Groovy

import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias libs.plugins.android.application apply false
alias libs.plugins.android.library apply false
}
def run(cmd) {
def output = providers.exec {
commandLine = cmd
}
return output.standardOutput.asText.get().trim()
}
def getVersion() {
def isWindows = DefaultNativePlatform.getCurrentOperatingSystem().isWindows()
def bash = isWindows ? 'C:\\Program Files\\Git\\bin\\bash.exe' : 'bash'
def versionCode = Integer.parseInt(run([bash, '../tools/unix/version.sh', 'android_code']))
def versionName = run([bash, '../tools/unix/version.sh', 'android_name'])
return new Tuple2(versionCode, versionName)
}
rootProject.ext {
def ver = getVersion()
versionCode = ver.V1
versionName = ver.V2
}