build.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. plugins {
  2. id 'com.android.application'
  3. }
  4. android {
  5. compileSdk 32
  6. defaultConfig {
  7. applicationId "com.example.paperidentify"
  8. minSdk 21
  9. targetSdk 32
  10. versionCode 1
  11. versionName "1.0"
  12. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  13. externalNativeBuild {
  14. cmake {
  15. cppFlags "-std=c++11 -frtti -fexceptions"
  16. arguments "-DOpenCV_DIR=" + "F:/AndroidWorkSpace/PaperIdentify/app/src/main/cpp/opencv/sdk/native/jni"
  17. arguments "-DANDROID_STL=c++_shared"
  18. }
  19. }
  20. }
  21. buildTypes {
  22. release {
  23. minifyEnabled false
  24. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  25. }
  26. }
  27. compileOptions {
  28. sourceCompatibility JavaVersion.VERSION_1_8
  29. targetCompatibility JavaVersion.VERSION_1_8
  30. }
  31. externalNativeBuild {
  32. cmake {
  33. path file('src/main/cpp/CMakeLists.txt')
  34. version '3.10.2'
  35. }
  36. }
  37. buildFeatures {
  38. viewBinding true
  39. }
  40. splits {
  41. abi {
  42. enable true
  43. universalApk false
  44. reset()
  45. include 'armeabi-v7a', 'arm64-v8a'
  46. }
  47. }
  48. }
  49. dependencies {
  50. implementation 'androidx.appcompat:appcompat:1.2.0'
  51. implementation 'com.google.android.material:material:1.3.0'
  52. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  53. testImplementation 'junit:junit:4.+'
  54. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  55. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  56. }