342 lines
13 KiB
Groovy
342 lines
13 KiB
Groovy
plugins {
|
|
alias libs.plugins.android.application
|
|
alias libs.plugins.baseline.profile
|
|
alias libs.plugins.firebase.crashlytics
|
|
alias libs.plugins.firebase.perf
|
|
alias libs.plugins.google.services
|
|
alias libs.plugins.hilt.android
|
|
alias libs.plugins.kotlin.android
|
|
alias libs.plugins.kotlin.compose
|
|
alias libs.plugins.kotlin.kapt
|
|
alias libs.plugins.kotlin.parcelize
|
|
alias libs.plugins.kotlin.serialization
|
|
alias libs.plugins.ksp
|
|
alias libs.plugins.maven.publish
|
|
alias libs.plugins.facebook.react
|
|
}
|
|
|
|
def VERSION_CODE = 471
|
|
def VERSION_NAME = "5.33.0"
|
|
|
|
android {
|
|
namespace 'com.naviapp'
|
|
compileSdk 35
|
|
|
|
defaultConfig {
|
|
applicationId "com.naviapp"
|
|
minSdk 24
|
|
targetSdk 34
|
|
versionCode VERSION_CODE
|
|
versionName VERSION_NAME
|
|
|
|
multiDexEnabled true
|
|
resourceConfigurations += ['en']
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
|
resValue 'string', 'build_config_package', 'com.naviapp'
|
|
}
|
|
|
|
signingConfigs {
|
|
debug {
|
|
if (project.hasProperty('RELEASE_STORE_PASSWORD')
|
|
&& project.hasProperty('RELEASE_KEY_ALIAS')
|
|
&& project.hasProperty('RELEASE_KEY_PASSWORD')
|
|
) {
|
|
storeFile file("navi-release-key.jks")
|
|
storePassword "$RELEASE_STORE_PASSWORD"
|
|
keyAlias "$RELEASE_KEY_ALIAS"
|
|
keyPassword "$RELEASE_KEY_PASSWORD"
|
|
} else {
|
|
storeFile file("../keystore/navi-non-prod-release-key.jks")
|
|
storePassword "tPGSdwWiUkmH0Xr2MyVHHLVkdCCMOIU97SL_HUuyATmKEMx8ys4mp_JYCuFV94G7"
|
|
keyAlias "key0"
|
|
keyPassword "At3yvOS6w-1OlNZQd1nk_5kYkPKa2lklHxHZ_FMKOGgKD28z_QMdCNjoFXWg-dRz"
|
|
}
|
|
}
|
|
release {
|
|
if (project.hasProperty('RELEASE_STORE_PASSWORD')
|
|
&& project.hasProperty('RELEASE_KEY_ALIAS')
|
|
&& project.hasProperty('RELEASE_KEY_PASSWORD')
|
|
) {
|
|
storeFile file("navi-release-key.jks")
|
|
storePassword "$RELEASE_STORE_PASSWORD"
|
|
keyAlias "$RELEASE_KEY_ALIAS"
|
|
keyPassword "$RELEASE_KEY_PASSWORD"
|
|
} else {
|
|
storeFile file("../keystore/navi-non-prod-release-key.jks")
|
|
storePassword "tPGSdwWiUkmH0Xr2MyVHHLVkdCCMOIU97SL_HUuyATmKEMx8ys4mp_JYCuFV94G7"
|
|
keyAlias "key0"
|
|
keyPassword "At3yvOS6w-1OlNZQd1nk_5kYkPKa2lklHxHZ_FMKOGgKD28z_QMdCNjoFXWg-dRz"
|
|
}
|
|
}
|
|
}
|
|
androidResources {
|
|
ignoreAssetsPattern '!yolov5n_224x224_Lite.tflite'
|
|
}
|
|
buildFeatures {
|
|
compose true
|
|
dataBinding true
|
|
}
|
|
buildTypes {
|
|
debug {
|
|
versionNameSuffix "-debug"
|
|
testCoverageEnabled = true
|
|
manifestPlaceholders = [branchMode: 'true']
|
|
FirebasePerformance {
|
|
instrumentationEnabled false
|
|
}
|
|
testCoverageEnabled false
|
|
signingConfig signingConfigs.debug
|
|
matchingFallbacks = ['debug']
|
|
resValue 'string', 'build_config_package', 'com.naviapp.dev'
|
|
}
|
|
benchmark {
|
|
initWith release
|
|
debuggable false
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'retrofit2.pro', 'alfred.pro', 'courier.pro', 'adverse.pro'
|
|
matchingFallbacks = ['release']
|
|
signingConfig signingConfigs.debug
|
|
manifestPlaceholders = [branchMode: 'false']
|
|
resValue 'string', 'build_config_package', 'com.naviapp.dev'
|
|
}
|
|
release {
|
|
debuggable false
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'retrofit2.pro', 'alfred.pro', 'courier.pro', 'adverse.pro'
|
|
signingConfig signingConfigs.release
|
|
manifestPlaceholders = [branchMode: 'false']
|
|
matchingFallbacks = ['release']
|
|
resValue 'string', 'build_config_package', 'com.naviapp'
|
|
}
|
|
}
|
|
bundle {
|
|
abi {
|
|
enableSplit = true
|
|
}
|
|
density {
|
|
enableSplit = true
|
|
}
|
|
language {
|
|
enableSplit = false
|
|
}
|
|
}
|
|
compileOptions {
|
|
incremental true
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
freeCompilerArgs += ["-Xstring-concat=inline"]
|
|
jvmTarget = '17'
|
|
}
|
|
lint {
|
|
disable 'NullSafeMutableLiveData'
|
|
}
|
|
packagingOptions {
|
|
jniLibs {
|
|
pickFirsts += "**/libjsi.so"
|
|
useLegacyPackaging = true
|
|
}
|
|
resources {
|
|
excludes += ['META-INF']
|
|
excludes += "DebugProbesKt.bin"
|
|
}
|
|
}
|
|
sourceSets {
|
|
release {
|
|
java.srcDirs = ['src/main/java', 'src/release/java']
|
|
}
|
|
debug {
|
|
java.srcDirs = ['src/main/java', 'src/debug/java']
|
|
}
|
|
}
|
|
testOptions {
|
|
unitTests.returnDefaultValues = true
|
|
}
|
|
flavorDimensions = ["app"]
|
|
productFlavors {
|
|
qa {
|
|
isDefault true
|
|
dimension "app"
|
|
applicationId "com.naviapp.dev"
|
|
buildConfigField 'String', 'ADS_ANALYTICS_BASE_URL', formatString('https://dev-ads-janus.np.navi-sa.in/')
|
|
buildConfigField 'String', 'ALFRED_API_KEY', formatString('oMv77fgpBg9NFGom0Psizbf7lbrdBVJz')
|
|
buildConfigField 'String', 'APPSFLYER_KEY', formatString('ua6cppJ9oQx7aPQPNyHrHA')
|
|
buildConfigField 'String', 'PULSE_BASE_URL', formatString('https://dev-janus.np.navi-tech.in/')
|
|
buildConfigField 'String', 'MQTT_PASSWORD', formatString('testUser@123')
|
|
buildConfigField 'String', 'MQTT_USERNAME', formatString('henry')
|
|
buildConfigField 'String', 'SSL_PINNING_KEY', formatString('sha256/nUU7NjGrGo/mxijjsX+MHerUbpIHBidF8LAYOEPFWA8=')
|
|
manifestPlaceholders = [
|
|
FACEBOOK_APP_ID: "238258890564574",
|
|
TRUECALLER_KEY : "yicxl1xh6jidagslpi0h9d-uklfeinnx4a6mb6rdgyi"
|
|
]
|
|
resValue 'string', 'CodePushDeploymentKey', formatString('QLh2ypE_wVIAdp9rcSPIkbdxwKgPijXyGpKX_')
|
|
resValue 'string', 'build_config_package', 'com.naviapp.dev'
|
|
}
|
|
prod {
|
|
dimension "app"
|
|
if (project.hasProperty('ADS_ANALYTICS_BASE_URL')
|
|
&& project.hasProperty('ALFRED_API_KEY')
|
|
&& project.hasProperty('APPSFLYER_KEY')
|
|
&& project.hasProperty('MQTT_PASSWORD')
|
|
&& project.hasProperty('MQTT_USERNAME')
|
|
&& project.hasProperty('PULSE_BASE_URL')
|
|
&& project.hasProperty('SSL_PINNING_KEY')
|
|
&& project.hasProperty('FACEBOOK_APP_ID')
|
|
&& project.hasProperty('TRUECALLER_KEY')
|
|
&& project.hasProperty('CODEPUSH_DEPLOYMENT_KEY')
|
|
) {
|
|
buildConfigField 'String', 'ADS_ANALYTICS_BASE_URL', formatString("$ADS_ANALYTICS_BASE_URL")
|
|
buildConfigField 'String', 'ALFRED_API_KEY', formatString("$ALFRED_API_KEY")
|
|
buildConfigField 'String', 'APPSFLYER_KEY', formatString("$APPSFLYER_KEY")
|
|
buildConfigField 'String', 'MQTT_PASSWORD', formatString("$MQTT_PASSWORD")
|
|
buildConfigField 'String', 'MQTT_USERNAME', formatString("$MQTT_USERNAME")
|
|
buildConfigField 'String', 'PULSE_BASE_URL', formatString("$PULSE_BASE_URL")
|
|
buildConfigField 'String', 'SSL_PINNING_KEY', formatString("$SSL_PINNING_KEY")
|
|
manifestPlaceholders = [
|
|
FACEBOOK_APP_ID: "$FACEBOOK_APP_ID",
|
|
TRUECALLER_KEY : "$TRUECALLER_KEY"
|
|
]
|
|
resValue "string", 'CodePushDeploymentKey', formatString("$CODEPUSH_DEPLOYMENT_KEY")
|
|
resValue 'string', 'build_config_package', 'com.naviapp'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static def formatString(String value) {
|
|
return '"' + value + '"'
|
|
}
|
|
|
|
project.ext.react = [
|
|
entryFile : "index.js",
|
|
enableHermes : true, // clean and rebuild if changing
|
|
newArchEnabled: false
|
|
]
|
|
|
|
project.ext.envConfigFiles = [
|
|
qa : ".env.qa",
|
|
benchmark : ".env.benchmark",
|
|
production: ".env.prod"
|
|
]
|
|
|
|
publishing {
|
|
repositories {
|
|
if (project.hasProperty('NEXUS_URL')
|
|
&& project.hasProperty('NEXUS_USERNAME')
|
|
&& project.hasProperty('NEXUS_PASSWORD')
|
|
) {
|
|
maven {
|
|
url = "$NEXUS_URL"
|
|
credentials {
|
|
username = "$NEXUS_USERNAME"
|
|
password = "$NEXUS_PASSWORD"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
if (project.hasProperty('FLAVOR')) {
|
|
maven(MavenPublication) {
|
|
artifactId = "$FLAVOR"
|
|
groupId = "com.naviapp"
|
|
version = "navi_v$VERSION_NAME"
|
|
|
|
artifact("build/outputs/bundle/prodRelease/app-prod-release.aab")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(":navi-amc")
|
|
implementation project(":navi-ap")
|
|
implementation project(":navi-bbps")
|
|
implementation project(":navi-chat")
|
|
implementation project(":navi-coin")
|
|
implementation project(":navi-cycs")
|
|
implementation project(":navi-gold")
|
|
implementation project(":navi-insurance")
|
|
implementation project(":navi-money-manager")
|
|
implementation project(":navi-mqtt")
|
|
implementation project(":navi-pay")
|
|
implementation project(":navi-payment")
|
|
implementation project(":navi-rr")
|
|
implementation libs.accompanist.systemuicontroller
|
|
implementation libs.android.gms.playServicesAds
|
|
implementation libs.android.gms.playServicesAuthApiPhone
|
|
implementation libs.android.installreferrer
|
|
implementation libs.android.material
|
|
implementation libs.androidx.activity.activity
|
|
implementation libs.androidx.annotation
|
|
implementation libs.androidx.appcompat
|
|
implementation libs.androidx.browser
|
|
implementation libs.androidx.constraintlayout
|
|
implementation libs.androidx.core.ktx
|
|
implementation libs.androidx.core.splashscreen
|
|
implementation libs.androidx.fragment.ktx
|
|
implementation libs.androidx.compose.runtime.livedata
|
|
implementation libs.androidx.lifecycle.viewmodel.ktx
|
|
implementation libs.androidx.multidex
|
|
implementation libs.androidx.profileinstaller
|
|
implementation libs.androidx.ui.viewbinding
|
|
implementation libs.androidx.work.runtimeKtx
|
|
implementation libs.branch
|
|
implementation libs.coil.svg
|
|
implementation libs.dagger.hiltAndroid
|
|
implementation libs.facebook.applinks
|
|
implementation libs.kotlinx.serialization.json
|
|
implementation libs.navi.traceflow
|
|
implementation libs.raamcosta.composeDestinations.animation.core
|
|
implementation libs.truecaller
|
|
|
|
debugImplementation libs.androidx.compose.ui.test.junit4
|
|
debugImplementation libs.androidx.compose.ui.test.manifest
|
|
debugImplementation libs.androidx.test.monitor
|
|
debugImplementation libs.hyperion.attr
|
|
debugImplementation libs.hyperion.buildConfig
|
|
debugImplementation libs.hyperion.core
|
|
debugImplementation libs.hyperion.disk
|
|
debugImplementation libs.hyperion.geigerCounter
|
|
debugImplementation libs.hyperion.measurement
|
|
debugImplementation libs.hyperion.phoenix
|
|
debugImplementation libs.hyperion.recorder
|
|
debugImplementation libs.hyperion.sharedPreferences
|
|
debugImplementation libs.hyperion.simpleItem
|
|
debugImplementation libs.hyperion.timber
|
|
|
|
releaseImplementation libs.hyperion.coreNoOp
|
|
|
|
androidTestImplementation libs.androidx.arch.core.testing
|
|
androidTestImplementation(libs.androidx.test.espresso.contrib) {
|
|
exclude(group: "com.google.protobuf", module: "protobuf-lite")
|
|
}
|
|
androidTestImplementation libs.androidx.test.espresso.core
|
|
androidTestImplementation libs.androidx.test.espresso.intents
|
|
androidTestImplementation libs.androidx.test.espresso.web
|
|
androidTestImplementation libs.androidx.test.junit
|
|
androidTestImplementation libs.androidx.test.rules
|
|
androidTestImplementation libs.androidx.test.runner
|
|
|
|
testImplementation libs.androidx.arch.core.testing
|
|
testImplementation libs.junit
|
|
testImplementation libs.mockk
|
|
|
|
ksp libs.androidx.hilt.compiler
|
|
ksp libs.androidx.room.compiler
|
|
ksp libs.dagger.hiltCompiler
|
|
ksp libs.raamcosta.composeDestinations.ksp
|
|
|
|
implementation("com.facebook.react:hermes-engine:+") {
|
|
exclude group: 'com.facebook.fbjni'
|
|
}
|
|
}
|
|
|
|
apply from: project(':react-native-config').projectDir.getPath() + '/dotenv.gradle'
|
|
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
|
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
|
|
apply from: 'exec.gradle'
|