Created
July 28, 2016 05:01
-
-
Save billyriantono/74038e59af73f74454b031bf69d810d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
def loadProperties(String sourceFileName) { | |
def config = new Properties() | |
def propFile = new File(sourceFileName) | |
if (propFile.canRead()) { | |
System.out.println("Loading property file: " + propFile.absolutePath) | |
config.load(new FileInputStream(propFile)) | |
for (Map.Entry property in config) { | |
System.out.println("setting " + property.key) | |
project.ext[property.key] = property.value; | |
} | |
return true; | |
} else { | |
System.err.println("Couldn't load property file: " + propFile.absolutePath) | |
return false; | |
} | |
} | |
buildscript { | |
repositories { | |
mavenCentral() | |
jcenter() | |
} | |
dependencies { | |
} | |
} | |
loadProperties("config.properties") | |
android { | |
compileSdkVersion 23 | |
buildToolsVersion "23.0.1" | |
sourceSets { | |
main { | |
jniLibs.srcDir 'jniLibs' | |
} | |
} | |
defaultConfig { | |
applicationId "com.riantono.devs" | |
minSdkVersion 16 | |
targetSdkVersion 23 | |
........ | |
resValue "string", "API_URL", project.ext.get("API_URL") | |
} | |
buildTypes { | |
debug { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
zipAlignEnabled false | |
shrinkResources false | |
} | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
zipAlignEnabled false | |
shrinkResources false | |
} | |
lintOptions { | |
abortOnError false | |
} | |
} | |
repositories { | |
mavenCentral() | |
jcenter() | |
} | |
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
testCompile 'junit:junit:4.12' | |
compile 'com.android.support:multidex:1.0.0' | |
compile 'com.android.support:appcompat-v7:23.1.0' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API_URL="https://themoviedb.org" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment