Gradle fix #978

Merged
akinwale merged 6 commits from gradle-fix into master 2020-08-19 19:09:37 +02:00
Showing only changes of commit e032b1b872 - Show all commits

View file

@ -1,12 +1,5 @@
import com.google.gms.googleservices.GoogleServicesPlugin import com.google.gms.googleservices.GoogleServicesPlugin
Properties twitterProps = new Properties()
try {
twitterProps.load(project.file('twitter.properties').newDataInputStream())
} catch (Exception ex) {
throw new GradleException("Missing twitter.properties.")
}
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
@ -50,10 +43,14 @@ android {
buildTypes { buildTypes {
debug { debug {
Properties twitterProps = new Properties()
twitterProps.load(project.file('twitter.properties').newDataInputStream())
resValue "string", "TWITTER_CONSUMER_KEY", "\"${twitterProps.getProperty("twitterConsumerKey")}\"" resValue "string", "TWITTER_CONSUMER_KEY", "\"${twitterProps.getProperty("twitterConsumerKey")}\""
resValue "string", "TWITTER_CONSUMER_SECRET", "\"${twitterProps.getProperty("twitterConsumerSecret")}\"" resValue "string", "TWITTER_CONSUMER_SECRET", "\"${twitterProps.getProperty("twitterConsumerSecret")}\""
} }
release { release {
Properties twitterProps = new Properties()
twitterProps.load(project.file('twitter.properties').newDataInputStream())
resValue "string", "TWITTER_CONSUMER_KEY", "\"${twitterProps.getProperty("twitterConsumerKey")}\"" resValue "string", "TWITTER_CONSUMER_KEY", "\"${twitterProps.getProperty("twitterConsumerKey")}\""
resValue "string", "TWITTER_CONSUMER_SECRET", "\"${twitterProps.getProperty("twitterConsumerSecret")}\"" resValue "string", "TWITTER_CONSUMER_SECRET", "\"${twitterProps.getProperty("twitterConsumerSecret")}\""
minifyEnabled false minifyEnabled false