build.gradle.kts 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. cppFlags += listOf()
  30. arguments += listOf()
  31. }
  32. }
  33. }
  34. buildTypes {
  35. release {
  36. isMinifyEnabled = false
  37. proguardFiles(
  38. getDefaultProguardFile("proguard-android-optimize.txt"),
  39. "proguard-rules.pro"
  40. )
  41. }
  42. }
  43. compileOptions {
  44. sourceCompatibility = JavaVersion.VERSION_1_8
  45. targetCompatibility = JavaVersion.VERSION_1_8
  46. }
  47. kotlinOptions {
  48. jvmTarget = "1.8"
  49. }
  50. buildFeatures {
  51. compose = true
  52. }
  53. composeOptions {
  54. kotlinCompilerExtensionVersion = "1.5.1"
  55. }
  56. packaging {
  57. resources {
  58. excludes += "/META-INF/{AL2.0,LGPL2.1}"
  59. }
  60. }
  61. externalNativeBuild {
  62. cmake {
  63. path = file("src/main/cpp/CMakeLists.txt")
  64. version = "3.22.1"
  65. }
  66. }
  67. }
  68. dependencies {
  69. implementation("androidx.core:core-ktx:1.12.0")
  70. implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
  71. implementation("androidx.activity:activity-compose:1.8.2")
  72. implementation(platform("androidx.compose:compose-bom:2023.08.00"))
  73. implementation("androidx.compose.ui:ui")
  74. implementation("androidx.compose.ui:ui-graphics")
  75. implementation("androidx.compose.ui:ui-tooling-preview")
  76. implementation("androidx.compose.material3:material3")
  77. testImplementation("junit:junit:4.13.2")
  78. androidTestImplementation("androidx.test.ext:junit:1.1.5")
  79. androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
  80. androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
  81. androidTestImplementation("androidx.compose.ui:ui-test-junit4")
  82. debugImplementation("androidx.compose.ui:ui-tooling")
  83. debugImplementation("androidx.compose.ui:ui-test-manifest")
  84. }