Removed FlattrConfig

API credentials have been moved into gradle.properties
This commit is contained in:
daniel oeh 2014-08-06 18:47:54 +02:00
parent 5ae7371b2a
commit 04cb23acff
3 changed files with 12 additions and 9 deletions

View File

@ -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
}
}

View File

@ -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 = "";
}

View File

@ -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 {