build.gradle.kts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. plugins {
  2. id("com.android.library")
  3. kotlin("android")
  4. kotlin("kapt")
  5. id("kotlinx-serialization")
  6. id("com.google.devtools.ksp")
  7. }
  8. android {
  9. compileSdk = buildTargetSdkVersion
  10. flavorDimensions(buildFlavor)
  11. defaultConfig {
  12. minSdk = buildMinSdkVersion
  13. targetSdk = buildTargetSdkVersion
  14. versionCode = buildVersionCode
  15. versionName = buildVersionName
  16. consumerProguardFiles("consumer-rules.pro")
  17. }
  18. buildTypes {
  19. named("release") {
  20. isMinifyEnabled = false
  21. proguardFiles(
  22. getDefaultProguardFile("proguard-android-optimize.txt"),
  23. "proguard-rules.pro"
  24. )
  25. }
  26. }
  27. productFlavors {
  28. create("foss") {
  29. dimension = "foss"
  30. }
  31. create("premium") {
  32. dimension = "premium"
  33. }
  34. }
  35. compileOptions {
  36. sourceCompatibility = JavaVersion.VERSION_1_8
  37. targetCompatibility = JavaVersion.VERSION_1_8
  38. }
  39. kotlinOptions {
  40. jvmTarget = "1.8"
  41. }
  42. sourceSets {
  43. named("debug") {
  44. java.srcDir(buildDir.resolve("generated/ksp/debug/kotlin"))
  45. }
  46. named("release") {
  47. java.srcDir(buildDir.resolve("generated/ksp/release/kotlin"))
  48. }
  49. }
  50. }
  51. dependencies {
  52. ksp(project(":kaidl:kaidl"))
  53. kapt("androidx.room:room-compiler:$roomVersion")
  54. api(project(":core"))
  55. api(project(":common"))
  56. implementation(kotlin("stdlib-jdk7"))
  57. implementation(project(":kaidl:kaidl-runtime"))
  58. implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion")
  59. implementation("androidx.room:room-runtime:$roomVersion")
  60. implementation("androidx.room:room-ktx:$roomVersion")
  61. implementation("androidx.core:core-ktx:$ktxVersion")
  62. implementation("com.microsoft.appcenter:appcenter-analytics:$appcenterVersion")
  63. implementation("com.microsoft.appcenter:appcenter-crashes:$appcenterVersion")
  64. implementation("dev.rikka.rikkax.preference:multiprocess:$muiltprocessVersion")
  65. implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion")
  66. }