Skip to content

Instantly share code, notes, and snippets.

View pratheepchowdhary's full-sized avatar

Pratheep Kanati pratheepchowdhary

View GitHub Profile
TMDB_API_KEY=yourkeys
FACEBOOK_API_KEY=yourkeys
NEWS_URL=http://www.yoursite.com/?tag=jrntr
IMAGE_URL=http://www.yoursite.com/images/
ARTICLE_URL=http://www.yoursite.com/?url=
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']
buildTypes {
release {
minifyEnabled true
shrinkResources true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
jniDebuggable false
renderscriptDebuggable false
pseudoLocalesEnabled false
zipAlignEnabled true
defaultConfig {
applicationId "com.pradeep.ntr"
minSdkVersion 19
targetSdkVersion 26
versionCode 12
versionName "2.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
//we can delclare the key inside the place holder to access key in android manifest
manifestPlaceholders = [FACEBOOK_API_KEY:'FACEBOOK_API_KEY'
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
String facebookKey=BuildConfig.FACEBOOK_APP_KEY;
String tmdKey=BuildConfig.TMDB_API_KEY;
String imgURL=BuildConfig.IMAGE_URL;
apply plugin: 'com.android.application'
android {
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
android {
splits {
// Configures multiple APKs based on ABI.
abi {
// Enables building multiple APKs per ABI.
enable true
// By default all ABIs are included, so use reset() and include to specify that we only
android {
splits {
abi {
def isReleaseBuild = false
gradle.startParameter.taskNames.find {
// Enable split for release builds in different build flavors
// (assemblePaidRelease, assembleFreeRelease, etc.).
if (it ==~ /:app:assemble.*Release/) {
isReleaseBuild = true
import com.android.build.OutputFile
android {
splits {
//...
}
// Map for the version code that gives each ABI a value.
def abiCodes = ['x86':1, 'x86_64':2, 'armeabi-v7a':3, 'arm64-v8a':4]