build.gradle 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. plugins {
  2. id 'com.android.library'
  3. id 'kotlin-android'
  4. }
  5. android {
  6. compileSdk rootProject.ext.android.compileSdk
  7. buildToolsVersion rootProject.ext.android.buildToolsVersion
  8. defaultConfig {
  9. minSdk rootProject.ext.android.minSdk
  10. targetSdk rootProject.ext.android.targetSdk
  11. externalNativeBuild {
  12. cmake {
  13. cppFlags '-std=c++11 -frtti -fexceptions -lz'
  14. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  15. }
  16. }
  17. ndk {
  18. // 设置支持的SO库架构
  19. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  20. }
  21. }
  22. buildTypes {
  23. release {
  24. minifyEnabled rootProject.ext.module.minifyEnabled
  25. proguardFiles 'proguard-rules.pro'
  26. }
  27. }
  28. buildFeatures {
  29. buildConfig false
  30. }
  31. lintOptions {
  32. abortOnError false
  33. }
  34. compileOptions {
  35. kotlinOptions.freeCompilerArgs += ['-module-name', "cn.yyxx.eyuangame.core"]
  36. }
  37. compileOptions {
  38. sourceCompatibility JavaVersion.VERSION_1_8
  39. targetCompatibility JavaVersion.VERSION_1_8
  40. }
  41. kotlinOptions {
  42. jvmTarget = "1.8"
  43. }
  44. externalNativeBuild {
  45. cmake {
  46. path "CMakeLists.txt"
  47. }
  48. }
  49. }
  50. dependencies {
  51. //mmkv
  52. implementation 'com.tencent:mmkv-static:1.2.10'
  53. //日志采集框架
  54. implementation 'io.github.suyghur.dolin:zap:1.0.0'
  55. implementation 'androidx.core:core-ktx:1.7.0'
  56. implementation 'androidx.fragment:fragment-ktx:1.4.0'
  57. implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
  58. implementation 'com.google.android.material:material:1.5.0'
  59. implementation 'com.android.installreferrer:installreferrer:2.2'
  60. //google
  61. implementation 'com.google.android.play:core:1.10.3'
  62. implementation 'com.google.android.gms:play-services-auth:20.0.1'
  63. //4.0.0的billing库消耗商品会回调两次,后续在排查,先用3.0.3
  64. implementation "com.android.billingclient:billing-ktx:3.0.3"
  65. implementation 'com.google.firebase:firebase-analytics-ktx:20.0.2'
  66. implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.6'
  67. implementation 'com.google.firebase:firebase-crashlytics-ndk:18.2.6'
  68. //facebook
  69. implementation 'com.facebook.android:facebook-android-sdk:11.2.0'
  70. //adjust
  71. implementation 'com.adjust.sdk:adjust-android:4.28.2'
  72. if (rootProject.ext.module.publish) {
  73. api files('../libs/eyuangamesdk_base_1.0.3.jar')
  74. } else {
  75. api project(':library_base')
  76. }
  77. switch (rootProject.ext.module.language){
  78. case 1:
  79. api project(':library_hk_language')
  80. break
  81. case 2:
  82. api project(':library_vn_language')
  83. break
  84. }
  85. }
  86. apply from: 'publish.gradle'