build.gradle.kts 6.3 KB

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