build.gradle 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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.yuki"
  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. // firebaseCrashlytics.mappingFileUploadEnabled true
  39. shrinkResources false
  40. minifyEnabled false
  41. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  42. }
  43. }
  44. // To inline the bytecode built with JVM target 1.8 into
  45. // bytecode that is being built with JVM target 1.6. (e.g. navArgs)
  46. compileOptions {
  47. sourceCompatibility JavaVersion.VERSION_1_8
  48. targetCompatibility JavaVersion.VERSION_1_8
  49. }
  50. kotlinOptions {
  51. jvmTarget = "1.8"
  52. }
  53. androidExtensions {
  54. experimental = true
  55. }
  56. packagingOptions {
  57. resources {
  58. 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']
  59. }
  60. }
  61. flavorDimensions 'env'
  62. productFlavors {
  63. dev {
  64. dimension 'env'
  65. //applicationIdSuffix = ".dev"
  66. versionNameSuffix "-dev"
  67. }
  68. prod {
  69. dimension 'env'
  70. }
  71. }
  72. lint {
  73. abortOnError false
  74. checkReleaseBuilds false
  75. }
  76. applicationVariants.all { variant ->
  77. variant.outputs.all {
  78. //def formattedDate = new Date().format('yyyy-MM-dd HH-mm')
  79. def appName = "Khmer9_Yuki"
  80. def appId = variant.applicationId
  81. def versionName = variant.versionName
  82. def versionCode = variant.versionCode
  83. def flavorName = variant.flavorName // e. g. free
  84. def buildType = variant.buildType // e. g. debug
  85. def variantName = variant.name // e. g. freeDebug
  86. def apkName = appName + '_' + variantName + '_' + versionName + '.apk'
  87. outputFileName = apkName
  88. }
  89. }
  90. }
  91. dependencies {
  92. implementation fileTree(dir: 'libs', include: ['*.jar'])
  93. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  94. implementation 'androidx.appcompat:appcompat:1.2.0'
  95. implementation 'androidx.core:core-ktx:1.3.2'
  96. implementation 'com.google.android.material:material:1.2.1'
  97. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  98. implementation 'androidx.navigation:navigation-fragment-ktx:2.3.3'
  99. implementation 'androidx.navigation:navigation-ui-ktx:2.3.3'
  100. implementation 'androidx.recyclerview:recyclerview:1.2.1'
  101. implementation project(path: ':sunmiprinterutill')
  102. //Architecture components
  103. def lifecycle_version = "2.2.0"
  104. implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
  105. implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
  106. implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
  107. implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0"
  108. //RxJava & RxAndroid
  109. implementation "io.reactivex.rxjava2:rxjava:2.2.18"
  110. implementation "io.reactivex.rxjava2:rxkotlin:2.4.0"
  111. implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
  112. //Retrofit
  113. def retrofit_version = "2.9.0"
  114. implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
  115. implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
  116. implementation "com.squareup.retrofit2:converter-moshi:$retrofit_version"
  117. implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
  118. implementation 'com.itkacher.okhttpprofiler:okhttpprofiler:1.0.7'
  119. /*Json Serialize & Deserialize Library*/
  120. implementation("com.squareup.moshi:moshi-kotlin:1.9.2")
  121. kapt("com.squareup.moshi:moshi-kotlin-codegen:1.9.2")
  122. //Socket io client
  123. implementation('io.socket:socket.io-client:2.0.0') {
  124. exclude group: 'org.json', module: 'json'
  125. }
  126. //Logging helper
  127. implementation 'com.jakewharton.timber:timber:4.7.1'
  128. implementation 'com.google.code.gson:gson:2.8.6'
  129. //implementation 'com.github.mazenrashed:Printooth:1.2.2'
  130. //Lib
  131. implementation project(path: ':printooth')
  132. implementation 'com.squareup.picasso:picasso:2.71828'
  133. //Firebase
  134. // Import the BoM for the Firebase platform
  135. // implementation platform('com.google.firebase:firebase-bom:26.4.0')
  136. // implementation 'com.google.firebase:firebase-crashlytics-ktx'
  137. // implementation 'com.google.firebase:firebase-analytics-ktx'
  138. // implementation 'com.google.firebase:firebase-config-ktx'
  139. implementation 'nl.dionsegijn:konfetti:1.3.2'
  140. testImplementation 'junit:junit:4.13.2'
  141. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  142. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  143. }