build.gradle 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. // sourceSets {
  43. // main {
  44. // // let gradle pack the shared library into apk
  45. // jniLibs.srcDirs = ['../soLibs']
  46. // }
  47. // }
  48. compileOptions {
  49. kotlinOptions.freeCompilerArgs += ['-module-name', "cn.yyxx.eyuangame.core"]
  50. }
  51. externalNativeBuild {
  52. cmake {
  53. path "CMakeLists.txt"
  54. }
  55. }
  56. ndkVersion NDK_VERSION
  57. }
  58. dependencies {
  59. implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
  60. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1'
  61. //mmkv
  62. implementation 'com.tencent:mmkv-static:1.2.10'
  63. //日志采集框架
  64. implementation 'io.github.suyghur.dolin:zap:1.0.0'
  65. implementation 'androidx.core:core-ktx:1.6.0'
  66. implementation 'androidx.fragment:fragment-ktx:1.3.5'
  67. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  68. implementation 'com.google.android.material:material:1.4.0'
  69. implementation 'com.android.installreferrer:installreferrer:2.2'
  70. //google
  71. implementation 'com.google.android.play:core:1.10.0'
  72. implementation 'com.google.android.gms:play-services-auth:19.0.0'
  73. //4.0.0的billing库消耗商品会回调两次,后续在排查,先用3.0.3
  74. implementation "com.android.billingclient:billing-ktx:3.0.3"
  75. implementation 'com.google.firebase:firebase-analytics-ktx:19.0.0'
  76. implementation 'com.google.firebase:firebase-crashlytics-ktx:18.1.0'
  77. implementation 'com.google.firebase:firebase-crashlytics-ndk:18.1.0'
  78. //facebook
  79. implementation 'com.facebook.android:facebook-login:9.0.0'
  80. implementation 'com.facebook.android:facebook-android-sdk:8.2.0'
  81. //adjust
  82. implementation 'com.adjust.sdk:adjust-android:4.28.2'
  83. if (PUBLISH_ENABLE) {
  84. api files('../libs/eyuangamesdk_base_1.0.0.jar')
  85. } else {
  86. api project(':library_base')
  87. }
  88. }
  89. apply from: 'publish.gradle'