Remove donation dialog
Since OpenKeychain is in no longer actively developed, we might as well drop the donation dialog.
This commit is contained in:
parent
0135d44fc6
commit
6e07cc4bd6
|
@ -16,7 +16,6 @@ dependencies {
|
|||
implementation 'com.journeyapps:zxing-android-embedded:3.4.0'
|
||||
implementation 'com.google.zxing:core:3.4.0'
|
||||
implementation 'org.commonjava.googlecode.markdown4j:markdown4j:2.2-cj-1.1'
|
||||
implementation 'org.sufficientlysecure:donations:2.5'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
|
||||
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.14.9'
|
||||
implementation 'org.apache.james:apache-mime4j-core:0.8.1'
|
||||
|
@ -171,37 +170,6 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
flavorDimensions("freedom")
|
||||
|
||||
productFlavors {
|
||||
google {
|
||||
dimension "freedom"
|
||||
buildConfigField "boolean", "DONATIONS_GOOGLE", "true"
|
||||
buildConfigField "String", "GOOGLE_PLAY_PUBKEY", "\"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwX9SOQ/EL4u5pvbYmYMagN5DDenuSaMaVs2cVPzqxMaIHp6/9/nGuzj2/CpcB4ASd2vvfLlE9tZRkPmFTULWc4Sp4OR+JenQufZZr7Y8WGPkFyqd+dOxhIqKKLtH1QuqSyhby3gEMlWzydJY3rHXlH2Bpu65Uroawq76nynnELXNlzsCM231XWgj4HA87qxv9hSWLCpu16wKxZIX3d6mwZLZmGF+xYJAzVr291oDYYl+h6BDoIcAfmQFsv5MexNwBFO+TLVrvL0e5qdGHZxwwD1/68VSY8FxAEfM+yq7jovdVSdcXlJQjZrV5TRDdFWrtEB6njGA3YZWXP6B6MMMoQIDAQAB\""
|
||||
buildConfigField "String", "PAYPAL_USER", "null"
|
||||
buildConfigField "String", "PAYPAL_CURRENCY_CODE", "null"
|
||||
buildConfigField "String", "BITCOIN_ADDRESS", "null"
|
||||
buildConfigField "String", "FLATTR_PROJECT_URL", "null"
|
||||
buildConfigField "String", "FLATTR_URL", "null"
|
||||
}
|
||||
fdroid {
|
||||
dimension "freedom"
|
||||
buildConfigField "boolean", "DONATIONS_GOOGLE", "false"
|
||||
buildConfigField "String", "GOOGLE_PLAY_PUBKEY", "null"
|
||||
buildConfigField "String", "PAYPAL_USER", "\"android@schuermann.eu\""
|
||||
buildConfigField "String", "PAYPAL_CURRENCY_CODE", "\"EUR\""
|
||||
buildConfigField "String", "BITCOIN_ADDRESS", "\"1LY6Hs6SurATjfxnihzLMDUMUuMxvQ4aEi\""
|
||||
buildConfigField "String", "FLATTR_PROJECT_URL", "\"https://www.openkeychain.org\""
|
||||
buildConfigField "String", "FLATTR_URL", "\"flattr.com/submit/auto?fid=4vzg0p&url=https%3A%2F%2Fwww.openkeychain.org\""
|
||||
}
|
||||
}
|
||||
|
||||
variantFilter { variant ->
|
||||
if(variant.buildType.name == 'debug' && variant.getFlavors().get(0).name == 'google') {
|
||||
variant.setIgnore(true)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* To sign release build, create file gradle.properties in ~/.gradle/ with this content:
|
||||
*
|
||||
|
|
|
@ -26,9 +26,6 @@ import android.view.View;
|
|||
|
||||
import com.astuetz.PagerSlidingTabStrip;
|
||||
|
||||
import org.sufficientlysecure.donations.DonationsFragment;
|
||||
import org.sufficientlysecure.keychain.BuildConfig;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.adapter.PagerTabStripAdapter;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
|
@ -40,16 +37,10 @@ public class HelpActivity extends BaseActivity {
|
|||
public static final int TAB_START = 0;
|
||||
public static final int TAB_CONFIRM = 1;
|
||||
public static final int TAB_FAQ = 2;
|
||||
public static final int TAB_DONATE = 3;
|
||||
public static final int TAB_CHANGELOG = 4;
|
||||
public static final int TAB_LICENSES = 5;
|
||||
public static final int TAB_ABOUT = 6;
|
||||
|
||||
// Google Play
|
||||
private static final String[] GOOGLE_PLAY_CATALOG = new String[]{"keychain.donation.1",
|
||||
"keychain.donation.2", "keychain.donation.3", "keychain.donation.5", "keychain.donation.10",
|
||||
"keychain.donation.50", "keychain.donation.100"};
|
||||
|
||||
private PagerTabStripAdapter mTabsAdapter;
|
||||
|
||||
@Override
|
||||
|
@ -91,29 +82,6 @@ public class HelpActivity extends BaseActivity {
|
|||
mTabsAdapter.addTab(HelpMarkdownFragment.class, faqBundle,
|
||||
getString(R.string.help_tab_faq));
|
||||
|
||||
Bundle donationsBundle = new Bundle();
|
||||
donationsBundle.putBoolean(DonationsFragment.ARG_DEBUG, Constants.DEBUG);
|
||||
if (BuildConfig.DONATIONS_GOOGLE) {
|
||||
donationsBundle.putBoolean(DonationsFragment.ARG_GOOGLE_ENABLED, true);
|
||||
donationsBundle.putString(DonationsFragment.ARG_GOOGLE_PUBKEY, BuildConfig.GOOGLE_PLAY_PUBKEY);
|
||||
donationsBundle.putStringArray(DonationsFragment.ARG_GOOGLE_CATALOG, GOOGLE_PLAY_CATALOG);
|
||||
donationsBundle.putStringArray(DonationsFragment.ARG_GOOGLE_CATALOG_VALUES,
|
||||
getResources().getStringArray(R.array.help_donation_google_catalog_values));
|
||||
} else {
|
||||
donationsBundle.putBoolean(DonationsFragment.ARG_PAYPAL_ENABLED, true);
|
||||
donationsBundle.putString(DonationsFragment.ARG_PAYPAL_CURRENCY_CODE, BuildConfig.PAYPAL_CURRENCY_CODE);
|
||||
donationsBundle.putString(DonationsFragment.ARG_PAYPAL_USER, BuildConfig.PAYPAL_USER);
|
||||
donationsBundle.putString(DonationsFragment.ARG_PAYPAL_ITEM_NAME,
|
||||
getString(R.string.help_donation_paypal_item));
|
||||
donationsBundle.putBoolean(DonationsFragment.ARG_FLATTR_ENABLED, true);
|
||||
donationsBundle.putString(DonationsFragment.ARG_FLATTR_PROJECT_URL, BuildConfig.FLATTR_PROJECT_URL);
|
||||
donationsBundle.putString(DonationsFragment.ARG_FLATTR_URL, BuildConfig.FLATTR_URL);
|
||||
donationsBundle.putBoolean(DonationsFragment.ARG_BITCOIN_ENABLED, true);
|
||||
donationsBundle.putString(DonationsFragment.ARG_BITCOIN_ADDRESS, BuildConfig.BITCOIN_ADDRESS);
|
||||
}
|
||||
mTabsAdapter.addTab(DonationsFragment.class, donationsBundle,
|
||||
getString(R.string.help_tab_donations));
|
||||
|
||||
Bundle changelogBundle = new Bundle();
|
||||
changelogBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_RES, R.raw.help_changelog);
|
||||
mTabsAdapter.addTab(HelpMarkdownFragment.class, changelogBundle,
|
||||
|
@ -144,19 +112,4 @@ public class HelpActivity extends BaseActivity {
|
|||
intent.putExtra(HelpActivity.EXTRA_SELECTED_TAB, code);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Needed for Google Play In-app Billing. It uses startIntentSenderForResult(). The result is not propagated to
|
||||
* the Fragment like in startActivityForResult(). Thus we need to propagate manually to our Fragment.
|
||||
*/
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
Fragment fragment = mTabsAdapter.getRegisteredFragment(TAB_DONATE);
|
||||
if (fragment != null) {
|
||||
fragment.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
10
README.md
10
README.md
|
@ -51,18 +51,16 @@ Expand the Tools directory and select "Android SDK Build-tools (Version 27.0.3)"
|
|||
Expand the Extras directory and install "Android Support Library", as well as "Local Maven repository for Support Libraries"
|
||||
Select SDK Platform for API levels 27.
|
||||
5. Export ANDROID_HOME pointing to your Android SDK
|
||||
6. Execute ``./gradlew assembleFdroidDebug``
|
||||
7. You can install the app with ``adb install -r OpenKeychain/build/outputs/apk/OpenKeychain-fdroid-debug.apk``
|
||||
|
||||
The "google" flavor is only used to include donations via Play Store, for development the "fdroid" flavor should be used.
|
||||
6. Execute ``./gradlew assembleDebug``
|
||||
7. You can install the app with ``adb install -r OpenKeychain/build/outputs/apk/OpenKeychain-debug.apk``
|
||||
|
||||
### Run Tests
|
||||
1. Use OpenJDK instead of Oracle JDK
|
||||
2. Execute ``./gradlew clean testFdroidDebugUnitTest --continue``
|
||||
2. Execute ``./gradlew clean testDebugUnitTest --continue``
|
||||
|
||||
### Run Jacoco Test Coverage
|
||||
1. Use OpenJDK instead of Oracle JDK
|
||||
2. Execute ``./gradlew clean testFdroidDebugUnitTest jacocoTestReport``
|
||||
2. Execute ``./gradlew clean testDebugUnitTest jacocoTestReport``
|
||||
3. Report is here: OpenKeychain/build/reports/jacoco/jacocoTestReport/html/index.html
|
||||
|
||||
### Development with Android Studio
|
||||
|
|
Loading…
Reference in New Issue