build.gradle 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. group 'com.vinno.flutter_smartscan_plugin'
  2. version '1.0'
  3. buildscript {
  4. repositories {
  5. google()
  6. mavenCentral()
  7. }
  8. dependencies {
  9. classpath 'com.android.tools.build:gradle:7.2.0'
  10. }
  11. }
  12. rootProject.allprojects {
  13. repositories {
  14. google()
  15. mavenCentral()
  16. }
  17. }
  18. apply plugin: 'com.android.library'
  19. android {
  20. compileSdkVersion 31
  21. compileOptions {
  22. sourceCompatibility JavaVersion.VERSION_1_8
  23. targetCompatibility JavaVersion.VERSION_1_8
  24. }
  25. sourceSets {
  26. main {
  27. jniLibs.srcDirs += 'src/main/jniLibs'
  28. }
  29. }
  30. defaultConfig {
  31. minSdkVersion 16
  32. }
  33. buildTypes {
  34. release {
  35. // TODO: Add your own signing config for the release build.
  36. // Signing with the debug keys for now, so `flutter run --release` works.
  37. signingConfig signingConfigs.debug
  38. ndk {
  39. //这里其实我觉可以直接是用"armeabi-v7a",但国内几个大哥之前使用的都是"armeabi"
  40. abiFilters "arm64-v8a"
  41. }
  42. }
  43. debug {
  44. signingConfig signingConfigs.debug
  45. ndk {
  46. //这里要加上,否则debug包会出问题,后面两个为可选,x86建议加上不然部分模拟器回报错
  47. abiFilters "x86_64","armeabi-v7a","arm64-v8a", "x86"
  48. }
  49. }
  50. }
  51. }