Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
28
android/build.gradle
Normal file
28
android/build.gradle
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue