Files
comaps/android/build.gradle
Andrei Shkrob dd023b65c7 [android][sdk] Move cpp code into sdk lib
Signed-off-by: Andrei Shkrob <github@shkrob.dev>
2025-07-28 21:45:00 +02:00

35 lines
1.1 KiB
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 stdout = new ByteArrayOutputStream()
exec {
commandLine = cmd
standardOutput = stdout
}
return stdout.toString()
}
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']).trim())
def versionName = run([bash, '../tools/unix/version.sh', 'android_name']).trim()
return new Tuple2(versionCode, versionName)
}
rootProject.ext {
def ver = getVersion()
versionCode = ver.V1
versionName = ver.V2
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
}