build.gradle.kts 7.2 KB

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