Skip to content

Instantly share code, notes, and snippets.

@pratheepchowdhary
Created May 13, 2018 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pratheepchowdhary/4417de4813d18c4437265ab09ed58d1f to your computer and use it in GitHub Desktop.
Save pratheepchowdhary/4417de4813d18c4437265ab09ed58d1f to your computer and use it in GitHub Desktop.
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
android {
compileSdkVersion 26
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.pradeep.ntr"
minSdkVersion 19
targetSdkVersion 26
versionCode 12
versionName "2.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
manifestPlaceholders = [FACEBOOK_API_KEY:'FACEBOOK_API_KEY'
]
resConfigs "en"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
jniDebuggable false
renderscriptDebuggable false
pseudoLocalesEnabled false
zipAlignEnabled true
buildConfigField("String", "TMDB_API_KEY", "\"" + getTMDBApiKey() + "\"")
buildConfigField("String", "FACEBOOK_API_KEY", "\"" + getFACEBOOKApiKey() + "\"")
buildConfigField("String", "NEWS_URL", "\"" + getNewsURL() + "\"")
buildConfigField("String", "IMAGE_URL", "\"" + getImageURL() + "\"")
buildConfigField("String", "ARTICLE_URL", "\"" + getArticleUrl() + "\"")
}
debug {
buildConfigField("String", "TMDB_API_KEY", "\"" + getTMDBApiKey() + "\"")
buildConfigField("String", "FACEBOOK_API_KEY", "\"" + getFACEBOOKApiKey() + "\"")
buildConfigField("String", "NEWS_URL", "\"" + getNewsURL() + "\"")
buildConfigField("String", "IMAGE_URL", "\"" + getImageURL() + "\"")
buildConfigField("String", "ARTICLE_URL", "\"" + getArticleUrl() + "\"")
}
}
}
static def getArticleUrl() {
def Properties props = new Properties()
props.load(new FileInputStream(new File('secrets.properties')))
return props['ARTICLE_URL']
}
static def getTMDBApiKey() {
def Properties props = new Properties()
props.load(new FileInputStream(new File('secrets.properties')))
return props['TMDB_API_KEY']
}
static def getFACEBOOKApiKey() {
def Properties props = new Properties()
props.load(new FileInputStream(new File('secrets.properties')))
return props['FACEBOOK_API_KEY']
}
static def getNewsURL() {
def Properties props = new Properties()
props.load(new FileInputStream(new File('secrets.properties')))
return props['NEWS_URL']
}
static def getImageURL() {
def Properties props = new Properties()
props.load(new FileInputStream(new File('secrets.properties')))
return props['IMAGE_URL']
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
ext {
frescoVersion = '1.2.0' }
compile files('libs/ViewpagerAnimation.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile project(':frescoimageviewers')
compile files('libs/jsoup-1.7.1.jar')
compile project(':MaterialSearchView')
compile project(':swipbacklib')
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.android.volley:volley:1.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.23.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:customtabs:27.0.2'
}
uploadArchives.enabled = false
apply plugin: 'com.google.gms.google-services'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment