mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-12 19:07:28 -04:00
chore(build): prioritize injected version properties (#3043)
This commit is contained in:
@@ -61,9 +61,13 @@ android {
|
||||
applicationId = Configs.APPLICATION_ID
|
||||
minSdk = Configs.MIN_SDK
|
||||
targetSdk = Configs.TARGET_SDK
|
||||
// Prioritize ENV, then fallback to git commit count for versionCode
|
||||
versionCode = (System.getenv("VERSION_CODE") ?: gitVersionProvider.get()).toInt()
|
||||
versionName = System.getenv("VERSION_NAME") ?: Configs.VERSION_NAME_BASE
|
||||
// Prioritize injected props, then ENV, then fallback to git commit count
|
||||
versionCode = (project.findProperty("android.injected.version.code")?.toString()?.toInt()
|
||||
?: System.getenv("VERSION_CODE")?.toInt()
|
||||
?: gitVersionProvider.get().toInt())
|
||||
versionName = (project.findProperty("android.injected.version.name")?.toString()
|
||||
?: System.getenv("VERSION_NAME")
|
||||
?: Configs.VERSION_NAME_BASE)
|
||||
testInstrumentationRunner = "com.geeksville.mesh.TestRunner"
|
||||
buildConfigField("String", "MIN_FW_VERSION", "\"${Configs.MIN_FW_VERSION}\"")
|
||||
buildConfigField("String", "ABS_MIN_FW_VERSION", "\"${Configs.ABS_MIN_FW_VERSION}\"")
|
||||
|
||||
Reference in New Issue
Block a user