diff --git a/app/build.gradle b/app/build.gradle index 71530586cd..abd1f8cf45 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,6 +14,11 @@ android { } buildTypes { + + all { + buildConfigField "String", "API_KEY_1", TWITTER_CONSUMER_KEY + buildConfigField "String", "API_KEY_2", TWITTER_CONSUMER_SECRET + } release { debuggable false minifyEnabled true diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/TwitterEngine.java b/app/src/main/java/org/nuclearfog/twidda/backend/TwitterEngine.java index 34f393a8b0..11dede32db 100644 --- a/app/src/main/java/org/nuclearfog/twidda/backend/TwitterEngine.java +++ b/app/src/main/java/org/nuclearfog/twidda/backend/TwitterEngine.java @@ -3,6 +3,7 @@ import android.content.Context; import android.support.annotation.Nullable; +import org.nuclearfog.twidda.BuildConfig; import org.nuclearfog.twidda.backend.items.Message; import org.nuclearfog.twidda.backend.items.Trend; import org.nuclearfog.twidda.backend.items.Tweet; @@ -35,8 +36,8 @@ public class TwitterEngine { private static TwitterEngine mTwitter; - private final String TWITTER_CONSUMER_KEY = "QAJXMoaJ9kAhwhpPKmRB94ijK"; - private final String TWITTER_CONSUMER_SECRET = "NDLiQzlXfuhAox5XibKvF7mC4YRJqjqGZCff9rsPKS7VmwUjRG"; + private final String TWITTER_CONSUMER_KEY = BuildConfig.API_KEY_1; + private final String TWITTER_CONSUMER_SECRET = BuildConfig.API_KEY_2; private String redirectionUrl; private long twitterID;