build.gradle 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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 29
  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.khmer9.lotto"
  22. minSdkVersion 21
  23. targetSdkVersion 29
  24. versionCode 10
  25. versionName "1.9"
  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 = "Khmer9_Lotto"
  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.2.0'
  101. implementation 'androidx.core:core-ktx:1.3.2'
  102. implementation 'com.google.android.material:material:1.2.1'
  103. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  104. implementation 'androidx.navigation:navigation-fragment-ktx:2.3.3'
  105. implementation 'androidx.navigation:navigation-ui-ktx:2.3.3'
  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:2.2.0"
  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.7.2'
  122. implementation 'com.itkacher.okhttpprofiler:okhttpprofiler:1.0.7'
  123. //
  124. // /*Json Serialize & Deserialize Library*/
  125. implementation("com.squareup.moshi:moshi-kotlin:1.9.2")
  126. kapt("com.squareup.moshi:moshi-kotlin-codegen:1.9.2")
  127. //Socket io client
  128. implementation 'com.github.nkzawa:socket.io-client:0.6.0'
  129. //
  130. // //Logging helper
  131. implementation 'com.jakewharton.timber:timber:4.7.1'
  132. implementation 'com.google.code.gson:gson:2.8.6'
  133. //implementation 'com.github.mazenrashed:Printooth:1.2.2'
  134. //Lib
  135. implementation project(path: ':printooth')
  136. implementation 'com.squareup.picasso:picasso:2.71828'
  137. //Firebase
  138. // Import the BoM for the Firebase platform
  139. implementation platform('com.google.firebase:firebase-bom:26.4.0')
  140. implementation 'com.google.firebase:firebase-crashlytics-ktx'
  141. implementation 'com.google.firebase:firebase-analytics-ktx'
  142. implementation 'com.google.firebase:firebase-config-ktx'
  143. implementation 'nl.dionsegijn:konfetti:1.3.2'
  144. testImplementation 'junit:junit:4.13.1'
  145. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  146. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  147. }