build.gradle 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion 30
  4. ndkVersion "23.0.7599858"
  5. defaultConfig {
  6. applicationId "org.anki.%TARGET%"
  7. minSdkVersion 24
  8. targetSdkVersion 30
  9. archivesBaseName = "$applicationId"
  10. }
  11. buildTypes {
  12. debug {
  13. externalNativeBuild {
  14. cmake {
  15. abiFilters "arm64-v8a"
  16. arguments "-DANDROID_TOOLCHAIN=clang",
  17. "-DANDROID_STL=c++_static",
  18. "-DCMAKE_BUILD_TYPE=Debug",
  19. "-DANKI_EXTRA_CHECKS=ON",
  20. "-DANKI_BUILD_TESTS=ON",
  21. "-DPYTHON_EXECUTABLE:FILEPATH=%PYTHON%"
  22. version "3.12+"
  23. targets "%TARGET%"
  24. }
  25. }
  26. debuggable true
  27. jniDebuggable true
  28. }
  29. release {
  30. externalNativeBuild {
  31. cmake {
  32. abiFilters "arm64-v8a"
  33. arguments "-DANDROID_TOOLCHAIN=clang",
  34. "-DANDROID_STL=c++_static",
  35. "-DCMAKE_BUILD_TYPE=Release",
  36. "-DANKI_EXTRA_CHECKS=OFF",
  37. "-DANKI_BUILD_TESTS=ON",
  38. "-DPYTHON_EXECUTABLE:FILEPATH=%PYTHON%"
  39. version "3.12+"
  40. targets "%TARGET%"
  41. }
  42. }
  43. debuggable true
  44. jniDebuggable true
  45. signingConfig signingConfigs.debug
  46. }
  47. }
  48. externalNativeBuild.cmake.path "%CMAKE%"
  49. buildTypes.release.minifyEnabled = false
  50. sourceSets {
  51. main {
  52. assets.srcDirs = ["../assets"]
  53. }
  54. }
  55. }