build.gradle.kts 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. plugins {
  2. id("com.android.application")
  3. id("org.jetbrains.kotlin.android")
  4. }
  5. android {
  6. namespace = "com.example.llama"
  7. compileSdk = 34
  8. ndkVersion = "26.1.10909125"
  9. defaultConfig {
  10. applicationId = "com.example.llama"
  11. minSdk = 33
  12. targetSdk = 34
  13. versionCode = 1
  14. versionName = "1.0"
  15. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  16. vectorDrawables {
  17. useSupportLibrary = true
  18. }
  19. ndk {
  20. // Workaround for https://github.com/llvm/llvm-project/issues/65820
  21. // affecting armeabi-v7a. Skip armeabi-v7a when invoked with
  22. // -Pskip-armeabi-v7a (e.g., ./gradlew build -Pskip-armeabi-v7a).
  23. if (project.hasProperty("skip-armeabi-v7a")) {
  24. abiFilters += listOf("arm64-v8a", "x86_64", "x86")
  25. }
  26. }
  27. externalNativeBuild {
  28. cmake {
  29. arguments += "-DCMAKE_BUILD_TYPE=Release"
  30. cppFlags += listOf()
  31. arguments += listOf()
  32. }
  33. }
  34. }
  35. buildTypes {
  36. release {
  37. isMinifyEnabled = false
  38. proguardFiles(
  39. getDefaultProguardFile("proguard-android-optimize.txt"),
  40. "proguard-rules.pro"
  41. )
  42. }
  43. }
  44. compileOptions {
  45. sourceCompatibility = JavaVersion.VERSION_1_8
  46. targetCompatibility = JavaVersion.VERSION_1_8
  47. }
  48. kotlinOptions {
  49. jvmTarget = "1.8"
  50. }
  51. buildFeatures {
  52. compose = true
  53. }
  54. composeOptions {
  55. kotlinCompilerExtensionVersion = "1.5.1"
  56. }
  57. packaging {
  58. resources {
  59. excludes += "/META-INF/{AL2.0,LGPL2.1}"
  60. }
  61. }
  62. externalNativeBuild {
  63. cmake {
  64. path = file("src/main/cpp/CMakeLists.txt")
  65. version = "3.22.1"
  66. }
  67. }
  68. }
  69. dependencies {
  70. implementation("androidx.core:core-ktx:1.12.0")
  71. implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
  72. implementation("androidx.activity:activity-compose:1.8.2")
  73. implementation(platform("androidx.compose:compose-bom:2023.08.00"))
  74. implementation("androidx.compose.ui:ui")
  75. implementation("androidx.compose.ui:ui-graphics")
  76. implementation("androidx.compose.ui:ui-tooling-preview")
  77. implementation("androidx.compose.material3:material3")
  78. testImplementation("junit:junit:4.13.2")
  79. androidTestImplementation("androidx.test.ext:junit:1.1.5")
  80. androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
  81. androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
  82. androidTestImplementation("androidx.compose.ui:ui-test-junit4")
  83. debugImplementation("androidx.compose.ui:ui-tooling")
  84. debugImplementation("androidx.compose.ui:ui-test-manifest")
  85. }