diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-08-06 18:47:54 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-08-06 18:47:54 +0200 |
commit | 04cb23acffcf68d1fcda5ee0c8ebf7f9d8557d5f (patch) | |
tree | 8d9405345b4a4fd10e18ad8075e2fbd2f2e8a89b | |
parent | 5ae7371b2a6f20d82a6b8cc4f7348a257dd1d54c (diff) | |
download | AntennaPod-04cb23acffcf68d1fcda5ee0c8ebf7f9d8557d5f.zip |
Removed FlattrConfig
API credentials have been moved into gradle.properties
-rw-r--r-- | build.gradle | 10 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/util/flattr/FlattrConfig.java.example | 7 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/util/flattr/FlattrUtils.java | 4 |
3 files changed, 12 insertions, 9 deletions
diff --git a/build.gradle b/build.gradle index f0df351b9..441b17385 100644 --- a/build.gradle +++ b/build.gradle @@ -89,13 +89,23 @@ android { } buildTypes { + def STRING = "String" + def FLATTR_APP_KEY = "FLATTR_APP_KEY" + def FLATTR_APP_SECRET = "FLATTR_APP_SECRET" + def mFlattrAppKey = (project.hasProperty('flattrAppKey')) ? flattrAppKey : "\"\"" + def mFlattrAppSecret = (project.hasProperty('flattrAppSecret')) ? flattrAppSecret : "\"\"" + debug { applicationIdSuffix ".debug" + buildConfigField STRING, FLATTR_APP_KEY, mFlattrAppKey + buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret } release { runProguard true proguardFile 'proguard.cfg' signingConfig signingConfigs.releaseConfig + buildConfigField STRING, FLATTR_APP_KEY, mFlattrAppKey + buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret } } diff --git a/src/de/danoeh/antennapod/util/flattr/FlattrConfig.java.example b/src/de/danoeh/antennapod/util/flattr/FlattrConfig.java.example deleted file mode 100644 index da16069ec..000000000 --- a/src/de/danoeh/antennapod/util/flattr/FlattrConfig.java.example +++ /dev/null @@ -1,7 +0,0 @@ -package de.danoeh.antennapod.util.flattr; - -/** Contains credentials to access the Flattr API*/ -public class FlattrConfig { - static final String APP_KEY = ""; - static final String APP_SECRET = ""; -} diff --git a/src/de/danoeh/antennapod/util/flattr/FlattrUtils.java b/src/de/danoeh/antennapod/util/flattr/FlattrUtils.java index 9809f69a3..202e3d304 100644 --- a/src/de/danoeh/antennapod/util/flattr/FlattrUtils.java +++ b/src/de/danoeh/antennapod/util/flattr/FlattrUtils.java @@ -43,8 +43,8 @@ public class FlattrUtils { private static volatile AccessToken cachedToken; private static AndroidAuthenticator createAuthenticator() { - return new AndroidAuthenticator(HOST_NAME, FlattrConfig.APP_KEY, - FlattrConfig.APP_SECRET); + return new AndroidAuthenticator(HOST_NAME, BuildConfig.FLATTR_APP_KEY, + BuildConfig.FLATTR_APP_SECRET); } public static void startAuthProcess(Context context) throws FlattrException { |