build.gradle 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. }
  5. def keystorePropertiesFile = rootProject.file("keystore.properties")
  6. def keystoreProperties = new Properties()
  7. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  8. android {
  9. compileSdk rootProject.ext.android.compileSdk
  10. buildToolsVersion rootProject.ext.android.buildToolsVersion
  11. defaultConfig {
  12. applicationId 'com.shzd.eyuangame'
  13. minSdk rootProject.ext.android.minSdk
  14. targetSdk rootProject.ext.android.targetSdk
  15. versionCode 1
  16. versionName "0.0.1"
  17. multiDexEnabled true
  18. }
  19. buildFeatures {
  20. viewBinding true
  21. compose true
  22. buildConfig false
  23. }
  24. signingConfigs {
  25. config {
  26. keyAlias keystoreProperties['keyAlias']
  27. keyPassword keystoreProperties['keyPassword']
  28. storeFile file(keystoreProperties['storeFile'])
  29. storePassword keystoreProperties['storePassword']
  30. v1SigningEnabled true
  31. v2SigningEnabled true
  32. }
  33. }
  34. buildTypes {
  35. debug {
  36. minifyEnabled false
  37. signingConfig signingConfigs.config
  38. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  39. }
  40. release {
  41. minifyEnabled false
  42. signingConfig signingConfigs.config
  43. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  44. }
  45. }
  46. lintOptions {
  47. abortOnError false
  48. }
  49. compileOptions {
  50. sourceCompatibility JavaVersion.VERSION_1_8
  51. targetCompatibility JavaVersion.VERSION_1_8
  52. }
  53. composeOptions {
  54. kotlinCompilerExtensionVersion compose_version
  55. kotlinCompilerVersion kotlin_version
  56. }
  57. kotlinOptions {
  58. jvmTarget = '1.8'
  59. useIR = true
  60. }
  61. packagingOptions {
  62. resources {
  63. excludes += '/META-INF/{AL2.0,LGPL2.1}'
  64. }
  65. }
  66. }
  67. dependencies {
  68. if (rootProject.ext.module.publish) {
  69. implementation 'io.github.yyxxgame.sdk:eyuangame-sdk-ktx:1.0.2-fix1'
  70. implementation 'io.github.yyxxgame.sdk:eyuangame-component-lang-vn:1.0.2'
  71. } else {
  72. api project(':library_core')
  73. }
  74. // ktx
  75. api rootProject.ext.ktxLibs
  76. // jetpack
  77. api rootProject.ext.jetpackLibs
  78. // ui
  79. api rootProject.ext.uiLibs
  80. implementation "androidx.compose.material:material:$compose_version"
  81. implementation 'androidx.activity:activity-compose:1.4.0'
  82. implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
  83. implementation "androidx.compose.ui:ui:$compose_version"
  84. implementation "androidx.compose.ui:ui-tooling:$compose_version"
  85. implementation "androidx.compose.runtime:runtime:$compose_version"
  86. implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
  87. implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0"
  88. debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
  89. debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
  90. }