build.gradle.kts 7.1 KB

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