Skip to content

Instantly share code, notes, and snippets.

@derohimat
Last active September 2, 2019 06:33
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 derohimat/b7832dc4973a125c289c804998519518 to your computer and use it in GitHub Desktop.
Save derohimat/b7832dc4973a125c289c804998519518 to your computer and use it in GitHub Desktop.
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'io.fabric'
android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
dexOptions {
maxProcessCount 4
preDexLibraries true
javaMaxHeapSize "8g"
}
defaultConfig {
defaultPublishConfig 'debug'
applicationId "co.example.app"
minSdkVersion 23
targetSdkVersion 29
versionCode 11
versionName '0.11'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
flavorDimensions "mode"
productFlavors {
beta {
dimension "mode"
applicationIdSuffix ".beta"
buildConfigField "boolean", "BETA", "true"
buildConfigField("String", "API_URL", "\"${BetaApiUrl}\"")
}
live {
dimension "mode"
buildConfigField "boolean", "BETA", "false"
buildConfigField("String", "API_URL", "\"${LiveApiUrl}\"")
}
}
buildTypes {
debug {
ext.alwaysUpdateBuildId = false
ext.enableCrashlytics = false
aaptOptions.cruncherEnabled = false
splits.abi.enable = false
splits.density.enable = false
}
release {
minifyEnabled false
shrinkResources false
debuggable false
ext.enableCrashlytics = true
ext.betaDistributionReleaseNotesFilePath = 'release_notes.txt'
ext.betaDistributionEmailsFilePath = "beta_distribution_emails.txt"
ext.betaDistributionNotifications = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
textOutput "stdout"
textReport true
checkAllWarnings true
warningsAsErrors true
showAll true
explainIssues true
abortOnError false
checkReleaseBuilds false
lintConfig file("$projectDir/lint.xml")
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'LICENSE.txt'
exclude 'META-INF/license/LICENSE.base64.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/rxjava.properties'
exclude 'isoparser-default.properties'
exclude 'version.txt'
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
bundle {
language {
enableSplit = false
}
}
crashlytics {
enableNdk true
}
}
configurations.all {
resolutionStrategy {
force 'com.squareup.okio:okio:2.3.0'
force 'com.squareup.okhttp3:okhttp:3.14.2'
}
}
apply from: 'dependencies.gradle'
dependencies {
implementation supportLibs
implementation networkLibs
implementation rxJavaLibs
implementation project(':qasdk')
//RxPermission for easy runtime permission management
implementation 'com.github.derohimat:RxPermissions:0.10.3'
implementation 'com.github.derohimat:sweet-alert-dialog:1.5.5'
implementation 'com.github.derohimat:CameraView:1.7.2'
implementation "com.jakewharton:butterknife:$versions.butterKnife"
implementation "com.google.dagger:dagger:$versions.dagger"
compileOnly 'org.glassfish:javax.annotation:10.0-b28'
implementation 'com.github.rjsvieira:circularView:1.3.3'
implementation 'com.romandanylyk:pageindicatorview:1.0.3'
implementation 'com.akexorcist:RoundCornerProgressBar:2.0.3'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.github.franmontiel:LocaleChanger:0.9.2'
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
implementation 'com.github.javiersantos:AppUpdater:2.7'
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout-solver:1.1.3'
// Work Manager
def work_version = "1.0.1"
implementation "android.arch.work:work-runtime:$work_version"
// APT dependencies
annotationProcessor "com.jakewharton:butterknife-compiler:$versions.butterKnife"
annotationProcessor daggerCompiler
implementation 'com.google.firebase:firebase-core:17.1.0'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true
}
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
}
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
jcenter()
mavenCentral()
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'io.fabric.tools:gradle:1.31.0'
classpath 'com.google.gms:google-services:4.3.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath 'io.realm:realm-gradle-plugin:5.13.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
google()
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
versions = [
okHttp : "3.14.2",
dagger : '2.22.1',
butterKnife: '10.1.0'
]
supportDeps = [
appcompatV7 : "androidx.appcompat:appcompat:1.0.2",
design : "com.google.android.material:material:1.0.0",
recyclerView : "androidx.recyclerview:recyclerview:1.0.0",
supportAnnotation : "androidx.annotation:annotation:1.1.0"
]
rxJava = [
rxAndroid: "io.reactivex.rxjava2:rxandroid:2.1.1"
]
okHttp = [
okhttp: "com.squareup.okhttp3:okhttp:$versions.okHttp"
]
supportLibs = supportDeps.values()
networkLibs = okHttp.values()
rxJavaLibs = rxJava.values()
daggerCompiler = "com.google.dagger:dagger-compiler:$versions.dagger"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment