Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
custom build.gradle to support command line auto builder.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
if(project.hasProperty("serverbuild.properties")
&& new File(project.property("serverbuild.properties")).exists()) {
Properties props = new Properties()
props.load(new FileInputStream(file(project.property("serverbuild.properties"))))
android {
signingConfigs {
release {
storeFile file(props['keystore'])
storePassword props['keystore.password']
keyAlias "server"
keyPassword props['keystore.password']
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
if(project.hasProperty("build.parselday")
&& new File(project.property("build.parselday")).exists()) {
Properties p2 = new Properties()
p2.load(new FileInputStream(file(project.property("build.parselday"))))
ext.betaDistributionReleaseNotes = p2['relnotes']
ext.betaDistributionEmails = p2['emails']
}
}
}
lintOptions {
abortOnError false
}
}
} else {
android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.application.id"
minSdkVersion 14
targetSdkVersion 21
versionCode 5
versionName "2.0-beta-19"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.github.gcacace:signature-pad:1.0.1'
compile 'com.rengwuxian.materialedittext:library:2.0.3'
compile 'com.pixplicity.easyprefs:library:1.6'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.akexorcist:googledirectionlibrary:1.0.3'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile ('io.nlopez.smartlocation:library:3.2.0') {
transitive = false
}
compile 'io.realm:realm-android:0.87.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:percent:23.0.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment