build.gradle.kts 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. import org.jetbrains.kotlin.cli.jvm.main
  2. plugins {
  3. id("com.android.application")
  4. id("org.jetbrains.kotlin.android")
  5. id("com.google.gms.google-services")
  6. id("com.google.firebase.crashlytics")
  7. id("org.jetbrains.kotlin.kapt")
  8. }
  9. android {
  10. namespace = "com.vpn.fastestvpnservice"
  11. compileSdk = 34
  12. defaultConfig {
  13. applicationId = "com.vpn.fastestvpnservice"
  14. minSdk = 21
  15. targetSdk = 34
  16. versionCode = 33800
  17. versionName = "3.3.8"
  18. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  19. ndk {
  20. abiFilters.add("arm64-v8a")
  21. abiFilters.add("armeabi-v7a")
  22. abiFilters.add("x86")
  23. abiFilters.add("x86_64")
  24. }
  25. vectorDrawables {
  26. useSupportLibrary = true
  27. }
  28. // resConfigs("en","de","fr","es")
  29. // multiDexEnabled = true
  30. }
  31. bundle {
  32. language {
  33. @Suppress("UnstableApiUsage")
  34. enableSplit = false
  35. }
  36. }
  37. buildTypes {
  38. release {
  39. isMinifyEnabled = false
  40. proguardFiles(
  41. getDefaultProguardFile("proguard-android-optimize.txt"),
  42. "proguard-rules.pro"
  43. )
  44. }
  45. debug {
  46. isMinifyEnabled = false
  47. proguardFiles(
  48. getDefaultProguardFile("proguard-android-optimize.txt"),
  49. "proguard-rules.pro"
  50. )
  51. }
  52. }
  53. packagingOptions {
  54. jniLibs {
  55. useLegacyPackaging = true
  56. }
  57. }
  58. compileOptions {
  59. isCoreLibraryDesugaringEnabled = true
  60. sourceCompatibility = JavaVersion.VERSION_1_8
  61. targetCompatibility = JavaVersion.VERSION_1_8
  62. }
  63. kotlinOptions {
  64. jvmTarget = "1.8"
  65. }
  66. buildFeatures {
  67. compose = true
  68. viewBinding = true
  69. }
  70. dataBinding {
  71. enable = true
  72. }
  73. composeOptions {
  74. kotlinCompilerExtensionVersion = "1.5.1"
  75. }
  76. packaging {
  77. resources {
  78. excludes += "/META-INF/{AL2.0,LGPL2.1}"
  79. }
  80. }
  81. sourceSets {
  82. getByName("main") {
  83. aidl {
  84. srcDirs("src/main/aidl")
  85. }
  86. }
  87. }
  88. lintOptions {
  89. disable("MissingTranslation")
  90. }
  91. buildToolsVersion = "30.0.2"
  92. ndkVersion = "19.2.5345600"
  93. }
  94. dependencies {
  95. implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
  96. implementation("androidx.core:core-ktx:1.12.0")
  97. implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
  98. implementation("androidx.activity:activity-compose:1.8.2")
  99. implementation("androidx.fragment:fragment-ktx:1.6.2")
  100. implementation("androidx.activity:activity-ktx:1.8.2")
  101. implementation(platform("androidx.compose:compose-bom:2023.08.00"))
  102. implementation("androidx.compose.ui:ui")
  103. implementation("androidx.compose.ui:ui-graphics")
  104. implementation("androidx.compose.ui:ui-tooling-preview")
  105. implementation("androidx.compose.material3:material3:1.2.0")
  106. implementation("androidx.compose.material:material:1.6.1")
  107. implementation("androidx.navigation:navigation-compose:2.7.7")
  108. implementation("androidx.compose.material:material-icons-extended:1.6.1")
  109. implementation("androidx.compose.ui:ui-text-google-fonts:1.6.1")
  110. implementation("androidx.compose.foundation:foundation:1.6.3")
  111. // Retrofit
  112. implementation("com.squareup.retrofit2:retrofit:2.9.0")
  113. implementation("com.squareup.retrofit2:converter-gson:2.9.0")
  114. implementation("com.squareup.okhttp3:logging-interceptor:4.9.0")
  115. // Coroutines
  116. implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1")
  117. implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
  118. implementation("androidx.compose.runtime:runtime-livedata:1.6.1")
  119. implementation("com.wireguard.android:tunnel:1.0.20210211")
  120. implementation("androidx.navigation:navigation-fragment:2.7.7")
  121. implementation("androidx.appcompat:appcompat:1.6.1")
  122. implementation("com.google.android.material:material:1.11.0")
  123. implementation("com.google.accompanist:accompanist-pager-indicators:0.30.1")
  124. // Ping
  125. implementation("com.github.stealthcopter:AndroidNetworkTools:0.4.5.3")
  126. // Billing
  127. implementation("com.android.billingclient:billing:6.1.0")
  128. implementation("io.coil-kt:coil-compose:1.3.1")
  129. implementation("com.google.accompanist:accompanist-drawablepainter:0.34.0")
  130. implementation("com.google.firebase:firebase-crashlytics:18.6.2")
  131. implementation("com.google.firebase:firebase-messaging:23.4.1")
  132. implementation("com.google.firebase:firebase-analytics:21.5.1") //16.0.6
  133. // implementation("com.firebase:firebase-jobdispatcher:0.8.5")
  134. implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")
  135. implementation("com.google.zxing:core:3.4.1")
  136. implementation("com.journeyapps:zxing-android-embedded:3.6.0")
  137. // implementation("androidmads.library.qrgenerator:QRGenerator:1.0.3")
  138. // android view
  139. implementation("androidx.constraintlayout:constraintlayout:2.0.4")
  140. implementation("androidx.activity:activity:1.8.0")
  141. // implementation("com.google.firebase:firebase-database-ktx:21.0.0")
  142. val leanback_version = "1.0.0"
  143. implementation("androidx.leanback:leanback:$leanback_version")
  144. implementation("androidx.leanback:leanback-preference:$leanback_version")
  145. implementation("com.skyfishjy.ripplebackground:library:1.0.1")
  146. implementation("androidx.navigation:navigation-fragment:2.3.0")
  147. implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5")
  148. implementation("com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.44")
  149. implementation("androidx.recyclerview:recyclerview:1.1.0")
  150. coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
  151. testImplementation("junit:junit:4.13.2")
  152. androidTestImplementation("androidx.test.ext:junit:1.1.5")
  153. androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
  154. androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
  155. androidTestImplementation("androidx.compose.ui:ui-test-junit4")
  156. debugImplementation("androidx.compose.ui:ui-tooling")
  157. debugImplementation("androidx.compose.ui:ui-test-manifest")
  158. val room_version = "2.6.1"
  159. implementation("androidx.room:room-runtime:$room_version")
  160. annotationProcessor("androidx.room:room-compiler:$room_version")
  161. // To use Kotlin annotation processing tool (kapt)
  162. kapt("androidx.room:room-compiler:$room_version")
  163. // TV
  164. implementation("androidx.tv:tv-foundation:1.0.0-alpha10")
  165. implementation("androidx.tv:tv-material:1.0.0-beta01")
  166. implementation ("com.google.firebase:firebase-analytics-ktx:22.0.2")
  167. implementation("com.google.firebase:firebase-database:20.0.6")
  168. //strongswan
  169. android{
  170. sourceSets {
  171. getByName("main") {
  172. jni.srcDirs(emptyList<String>())
  173. jniLibs.srcDirs("src/main/libs")
  174. }
  175. }
  176. }
  177. tasks.register<Exec>("buildNative") {
  178. workingDir = file("src/main/jni")
  179. commandLine(android.ndkDirectory.absolutePath + "/ndk-build", "-j", Runtime.getRuntime().availableProcessors().toString())
  180. }
  181. tasks.register<Exec>("cleanNative") {
  182. workingDir = file("src/main/jni")
  183. commandLine(android.ndkDirectory.absolutePath + "/ndk-build", "clean")
  184. }
  185. tasks.withType<JavaCompile> {
  186. dependsOn("buildNative")
  187. options.compilerArgs.addAll(listOf("-Xlint:unchecked", "-Xlint:deprecation"))
  188. }
  189. tasks.getByName("clean").dependsOn("cleanNative")
  190. }