星火管控
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 10 месеци
пре 11 месеци
пре 10 месеци
пре 11 месеци
пре 10 месеци
пре 10 месеци
пре 11 месеци
пре 11 месеци
пре 11 месеци
пре 11 месеци
пре 10 месеци
пре 11 месеци
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. @file:Suppress("CAST_NEVER_SUCCEEDS")
  2. import java.text.SimpleDateFormat
  3. import java.util.Date
  4. @Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
  5. plugins {
  6. alias(libs.plugins.androidApplication)
  7. alias(libs.plugins.kotlinAndroid)
  8. }
  9. android {
  10. namespace = "com.xhkjedu.manageapp"
  11. compileSdk = 34
  12. defaultConfig {
  13. applicationId = "com.xhkjedu.manageapp"
  14. minSdk = 24
  15. targetSdk = 30
  16. versionCode = 1
  17. versionName = "1.0"
  18. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  19. vectorDrawables {
  20. useSupportLibrary = true
  21. }
  22. }
  23. viewBinding{
  24. enable=true
  25. }
  26. signingConfigs {
  27. create("keystore") {
  28. keyAlias = "xinghuo"
  29. keyPassword = "xhkjedu"
  30. storeFile = file("xinghuo.keystore")
  31. storePassword = "xhkjedu"
  32. }
  33. }
  34. buildTypes {
  35. /* release {
  36. isMinifyEnabled = false
  37. proguardFiles(
  38. getDefaultProguardFile("proguard-android-optimize.txt"),
  39. "proguard-rules.pro"
  40. )
  41. }*/
  42. val signConfig=signingConfigs.getByName("keystore")
  43. getByName("release") {
  44. isMinifyEnabled = false
  45. proguardFiles(
  46. getDefaultProguardFile("proguard-android-optimize.txt"),
  47. "proguard-rules.pro"
  48. )
  49. signingConfig=signConfig
  50. }
  51. getByName("debug") {
  52. isMinifyEnabled = false
  53. proguardFiles(
  54. getDefaultProguardFile("proguard-android-optimize.txt"),
  55. "proguard-rules.pro"
  56. )
  57. signingConfig=signConfig
  58. }
  59. }
  60. compileOptions {
  61. sourceCompatibility = JavaVersion.VERSION_1_8
  62. targetCompatibility = JavaVersion.VERSION_1_8
  63. }
  64. kotlinOptions {
  65. jvmTarget = "1.8"
  66. }
  67. buildFeatures {
  68. compose = true
  69. }
  70. composeOptions {
  71. kotlinCompilerExtensionVersion = "1.4.3"
  72. }
  73. packaging {
  74. resources {
  75. excludes += "/META-INF/{AL2.0,LGPL2.1}"
  76. }
  77. }
  78. lint {
  79. abortOnError=false
  80. }
  81. fun releaseTime(): String {
  82. val dateFormat = SimpleDateFormat("yyyyMMdd")
  83. return dateFormat.format(Date())
  84. }
  85. android.applicationVariants.all {variant->
  86. variant.outputs.all {output->
  87. val versionName = variant.versionName
  88. val versionCode = variant.versionCode
  89. val variantName = variant.name
  90. val apkName = "Manage_App-$variantName-$versionName-$versionCode-${releaseTime()}.apk"
  91. output.outputFile.renameTo(File(output.outputFile.parentFile,apkName))
  92. }
  93. }
  94. }
  95. dependencies {
  96. implementation(libs.core.ktx)
  97. implementation(libs.lifecycle.runtime.ktx)
  98. implementation(libs.activity.compose)
  99. implementation(platform(libs.compose.bom))
  100. implementation(libs.ui)
  101. implementation(libs.ui.graphics)
  102. implementation(libs.ui.tooling.preview)
  103. implementation(libs.material3)
  104. implementation(libs.appcompat)
  105. implementation(libs.androidx.recyclerview)
  106. implementation(project(mapOf("path" to ":websocket")))
  107. implementation(libs.androidx.cardview)
  108. testImplementation(libs.junit)
  109. androidTestImplementation(libs.androidx.test.ext.junit)
  110. androidTestImplementation(libs.espresso.core)
  111. androidTestImplementation(platform(libs.compose.bom))
  112. androidTestImplementation(libs.ui.test.junit4)
  113. debugImplementation(libs.ui.tooling)
  114. debugImplementation(libs.ui.test.manifest)
  115. }