build.gradle.kts 2.5 KB

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