学考乐离线App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. plugins {
  2. id 'com.android.library'
  3. }
  4. android {
  5. def androidConfig = rootProject.ext.android
  6. compileSdkVersion androidConfig.compile_sdk_version
  7. buildToolsVersion androidConfig.build_tools_version
  8. defaultConfig {
  9. minSdk androidConfig.min_sdk_version
  10. targetSdk androidConfig.target_sdk_version
  11. versionCode androidConfig.version_code
  12. versionName androidConfig.version_name
  13. multiDexEnabled true //解决64k 分包限制
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. consumerProguardFiles 'consumer-rules.pro'
  16. ndk {
  17. // 只接入 armeabi-v7a 和 x86 架构
  18. abiFilters 'armeabi-v7a', 'arm64-v8a'
  19. }
  20. externalNativeBuild {
  21. cmake {
  22. cppFlags "-std=c++11"
  23. }
  24. }
  25. }
  26. externalNativeBuild {
  27. cmake {
  28. path "src/main/cpp/CMakeLists.txt"
  29. version "3.10.2"
  30. }
  31. }
  32. ndkVersion = '20.0.5594570'
  33. buildTypes {
  34. release {
  35. minifyEnabled false
  36. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  37. }
  38. }
  39. // Android Gradle 插件 4.0,下述配置不再是必需的,并且会导致构建失败。外部原生 build 现在会自动打包这些库,因此使用 jniLibs 明确打包库会导致重复。
  40. // sourceSets {
  41. // main {
  42. // jniLibs.srcDirs = ['libs']
  43. // }
  44. // }
  45. }
  46. dependencies {
  47. api fileTree(dir: 'libs', include: ['*.jar'])
  48. rootProject.ext.dependencies_required.each { k, v -> implementation v }
  49. testImplementation rootProject.ext.dependencies_testImplementation.junit
  50. rootProject.ext.dependencies_androidTestImplementation.each { k, v -> androidTestImplementation v }
  51. implementation project(path: ':lib:common')
  52. }