build.gradle 4.9 KB

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