build.gradle 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. plugins {
  2. id 'com.android.application'
  3. id 'org.jetbrains.kotlin.android'
  4. // TODO: 1202468796234411
  5. // id 'org.jetbrains.kotlin.plugin.serialization'
  6. id 'com.google.devtools.ksp'
  7. id 'org.sirekanyan.version-checker'
  8. id 'kotlin-parcelize'
  9. }
  10. android {
  11. namespace 'org.sirekanyan.warmongr'
  12. compileSdk 34
  13. defaultConfig {
  14. applicationId project.hasProperty("legacyPackageName") ? "com.sirekanian.warmongr" : "org.sirekanyan.warmongr"
  15. minSdk 21
  16. targetSdk 34
  17. versionCode appVersionCode as int
  18. versionName appVersionName
  19. base.archivesName = "$applicationId-$versionName-$versionCode"
  20. vectorDrawables {
  21. useSupportLibrary true
  22. }
  23. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  24. }
  25. buildTypes {
  26. release {
  27. minifyEnabled true
  28. shrinkResources true
  29. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.pro'
  30. if (findProperty("signingConfig") == "release") {
  31. signingConfig = signingConfigs.create("release") {
  32. storeFile(file(System.getenv("SIGNING_KEYSTORE_FILE")))
  33. storePassword(System.getenv("SIGNING_KEYSTORE_PASSWORD"))
  34. keyAlias(System.getenv("SIGNING_KEY_ALIAS"))
  35. keyPassword(System.getenv("SIGNING_KEY_PASSWORD"))
  36. }
  37. }
  38. }
  39. }
  40. compileOptions {
  41. sourceCompatibility JavaVersion.VERSION_11
  42. targetCompatibility JavaVersion.VERSION_11
  43. }
  44. kotlin {
  45. jvmToolchain(17)
  46. }
  47. buildFeatures {
  48. compose true
  49. }
  50. composeOptions {
  51. kotlinCompilerExtensionVersion composeCompilerVersion
  52. }
  53. packagingOptions {
  54. resources {
  55. excludes += '/META-INF/{AL2.0,LGPL2.1}'
  56. }
  57. }
  58. kotlinOptions {
  59. jvmTarget = "11"
  60. allWarningsAsErrors = true
  61. }
  62. lint {
  63. warningsAsErrors true
  64. }
  65. }
  66. ksp {
  67. arg('room.schemaLocation', "$projectDir/schemas")
  68. }
  69. dependencies {
  70. // androidx compose
  71. implementation "androidx.compose.material:material:$composeMaterialVersion"
  72. implementation 'androidx.activity:activity-compose:1.7.2'
  73. // androidx room
  74. implementation "androidx.room:room-runtime:$roomVersion"
  75. implementation "androidx.room:room-ktx:$roomVersion"
  76. ksp "androidx.room:room-compiler:$roomVersion"
  77. /* TODO: 1202468796234411
  78. implementation "io.ktor:ktor-client-cio:$ktorVersion"
  79. implementation "io.ktor:ktor-client-content-negotiation:$ktorVersion"
  80. implementation "io.ktor:ktor-client-encoding:$ktorVersion"
  81. implementation "io.ktor:ktor-serialization-kotlinx-json:$ktorVersion"
  82. */
  83. // tests
  84. androidTestImplementation("androidx.test.ext:junit:1.1.5")
  85. androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
  86. androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0")
  87. }