build.gradle.kts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import org.lineageos.generatebp.GenerateBpPlugin
  2. import org.lineageos.generatebp.GenerateBpPluginExtension
  3. import org.lineageos.generatebp.models.Module
  4. plugins {
  5. id("com.android.library")
  6. id("org.jetbrains.kotlin.android")
  7. }
  8. apply {
  9. plugin<GenerateBpPlugin>()
  10. }
  11. android {
  12. namespace = "im.angry.openeuicc_deps"
  13. compileSdk = 34
  14. defaultConfig {
  15. minSdk = 28
  16. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  17. consumerProguardFiles("consumer-rules.pro")
  18. }
  19. buildTypes {
  20. release {
  21. isMinifyEnabled = false
  22. proguardFiles(
  23. getDefaultProguardFile("proguard-android-optimize.txt"),
  24. "proguard-rules.pro"
  25. )
  26. }
  27. }
  28. compileOptions {
  29. sourceCompatibility = JavaVersion.VERSION_1_8
  30. targetCompatibility = JavaVersion.VERSION_1_8
  31. }
  32. kotlinOptions {
  33. jvmTarget = "1.8"
  34. }
  35. }
  36. dependencies {
  37. api("androidx.core:core-ktx:1.12.0")
  38. api("androidx.appcompat:appcompat:1.6.1")
  39. api("com.google.android.material:material:1.10.0")
  40. api("androidx.constraintlayout:constraintlayout:2.1.4")
  41. //noinspection KtxExtensionAvailable
  42. api("androidx.preference:preference:1.2.1")
  43. api("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
  44. api("androidx.lifecycle:lifecycle-service:2.6.2")
  45. api("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
  46. api("androidx.cardview:cardview:1.0.0")
  47. api("androidx.viewpager2:viewpager2:1.1.0")
  48. api("androidx.datastore:datastore-preferences:1.0.0")
  49. api("com.journeyapps:zxing-android-embedded:4.3.0")
  50. testImplementation("junit:junit:4.13.2")
  51. androidTestImplementation("androidx.test.ext:junit:1.1.5")
  52. androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
  53. }
  54. configure<GenerateBpPluginExtension> {
  55. targetSdk.set(android.compileSdk!!)
  56. availableInAOSP.set { module: Module ->
  57. when {
  58. module.group == "androidx.datastore" -> false
  59. module.group.startsWith("androidx") -> true
  60. module.group == "com.google.android.material" -> true
  61. module.group.startsWith("org.jetbrains") -> true
  62. else -> false
  63. }
  64. }
  65. }