build.gradle 5.4 KB

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