build.gradle 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'kotlin-kapt'
  5. // Apply the Crashlytics Gradle plugin
  6. //apply plugin: 'com.google.gms.google-services'
  7. //apply plugin: 'com.google.firebase.crashlytics'
  8. android {
  9. compileSdkVersion 31
  10. buildToolsVersion "29.0.3"
  11. signingConfigs {
  12. release {
  13. storeFile rootProject.file("evaluation-testing.jks")
  14. //storeFile file('D:\\Desktop\\evaluation-testing.jks')
  15. storePassword "123456"
  16. keyAlias = "gdt"
  17. keyPassword "123456"
  18. }
  19. }
  20. defaultConfig {
  21. applicationId "com.sambath.sbc"
  22. minSdkVersion 21
  23. targetSdkVersion 31
  24. versionCode 1
  25. versionName "1.0.0"
  26. signingConfig signingConfigs.release
  27. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  28. }
  29. buildTypes {
  30. debug {
  31. // manifestPlaceholders = [enableCrashlytic:false]
  32. // firebaseCrashlytics.mappingFileUploadEnabled false
  33. minifyEnabled false
  34. debuggable true
  35. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  36. }
  37. release {
  38. // manifestPlaceholders = [enableCrashlytic:true]
  39. // firebaseCrashlytics.mappingFileUploadEnabled true
  40. shrinkResources true
  41. minifyEnabled true
  42. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  43. }
  44. }
  45. // To inline the bytecode built with JVM target 1.8 into
  46. // bytecode that is being built with JVM target 1.6. (e.g. navArgs)
  47. compileOptions {
  48. sourceCompatibility JavaVersion.VERSION_1_8
  49. targetCompatibility JavaVersion.VERSION_1_8
  50. }
  51. kotlinOptions {
  52. jvmTarget = "1.8"
  53. }
  54. androidExtensions {
  55. experimental = true
  56. }
  57. packagingOptions {
  58. exclude 'META-INF/DEPENDENCIES'
  59. exclude 'META-INF/LICENSE'
  60. exclude 'META-INF/LICENSE.txt'
  61. exclude 'META-INF/license.txt'
  62. exclude 'META-INF/NOTICE'
  63. exclude 'META-INF/NOTICE.txt'
  64. exclude 'META-INF/notice.txt'
  65. exclude 'META-INF/ASL2.0'
  66. }
  67. lintOptions {
  68. checkReleaseBuilds false
  69. abortOnError false
  70. }
  71. flavorDimensions 'env'
  72. productFlavors {
  73. dev {
  74. dimension 'env'
  75. //applicationIdSuffix = ".dev"
  76. versionNameSuffix "-dev"
  77. }
  78. prod {
  79. dimension 'env'
  80. }
  81. }
  82. applicationVariants.all { variant ->
  83. variant.outputs.all {
  84. //def formattedDate = new Date().format('yyyy-MM-dd HH-mm')
  85. def appName = "SBC-Mobile"
  86. def appId = variant.applicationId
  87. def versionName = variant.versionName
  88. def versionCode = variant.versionCode
  89. def flavorName = variant.flavorName // e. g. free
  90. def buildType = variant.buildType // e. g. debug
  91. def variantName = variant.name // e. g. freeDebug
  92. def apkName = appName + '_' + variantName + '_' + versionName + '.apk'
  93. outputFileName = apkName
  94. }
  95. }
  96. }
  97. dependencies {
  98. implementation fileTree(dir: 'libs', include: ['*.jar'])
  99. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  100. implementation 'androidx.appcompat:appcompat:1.4.0'
  101. implementation 'androidx.core:core-ktx:1.3.2'
  102. implementation 'com.google.android.material:material:1.4.0'
  103. implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
  104. implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
  105. implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
  106. //Architecture components
  107. def lifecycle_version = "2.2.0"
  108. implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
  109. implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
  110. implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
  111. implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
  112. //RxJava & RxAndroid
  113. implementation "io.reactivex.rxjava2:rxjava:2.2.18"
  114. implementation "io.reactivex.rxjava2:rxkotlin:2.4.0"
  115. implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
  116. //Retrofit
  117. def retrofit_version = "2.9.0"
  118. implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
  119. implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
  120. implementation "com.squareup.retrofit2:converter-moshi:$retrofit_version"
  121. implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
  122. implementation 'com.itkacher.okhttpprofiler:okhttpprofiler:1.0.7'
  123. // /*Json Serialize & Deserialize Library*/
  124. implementation("com.squareup.moshi:moshi-kotlin:1.9.2")
  125. kapt("com.squareup.moshi:moshi-kotlin-codegen:1.9.2")
  126. //Socket io client
  127. implementation('io.socket:socket.io-client:2.0.0') {
  128. exclude group: 'org.json', module: 'json'
  129. }
  130. // Logging helper
  131. implementation 'com.jakewharton.timber:timber:4.7.1'
  132. implementation 'com.google.code.gson:gson:2.8.6'
  133. //Lib
  134. implementation project(path: ':printooth')
  135. implementation 'com.squareup.picasso:picasso:2.71828'
  136. testImplementation 'junit:junit:4.13.2'
  137. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  138. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  139. }