build.gradle.kts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. plugins {
  2. id("com.android.library")
  3. id("org.jetbrains.kotlin.android")
  4. }
  5. android {
  6. namespace = "net.typeblog.lpac_jni"
  7. compileSdk = 35
  8. ndkVersion = "26.1.10909125"
  9. defaultConfig {
  10. minSdk = 27
  11. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  12. externalNativeBuild {
  13. ndkBuild {
  14. cFlags(
  15. "-fmacro-prefix-map=${project.projectDir.toString()}=/fake/path/",
  16. "-fdebug-prefix-map=${project.projectDir.toString()}=/fake/path/",
  17. "-ffile-prefix-map=${project.projectDir.toString()}=/fake/path/"
  18. )
  19. }
  20. }
  21. }
  22. buildTypes {
  23. release {
  24. isMinifyEnabled = false
  25. proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
  26. }
  27. }
  28. externalNativeBuild {
  29. ndkBuild {
  30. path("src/main/jni/Android.mk")
  31. }
  32. }
  33. compileOptions {
  34. sourceCompatibility = JavaVersion.VERSION_1_8
  35. targetCompatibility = JavaVersion.VERSION_1_8
  36. }
  37. kotlinOptions {
  38. jvmTarget = "1.8"
  39. }
  40. }
  41. dependencies {
  42. implementation("androidx.core:core-ktx:1.12.0")
  43. implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
  44. implementation("androidx.appcompat:appcompat:1.6.1")
  45. implementation("com.google.android.material:material:1.10.0")
  46. testImplementation("junit:junit:4.13.2")
  47. androidTestImplementation("androidx.test.ext:junit:1.1.5")
  48. androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
  49. }