build.gradle 5.0 KB

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