build.gradle 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. plugins {
  2. id 'org.tboox.gradle-xmake-plugin' version '1.2.3'
  3. }
  4. apply plugin: 'com.android.library'
  5. //apply plugin: "org.tboox.gradle-xmake-plugin"
  6. android {
  7. namespace "org.tboox.xmake.nativelib"
  8. compileSdkVersion 36
  9. defaultConfig {
  10. minSdkVersion 30
  11. targetSdkVersion 36
  12. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  13. consumerProguardFiles 'consumer-rules.pro'
  14. ndk {
  15. abiFilters "armeabi-v7a", "arm64-v8a", "x86_64", "x86"
  16. }
  17. externalNativeBuild {
  18. /*
  19. cmake {
  20. cppFlags "-DTEST"
  21. abiFilters "armeabi-v7a", "arm64-v8a", "x86_64"
  22. }*/
  23. /*
  24. xmake {
  25. cppFlags "-DTEST", "-DTEST2"
  26. abiFilters "armeabi-v7a", "arm64-v8a", "x86_64"
  27. }*/
  28. }
  29. }
  30. externalNativeBuild {
  31. /*
  32. ndkBuild {
  33. path "jni/Android.mk"
  34. }
  35. */
  36. /*
  37. cmake {
  38. version "3.22.1"
  39. path "src/main/cpp/CMakeLists.txt"
  40. }*/
  41. /*
  42. xmake {
  43. logLevel "verbose"
  44. path "src/main/cpp/xmake.lua"
  45. buildMode "debug"
  46. //arguments "--test=y"
  47. //program /usr/local/bin/xmake
  48. stl "c++_shared"
  49. //stdcxx false
  50. //ndk "/Users/ruki/files/android-ndk-r20b/"
  51. //sdkver 21
  52. }*/
  53. }
  54. buildTypes {
  55. release {
  56. minifyEnabled false
  57. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  58. }
  59. }
  60. }
  61. java {
  62. toolchain {
  63. languageVersion = JavaLanguageVersion.of(17)
  64. }
  65. }
  66. dependencies {
  67. implementation fileTree(dir: 'libs', include: ['*.jar'])
  68. implementation 'androidx.appcompat:appcompat:1.0.2'
  69. testImplementation 'junit:junit:4.12'
  70. androidTestImplementation 'androidx.test.ext:junit:1.1.0'
  71. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  72. }