Bubble android client. Fork of https://git.zx2c4.com/wireguard-android/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

95 regels
3.7 KiB

  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-kapt'
  4. version wireguardVersionName
  5. group groupName
  6. // Create a variable called keystorePropertiesFile, and initialize it to your
  7. // keystore.properties file, in the rootProject folder.
  8. final def keystorePropertiesFile = rootProject.file("keystore.properties")
  9. android {
  10. buildToolsVersion '29.0.3'
  11. compileOptions {
  12. sourceCompatibility JavaVersion.VERSION_1_8
  13. targetCompatibility JavaVersion.VERSION_1_8
  14. }
  15. tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
  16. kotlinOptions {
  17. jvmTarget = '1.8'
  18. }
  19. }
  20. compileSdkVersion 29
  21. dataBinding.enabled true
  22. defaultConfig {
  23. applicationId 'com.wireguard.android'
  24. minSdkVersion 21
  25. targetSdkVersion 29
  26. versionCode wireguardVersionCode
  27. versionName wireguardVersionName
  28. buildConfigField 'int', 'MIN_SDK_VERSION', "$minSdkVersion.apiLevel"
  29. }
  30. // If the keystore file exists
  31. if (keystorePropertiesFile.exists()) {
  32. // Initialize a new Properties() object called keystoreProperties.
  33. final def keystoreProperties = new Properties()
  34. // Load your keystore.properties file into the keystoreProperties object.
  35. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  36. signingConfigs {
  37. release {
  38. keyAlias keystoreProperties['keyAlias']
  39. keyPassword keystoreProperties['keyPassword']
  40. storeFile rootProject.file(keystoreProperties['storeFile'])
  41. storePassword keystoreProperties['storePassword']
  42. }
  43. }
  44. }
  45. buildTypes {
  46. release {
  47. if (keystorePropertiesFile.exists()) signingConfig signingConfigs.release
  48. externalNativeBuild {
  49. cmake {
  50. arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}"
  51. }
  52. }
  53. minifyEnabled true
  54. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  55. }
  56. debug {
  57. applicationIdSuffix ".debug"
  58. versionNameSuffix "-debug"
  59. externalNativeBuild {
  60. cmake {
  61. arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}${applicationIdSuffix}"
  62. }
  63. }
  64. }
  65. }
  66. }
  67. dependencies {
  68. implementation project(":tunnel")
  69. implementation "androidx.annotation:annotation:$annotationsVersion"
  70. implementation "androidx.appcompat:appcompat:$appcompatVersion"
  71. implementation "androidx.cardview:cardview:$cardviewVersion"
  72. implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
  73. implementation "androidx.coordinatorlayout:coordinatorlayout:$coordinatorLayoutVersion"
  74. implementation "androidx.core:core-ktx:$coreKtxVersion"
  75. implementation "androidx.databinding:databinding-runtime:$agpVersion"
  76. implementation "androidx.fragment:fragment:$fragmentVersion"
  77. implementation "androidx.preference:preference:$preferenceVersion"
  78. implementation "com.google.android.material:material:$materialComponentsVersion"
  79. implementation "com.journeyapps:zxing-android-embedded:$zxingEmbeddedVersion"
  80. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
  81. implementation "net.sourceforge.streamsupport:android-retrofuture:$streamsupportVersion"
  82. implementation "net.sourceforge.streamsupport:android-retrostreams:$streamsupportVersion"
  83. }
  84. tasks.withType(JavaCompile) {
  85. options.compilerArgs << '-Xlint:unchecked'
  86. options.deprecation = true
  87. }