build.gradle 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. plugins {
  2. id 'com.android.library'
  3. id 'org.jetbrains.kotlin.android'
  4. id 'kotlin-android'
  5. }
  6. apply plugin: 'kotlin-kapt'
  7. apply plugin: 'kotlin-android-extensions'
  8. android {
  9. compileSdkVersion 32
  10. defaultConfig {
  11. minSdkVersion 21
  12. targetSdkVersion 32
  13. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  14. consumerProguardFiles "consumer-rules.pro"
  15. externalNativeBuild {
  16. cmake {
  17. cppFlags ""
  18. abiFilters 'armeabi-v7a', 'arm64-v8a'
  19. }
  20. }
  21. ndk {
  22. abiFilters "armeabi-v7a", "arm64-v8a"
  23. }
  24. }
  25. buildTypes {
  26. release {
  27. minifyEnabled false
  28. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  29. }
  30. preRelease{
  31. minifyEnabled false
  32. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  33. }
  34. }
  35. compileOptions {
  36. sourceCompatibility JavaVersion.VERSION_1_8
  37. targetCompatibility JavaVersion.VERSION_1_8
  38. }
  39. sourceSets.main {
  40. jniLibs.srcDirs = ['libs']
  41. }
  42. externalNativeBuild {
  43. cmake {
  44. path "CMakeLists.txt"
  45. }
  46. }
  47. packagingOptions {
  48. exclude 'META-INF/proguard/coroutines.pro'
  49. pickFirst 'lib/armeabi-v7a/libmp3lame.so'
  50. pickFirst 'lib/arm64-v8a/libmp3lame.so'
  51. pickFirst 'lib/armeabi-v7a/libffmpeg.so'
  52. pickFirst 'lib/arm64-v8a/libffmpeg.so'
  53. }
  54. }
  55. dependencies {
  56. implementation fileTree(dir: 'libs', include: ['*.jar'])
  57. implementation 'androidx.appcompat:appcompat:1.3.0'
  58. implementation 'com.google.android.material:material:1.4.0'
  59. testImplementation 'junit:junit:4.13.2'
  60. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  61. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  62. //kotlin
  63. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.1'
  64. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.ext.android.kotlin_version"
  65. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
  66. }