mobile_tele2med_2024/app/build.gradle
2024-04-09 16:57:26 +03:00

319 lines
12 KiB
Groovy
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.appdistribution'
//apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
buildscript {
repositories {
google()
}
dependencies {
classpath 'com.google.firebase:firebase-appdistribution-gradle:1.3.1'
}
}
android {
signingConfigs {
config {
storeFile file('F:\\24marchD\\android\\dev mobile_tele2med\\keystore_tele2med.jks')
storePassword '!QAZ2wsx'
keyAlias = 'Tele2Med'
keyPassword '!QAZ2wsx'
}
}
compileSdkVersion 33
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "ru.tele2med.mobile"
minSdkVersion 26
targetSdkVersion 33
def appVersionMajor = "1.0"
def buildNumber = 16
def splash_version = "3.0"
def fullVersion = splash_version
versionCode buildNumber
buildConfigField "String", "UNIQ_ID", '"06b2ddef-081d-5258-1eec-be3bea2fc944"'
buildConfigField "String", "ORG_INN", '"7709001494"'
// buildConfigField "String", "ORGANIZAT", '"ООО \"03 Мед\" ОФИС"'
versionName fullVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "String", "API_BASE_URL", '"https://pvdp.tis-online.com/Montrans/api"'
buildConfigField "String", "API_VERSION", '"v1"'
// buildConfigField "String", "TOKEN_APP", '"28170DFB805E49149FF3CE21E97EA8F4"'
buildConfigField "String", "TOKEN_APP", '"1C42561FD40C43C9A01C4523B8A34F8A"'
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
firebaseAppDistribution {
serviceCredentialsFile = "/home/test/.jenkins/keys/tis-online-9314c-29fc6562a3e9.json"
releaseNotes = "Debug version"
// testers = "ksenia.pridachina@itbrick.ru,nail.dulkarnaev@itbrick.ru"
}
}
release {
minifyEnabled false
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
firebaseAppDistribution {
serviceCredentialsFile = "/home/test/.jenkins/keys/tis-online-9314c-29fc6562a3e9.json"
releaseNotes = "Release version"
// testers = "ksenia.pridachina@itbrick.ru,nail.dulkarnaev@itbrick.ru,chulpan@itbrick.ru"
}
signingConfig signingConfigs.config
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all { output ->
def project = "tele2med"
def SEP = "_"
def buildType = variant.buildType.name // variant.variantData.variantConfiguration.buildType.name
def version = variant.versionName
def date = new Date()
def format = variant
def formattedDate = date.format('ddMMyy_HHmm')
def splash_version = "3.0"
def splash_date = "010923_1000"
// def newApkName = project + SEP + buildType + SEP + version + SEP + formattedDate + "_" + ".apk"
def newApkName = project + SEP + buildType + SEP + splash_version + SEP + splash_date + "_" + ".apk"
outputFileName = new File(newApkName)
}
}
flavorDimensions "version"
productFlavors {
prod {
dimension "version"
buildConfigField "String", "API_BASE_URL", '"https://med.tele2med.ru/api/"'
buildConfigField "String", "API_ARM_URL", '"https://med.tele2med.ru/arm/"'
buildConfigField "String", "API_QR_URL", '"https://qr.g03.ru/"'
buildConfigField "String", "API_RESULT_URL", '"https://qr.g03.ru/qr/"'
buildConfigField "String", "API_VERSION", '"v1"'
buildConfigField "String", "TOKEN_APP", '"D050DBA2A44A47D2A6058E5275D84541"'
buildConfigField "String", "DEMO_UNIQ_ID", '"b160146c-dbf6-4b9f-bc01-31cdf11988ed"'
buildConfigField "String", "WSS_URL", '"med.tele2med.ru"'
}
dev {
dimension "version"
buildConfigField "String", "API_BASE_URL", '"https://devweb.tele2med.ru/api2/"'
buildConfigField "String", "API_ARM_URL", '"https://devweb.tele2med.ru/arm/"'
buildConfigField "String", "API_QR_URL", '"https://devqr.g03.ru/"'
buildConfigField "String", "API_RESULT_URL", '"https://dev.t2m.su/qr/"'
buildConfigField "String", "API_VERSION", '"v1"'
buildConfigField "String", "TOKEN_APP", '"D050DBA2A44A47D2A6058E5275D84541"'
buildConfigField "String", "DEMO_UNIQ_ID", '"b160146c-dbf6-4b9f-bc01-31cdf11988ed"'
buildConfigField "String", "WSS_URL", '"devweb.tele2med.ru"'
}
jooli {
dimension "version"
buildConfigField "String", "API_BASE_URL", '"https://jooli.tele2med.ru/api/"'
buildConfigField "String", "API_ARM_URL", '"https://jooli.tele2med.ru/arm/"'
buildConfigField "String", "API_QR_URL", '"https://qr.g03.ru/"'
buildConfigField "String", "API_RESULT_URL", '"https://qr.g03.ru/qr/"'
buildConfigField "String", "API_VERSION", '"v1"'
buildConfigField "String", "TOKEN_APP", '"D050DBA2A44A47D2A6058E5275D84541"'
buildConfigField "String", "DEMO_UNIQ_ID", '"028477b3-329e-c4ba-763c-357966f641ae"'
}
}
}
////////////Version utils///////////////////
def getVersionNumber() {
def versionCode = ""
new ByteArrayOutputStream().withStream { os ->
exec {
executable = 'git'
args = ['rev-list', '--count', '--all', 'HEAD']
standardOutput = os
}
versionCode = os.toString()
}
return versionCode
}
///////////////////////
repositories {
maven {
url "http://maven.google.com/"
allowInsecureProtocol = true
}
}
dependencies {
implementation 'com.jjoe64:graphview:4.2.2'
implementation 'com.github.mazenrashed:Printooth:1.3.1' //printer
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'com.github.DantSu:ESCPOS-ThermalPrinter-Android:3.3.0'
implementation 'org.java-websocket:Java-WebSocket:1.4.0'
implementation 'com.tom_roush:pdfbox-android:1.8.10.1'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
// Barcode scanning API
implementation 'com.budiyev.android:code-scanner:2.1.0'
// implementation 'com.google.mlkit:barcode-scanning:17.0.0'
implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:16.2.1'
// CameraX library
def camerax_version = "1.0.1"
implementation "androidx.camera:camera-camera2:$camerax_version"
implementation "androidx.camera:camera-lifecycle:$camerax_version"
implementation "androidx.camera:camera-view:1.0.0-alpha28"
implementation 'org.apache.commons:commons-io:1.3.2'
implementation "androidx.browser:browser:1.4.0"
implementation 'com.wesleyelliott:camera2-video:0.0.2'
implementation project(':library')
implementation 'com.github.dbof10:Bitmp4:0.1.1'
implementation 'androidx.camera:camera-core:1.0.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation("com.github.bumptech.glide:glide:4.12.0@aar") {
transitive = true
}
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4"
implementation 'com.google.maps.android:android-maps-utils:0.4+'
implementation 'com.google.firebase:firebase-messaging:21.0.1'
implementation 'joda-time:joda-time:2.9.4'
implementation "androidx.preference:preference-ktx:1.1.0"
implementation 'org.osmdroid:osmdroid-android:6.1.6'
implementation 'com.github.MKergall:osmbonuspack:6.6.0'
implementation 'io.nlopez.smartlocation:library:3.3.3'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// Android
implementation "androidx.multidex:multidex:$multidex_version"
implementation "androidx.appcompat:appcompat:$appcompat_version"
implementation "androidx.core:core-ktx:$ktx_version"
implementation "androidx.constraintlayout:constraintlayout:$constraint_version"
// Google
implementation "com.google.android.material:material:$material_version"
// implementation "com.crashlytics.sdk.android:crashlytics:$crashlytics_version"
implementation "com.google.android.gms:play-services-location:$play_services_location_version"
// Di
implementation "org.kodein.di:kodein-di-generic-jvm:$kodein_version"
implementation "org.kodein.di:kodein-di-framework-android-x:$kodein_version"
// Db
// Room
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"
// Architecture
// Moxy
kapt "tech.schoolhelper:moxy-x-compiler:$moxy_version"
implementation "tech.schoolhelper:moxy-x:$moxy_version"
implementation "tech.schoolhelper:moxy-x-androidx:$moxy_version"
// Rx
implementation "io.reactivex.rxjava2:rxkotlin:$rx_kotlin_version"
implementation "io.reactivex.rxjava2:rxandroid:$rx_android_version"
implementation "io.reactivex.rxjava2:rxjava:$rx_java_version"
implementation "com.jakewharton.rxrelay2:rxrelay:$rx_relay_version"
// Network
// OkHttp
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
// Retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
// Picasso
implementation "com.squareup.picasso:picasso:$picasso_version"
implementation "jp.wasabeef:picasso-transformations:$picasso_transf_version"
// Navigation
// Cicerone
implementation "ru.terrakok.cicerone:cicerone:$cicerone_version"
// Ui
implementation "com.github.santalu:mask-edittext:$santalu_mask_et_version"
implementation "com.poovam:pin-edittext-field:$poovam_pin_et_version"
implementation "net.cachapa.expandablelayout:expandablelayout:$cachapa_explayout_version"
// Anko
implementation "org.jetbrains.anko:anko-commons:$anko_version"
// Debug
// Logging
implementation "com.jakewharton.timber:timber:$timber_version"
// Debug Drawer
debugImplementation "io.palaima.debugdrawer:debugdrawer:$debugdrawer_version"
implementation "io.palaima.debugdrawer:debugdrawer-base:$debugdrawer_version"
implementation "io.palaima.debugdrawer:debugdrawer-timber:$debugdrawer_version"
implementation "io.palaima.debugdrawer:debugdrawer-okhttp3:$debugdrawer_version"
implementation "io.palaima.debugdrawer:debugdrawer-logs:$debugdrawer_version"
debugImplementation "com.readystatesoftware.chuck:library:$chuck_version"
implementation "com.github.pedrovgs:lynx:$lynx_version"
// Tests
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
androidTestImplementation "androidx.test.ext:junit:$junit_ext_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
implementation 'com.google.android.gms:play-services-maps:17.0.0'
}