Files
super-app/app/build.gradle
2020-03-31 21:59:51 +05:30

226 lines
7.3 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'maven'
apply plugin: 'com.google.firebase.crashlytics'
def BASE_URL = baseUrl()
def RAZORPAY_KEY = razorpayKey()
def VERSION_NAME = "1.0"
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.navi"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName VERSION_NAME
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
if (project.hasProperty('RELEASE_STORE_PASSWORD') && project.hasProperty('RELEASE_KEY_PASSWORD') && project.hasProperty('RELEASE_KEY_ALIAS')) {
storeFile file("navi-release-key.jks")
storePassword "$RELEASE_STORE_PASSWORD"
keyPassword "$RELEASE_KEY_PASSWORD"
keyAlias "$RELEASE_KEY_ALIAS"
}
}
}
buildTypes {
debug {
versionNameSuffix "-debug"
}
release {
// minifyEnabled true
// shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
dataBinding {
enabled true
}
flavorDimensions "app"
productFlavors {
qa {
dimension "app"
applicationId "com.navi.dev"
}
dev {
applicationId "com.navi.dev"
dimension "app"
}
prod {
dimension "app"
}
}
packagingOptions {
exclude 'META-INF'
}
}
android.buildTypes.each { type ->
type.buildConfigField 'String', 'BASE_URL', BASE_URL
type.buildConfigField 'String', 'RAZORPAY_KEY', RAZORPAY_KEY
}
def flavor() {
if (project.hasProperty('FLAVOR'))
return formatString("$FLAVOR")
else
return "DEV"
}
def baseUrl() {
if (project.hasProperty('BASE_URL'))
return formatString("$BASE_URL")
else if (flavor() == "QA")
return formatString("https://qa-api.navi.com/")
else
return formatString("https://dev-api.navi.com/")
}
def razorpayKey() {
if (project.hasProperty('RAZORPAY_KEY'))
return formatString("$RAZORPAY_KEY")
else if (flavor() == "QA")
return formatString("rzp_test_2AzdRR7RBQYvd5")
else
return formatString("rzp_test_fJz4xuuEDwtpjP")
}
static def formatString(String value) {
return '"' + value + '"'
}
artifacts {
if (project.hasProperty('FLAVOR')) {
if ("$FLAVOR" == "PROD")
archives file('build/outputs/apk/prod/release/app-prod-release.apk')
else if ("$FLAVOR" == "QA")
archives file('build/outputs/apk/qa/release/app-qa-release.apk')
else
archives file('build/outputs/apk/dev/release/app-dev-release.apk')
}
}
ext {
version_retrofit = '2.6.2'
version_kotlin_coroutines = '1.3.2'
lottie_version = '3.2.2'
}
repositories {
mavenCentral()
google()
}
uploadArchives {
repositories {
mavenDeployer {
if (project.hasProperty('NEXUS_URL') && project.hasProperty('FLAVOR')) {
repository(url: "$NEXUS_URL") {
authentication(userName: "$NEXUS_USERNAME", password: "$NEXUS_PASSWORD")
}
pom.version = "$FLAVOR-$VERSION_NAME-SNAPSHOT"
pom.artifactId = "android-customer-app"
pom.groupId = "com.navi"
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "com.squareup.retrofit2:retrofit:$version_retrofit"
implementation "com.squareup.retrofit2:converter-gson:$version_retrofit"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version_kotlin_coroutines"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version_kotlin_coroutines"
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation 'com.android.support:cardview-v7:29.0.2'
implementation 'com.android.support:design:29.0.2'
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'android.arch.work:work-runtime-ktx:1.0.1'
implementation 'com.camerakit:camerakit:1.0.0-beta3.11'
implementation 'com.camerakit:jpegkit:0.1.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.60'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
implementation "com.google.android.gms:play-services-location:17.0.0"
implementation 'com.github.bumptech.glide:glide:4.10.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
implementation 'com.otaliastudios:cameraview:2.6.0'
implementation 'com.facebook.stetho:stetho:1.5.1'
implementation("com.facebook.stetho:stetho-okhttp3:1.5.1") {
exclude group: 'com.facebook.stetho'
}
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation "com.airbnb.android:lottie:$lottie_version"
// for firebase push notification
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation group: 'joda-time', name: 'joda-time', version: '2.10.5'
implementation 'org.joda:joda-money:1.0.1'
// for razorpay payment integration
implementation 'com.razorpay:checkout:1.5.13'
//Appsflyer sdk integration
implementation 'com.appsflyer:af-android-sdk:5.1.0'
implementation 'com.android.installreferrer:installreferrer:1.0'
// Add the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics:17.2.3'
//Digio: for adhaar verification
implementation project(":digio-kyc-1.0.0")
// implementation 'com.squareup.okhttp3:okhttp:4.2.1'
//Digio e-nach
implementation project(":digio-esign-v2.6")
// Add the Firebase SDK for Crashlytics.
implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta02'
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
// Espresso dependencies
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
testImplementation 'org.mockito:mockito-core:2.19.0'
androidTestImplementation 'android.arch.core:core-testing:1.1.1'
testImplementation 'android.arch.core:core-testing:1.0.0'
testImplementation 'org.mockito:mockito-inline:2.13.0'
implementation "com.airbnb.android:lottie:$lottie_version"
// Pdf Viewer
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
}
apply plugin: 'com.google.gms.google-services'