Merge pull request #111 from gilbsgilbs/fdroid-build-flavor

Add F-Droid build flavor.
pull/113/head
Fox2Code 2 years ago committed by GitHub
commit 45d647953f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,6 +28,25 @@ android {
debuggable true
}
}
flavorDimensions "type"
productFlavors {
"default" {
dimension "type"
buildConfigField "boolean", "ENABLE_AUTO_UPDATER", "true"
}
fdroid {
dimension "type"
applicationIdSuffix ".fdroid"
// Need to disable auto-updater for F-Droid flavor because their inclusion policy
// forbids downloading blobs from third-party websites (and F-Droid APK isn't signed
// with our keys, so the APK wouldn't install anyways).
buildConfigField "boolean", "ENABLE_AUTO_UPDATER", "false"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8

@ -63,6 +63,8 @@ public class AppUpdateManager {
// Return true if should show a notification
public boolean checkUpdate(boolean force) {
if (!BuildConfig.ENABLE_AUTO_UPDATER)
return false;
if (!force && this.peekShouldUpdate())
return true;
long lastChecked = this.lastChecked;

Loading…
Cancel
Save