build.gradle 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. plugins {
  2. id 'com.android.library'
  3. id 'kotlin-android'
  4. }
  5. android {
  6. compileSdkVersion COMPILE_SDK_VERSION
  7. buildToolsVersion BUILD_TOOLS_VERSION
  8. defaultConfig {
  9. minSdkVersion MIN_SDK_VERSION
  10. targetSdkVersion TARGET_SDK_VERSION
  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 MINIFY_ENABLE
  25. proguardFiles 'proguard-rules.pro'
  26. }
  27. }
  28. buildFeatures {
  29. buildConfig = false
  30. }
  31. lintOptions {
  32. abortOnError false
  33. }
  34. repositories {
  35. flatDir {
  36. dirs '../libs'
  37. }
  38. }
  39. dexOptions {
  40. preDexLibraries = false
  41. }
  42. compileOptions {
  43. kotlinOptions.freeCompilerArgs += ['-module-name', "cn.yyxx.eyuangame.core"]
  44. }
  45. externalNativeBuild {
  46. cmake {
  47. path "CMakeLists.txt"
  48. }
  49. }
  50. ndkVersion NDK_VERSION
  51. }
  52. dependencies {
  53. implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
  54. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
  55. //mmkv
  56. implementation 'com.tencent:mmkv-static:1.2.10'
  57. //日志采集框架
  58. implementation 'io.github.suyghur.dolin:zap:1.0.0'
  59. implementation 'androidx.core:core-ktx:1.6.0'
  60. implementation 'androidx.fragment:fragment-ktx:1.3.6'
  61. implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
  62. implementation 'com.google.android.material:material:1.4.0'
  63. implementation 'com.android.installreferrer:installreferrer:2.2'
  64. //google
  65. implementation 'com.google.android.play:core:1.10.2'
  66. implementation 'com.google.android.gms:play-services-auth:19.2.0'
  67. //4.0.0的billing库消耗商品会回调两次,后续在排查,先用3.0.3
  68. implementation "com.android.billingclient:billing-ktx:3.0.3"
  69. implementation 'com.google.firebase:firebase-analytics-ktx:19.0.2'
  70. implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.3'
  71. implementation 'com.google.firebase:firebase-crashlytics-ndk:18.2.3'
  72. //facebook
  73. implementation 'com.facebook.android:facebook-android-sdk:11.2.0'
  74. //adjust
  75. implementation 'com.adjust.sdk:adjust-android:4.28.2'
  76. if (PUBLISH_ENABLE) {
  77. api files('../libs/eyuangamesdk_base_1.0.0.jar')
  78. } else {
  79. api project(':library_base')
  80. }
  81. }
  82. apply from: 'publish.gradle'