Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

F-droid flavour #887

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
applicationIdSuffix '.debug'
Expand All @@ -81,6 +80,21 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
flavorDimensions "version"
productFlavors {
productFlavors {
play {
dimension "version"
signingConfig signingConfigs.release
}
fdroid {
dimension "version"
// applicationIdSuffix ".fdroid"
versionNameSuffix ' (F-Droid)'

}
}
}
}

dependencies {
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/com/kabouzeid/gramophone/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ public void onBillingInitialized() {
}

public static boolean isProVersion() {
return BuildConfig.DEBUG || app.billingProcessor.isPurchased(PRO_VERSION_PRODUCT_ID);
if (BuildConfig.DEBUG || BuildConfig.FLAVOR.equals("fdroid")) {
return true;
}
return app.billingProcessor.isPurchased(PRO_VERSION_PRODUCT_ID);
}

private static OnProVersionChangedListener onProVersionChangedListener;
Expand Down