mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
mobile: fix fdroid app version code
This commit is contained in:
@@ -139,6 +139,11 @@ def reactNativeArchitectures() {
|
|||||||
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def fdroidBuild() {
|
||||||
|
def value = project.getProperties().get("fdroidBuild")
|
||||||
|
return value ? value : false
|
||||||
|
}
|
||||||
|
|
||||||
def getNpmVersion() {
|
def getNpmVersion() {
|
||||||
def inputFile = file("$rootDir/../../package.json")
|
def inputFile = file("$rootDir/../../package.json")
|
||||||
def jsonPackage = new JsonSlurper().parseText(inputFile.text)
|
def jsonPackage = new JsonSlurper().parseText(inputFile.text)
|
||||||
@@ -280,18 +285,20 @@ android {
|
|||||||
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
|
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
|
||||||
def abi = output.getFilter(OutputFile.ABI)
|
def abi = output.getFilter(OutputFile.ABI)
|
||||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||||
output.versionCodeOverride =
|
if (fdroidBuild()) {
|
||||||
|
output.versionCodeOverride =
|
||||||
|
defaultConfig.versionCode * 5 + versionCodes.get(abi)
|
||||||
|
println("Version code: ${output.versionCodeOverride} for abi ${versionCodes.get(abi)}");
|
||||||
|
} else {
|
||||||
|
output.versionCodeOverride =
|
||||||
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
|
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -42,4 +42,7 @@ newArchEnabled=false
|
|||||||
|
|
||||||
# V8 Cache Mode Config
|
# V8 Cache Mode Config
|
||||||
# v8.cacheMode=none
|
# v8.cacheMode=none
|
||||||
# v8.android.tools.dir=/home/ammarahm-ed/Repos/notesnook-mobile/node_modules/v8-android-jit-nointl/dist/tools/android
|
# v8.android.tools.dir=/home/ammarahm-ed/Repos/notesnook-mobile/node_modules/v8-android-jit-nointl/dist/tools/android
|
||||||
|
|
||||||
|
# fdroid
|
||||||
|
fdroidBuild=false
|
||||||
3
fastlane/metadata/android/en-US/changelogs/10139.txt
Normal file
3
fastlane/metadata/android/en-US/changelogs/10139.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
- Bug fixes
|
||||||
|
|
||||||
|
Thank you for using Notesnook!
|
||||||
Reference in New Issue
Block a user