build.gradle 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. plugins {
  2. id 'com.android.library'
  3. }
  4. android {
  5. compileSdk 31
  6. defaultConfig {
  7. minSdk 19
  8. targetSdk 31
  9. versionCode 1
  10. versionName "1.0"
  11. consumerProguardFiles "consumer-rules.pro"
  12. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  13. externalNativeBuild {
  14. cmake {
  15. abiFilters 'arm64-v8a','armeabi-v7a'
  16. cppFlags '-std=c++14 -DANDROID -fno-rtti'
  17. arguments = ['-DANDROID_TOOLCHAIN=clang','-DANDROID_STL=c++_shared','-DCMAKE_BUILD_TYPE=Release']
  18. }
  19. }
  20. }
  21. buildTypes {
  22. release {
  23. minifyEnabled true
  24. }
  25. debug {
  26. minifyEnabled false
  27. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  28. }
  29. }
  30. externalNativeBuild {
  31. cmake {
  32. path "src/main/cpp/CMakeLists.txt"
  33. version "3.10.2"
  34. }
  35. }
  36. compileOptions {
  37. sourceCompatibility JavaVersion.VERSION_1_8
  38. targetCompatibility JavaVersion.VERSION_1_8
  39. }
  40. ndkVersion '20.0.5594570'
  41. }
  42. dependencies {
  43. implementation 'androidx.appcompat:appcompat:1.3.1'
  44. implementation 'com.google.android.material:material:1.4.0'
  45. testImplementation 'junit:junit:4.+'
  46. }