build.gradle.kts 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. import kotlin.random.Random
  2. plugins {
  3. alias(libs.plugins.android.application)
  4. alias(libs.plugins.kotlin.android)
  5. alias(libs.plugins.kotlin.serialization)
  6. alias(libs.plugins.kotlin.parcelize)
  7. alias(libs.plugins.compose.compiler)
  8. alias(libs.plugins.devtools)
  9. alias(libs.plugins.about.libraries)
  10. }
  11. android {
  12. namespace = "app.revanced.manager"
  13. compileSdk = 35
  14. buildToolsVersion = "35.0.0"
  15. defaultConfig {
  16. applicationId = "app.revanced.manager"
  17. minSdk = 26
  18. targetSdk = 35
  19. versionCode = 1
  20. versionName = "0.0.1"
  21. vectorDrawables.useSupportLibrary = true
  22. }
  23. buildTypes {
  24. debug {
  25. applicationIdSuffix = ".debug"
  26. resValue("string", "app_name", "ReVanced Manager (dev)")
  27. buildConfigField("long", "BUILD_ID", "${Random.nextLong()}L")
  28. }
  29. release {
  30. if (!project.hasProperty("noProguard")) {
  31. isMinifyEnabled = true
  32. isShrinkResources = true
  33. proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
  34. }
  35. if (project.hasProperty("signAsDebug")) {
  36. applicationIdSuffix = ".debug"
  37. resValue("string", "app_name", "ReVanced Manager Debug")
  38. signingConfig = signingConfigs.getByName("debug")
  39. }
  40. buildConfigField("long", "BUILD_ID", "0L")
  41. }
  42. }
  43. compileOptions {
  44. sourceCompatibility = JavaVersion.VERSION_17
  45. targetCompatibility = JavaVersion.VERSION_17
  46. }
  47. dependenciesInfo {
  48. includeInApk = false
  49. includeInBundle = false
  50. }
  51. packaging {
  52. resources.excludes.addAll(listOf(
  53. "/prebuilt/**",
  54. "META-INF/DEPENDENCIES",
  55. "META-INF/**.version",
  56. "DebugProbesKt.bin",
  57. "kotlin-tooling-metadata.json",
  58. "org/bouncycastle/pqc/**.properties",
  59. "org/bouncycastle/x509/**.properties",
  60. ))
  61. jniLibs {
  62. useLegacyPackaging = true
  63. }
  64. }
  65. ksp {
  66. arg("room.schemaLocation", "$projectDir/schemas")
  67. }
  68. kotlinOptions {
  69. jvmTarget = "17"
  70. }
  71. buildFeatures {
  72. compose = true
  73. aidl = true
  74. buildConfig = true
  75. }
  76. android {
  77. androidResources {
  78. generateLocaleConfig = true
  79. }
  80. }
  81. externalNativeBuild {
  82. cmake {
  83. path = file("src/main/cpp/CMakeLists.txt")
  84. version = "3.22.1"
  85. }
  86. }
  87. }
  88. kotlin {
  89. jvmToolchain(17)
  90. }
  91. dependencies {
  92. // AndroidX Core
  93. implementation(libs.androidx.ktx)
  94. implementation(libs.runtime.ktx)
  95. implementation(libs.runtime.compose)
  96. implementation(libs.splash.screen)
  97. implementation(libs.activity.compose)
  98. implementation(libs.work.runtime.ktx)
  99. implementation(libs.preferences.datastore)
  100. implementation(libs.appcompat)
  101. // Compose
  102. implementation(platform(libs.compose.bom))
  103. implementation(libs.compose.ui)
  104. implementation(libs.compose.ui.preview)
  105. implementation(libs.compose.ui.tooling)
  106. implementation(libs.compose.livedata)
  107. implementation(libs.compose.material.icons.extended)
  108. implementation(libs.compose.material3)
  109. implementation(libs.navigation.compose)
  110. // Accompanist
  111. implementation(libs.accompanist.drawablepainter)
  112. // Placeholder
  113. implementation(libs.placeholder.material3)
  114. // HTML Scraper
  115. implementation(libs.skrapeit.dsl)
  116. implementation(libs.skrapeit.parser)
  117. // Coil (async image loading, network image)
  118. implementation(libs.coil.compose)
  119. implementation(libs.coil.appiconloader)
  120. // KotlinX
  121. implementation(libs.kotlinx.serialization.json)
  122. implementation(libs.kotlinx.collection.immutable)
  123. implementation(libs.kotlinx.datetime)
  124. // Room
  125. implementation(libs.room.runtime)
  126. implementation(libs.room.ktx)
  127. annotationProcessor(libs.room.compiler)
  128. ksp(libs.room.compiler)
  129. // ReVanced
  130. implementation(libs.revanced.patcher)
  131. implementation(libs.revanced.library)
  132. // Downloader plugins
  133. implementation(project(":downloader-plugin"))
  134. // Native processes
  135. implementation(libs.kotlin.process)
  136. // HiddenAPI
  137. compileOnly(libs.hidden.api.stub)
  138. // LibSU
  139. implementation(libs.libsu.core)
  140. implementation(libs.libsu.service)
  141. implementation(libs.libsu.nio)
  142. // Koin
  143. implementation(libs.koin.android)
  144. implementation(libs.koin.compose)
  145. implementation(libs.koin.compose.navigation)
  146. implementation(libs.koin.workmanager)
  147. // Licenses
  148. implementation(libs.about.libraries)
  149. // Ktor
  150. implementation(libs.ktor.core)
  151. implementation(libs.ktor.logging)
  152. implementation(libs.ktor.okhttp)
  153. implementation(libs.ktor.content.negotiation)
  154. implementation(libs.ktor.serialization)
  155. // Markdown
  156. implementation(libs.markdown.renderer)
  157. // Fading Edges
  158. implementation(libs.fading.edges)
  159. // Scrollbars
  160. implementation(libs.scrollbars)
  161. // EnumUtil
  162. implementation(libs.enumutil)
  163. ksp(libs.enumutil.ksp)
  164. // Reorderable lists
  165. implementation(libs.reorderable)
  166. // Compose Icons
  167. implementation(libs.compose.icons.fontawesome)
  168. }