build.gradle 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. apply plugin: 'com.android.library'
  2. android {
  3. compileSdkVersion rootProject.ext.compileSdkVersion
  4. buildToolsVersion rootProject.ext.buildToolsVersion
  5. sourceSets {
  6. main {
  7. java.srcDirs = ['../src/main/java']
  8. manifest.srcFile '../src/main/AndroidManifest.xml'
  9. }
  10. }
  11. defaultConfig {
  12. minSdkVersion rootProject.ext.minSdkVersion
  13. targetSdkVersion rootProject.ext.targetSdkVersion
  14. versionCode rootProject.ext.versionCode
  15. versionName rootProject.ext.versionName
  16. externalNativeBuild {
  17. cmake {
  18. targets "image"
  19. arguments "-DANDROID_ARM_NEON=TRUE",
  20. "-DIMAGE_SINGLE_SHARED_LIB=FALSE"
  21. }
  22. }
  23. }
  24. buildTypes {
  25. release {
  26. minifyEnabled false
  27. proguardFiles getDefaultProguardFile('proguard-android.txt'), '../proguard-rules.pro'
  28. }
  29. }
  30. externalNativeBuild {
  31. cmake {
  32. path '../src/main/jni/CMakeLists.txt'
  33. }
  34. }
  35. }
  36. dependencies {
  37. implementation "com.android.support:support-annotations:${rootProject.ext.supportLibraryVersion}"
  38. testImplementation "junit:junit:${rootProject.ext.junitVersion}"
  39. }
  40. project.afterEvaluate {
  41. externalNativeBuildDebug.dependsOn ':singlelib:javah'
  42. externalNativeBuildRelease.dependsOn ':singlelib:javah'
  43. }
  44. // Publish arr with java source and java doc
  45. apply from: rootProject.file('android-maven-gradle.gradle')