build.gradle 2.9 KB

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