build.gradle.kts 6.3 KB

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