Debug Server
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.

100 lines
3.5 KiB

  1. apply plugin: 'com.android.application'
  2. def keystorePropertiesFile = rootProject.file("keystore.properties")
  3. def keystoreProperties = new Properties()
  4. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  5. android {
  6. compileSdkVersion = 31
  7. defaultConfig {
  8. applicationId = "eu.faircode.netguard"
  9. versionName = "2.303"
  10. minSdkVersion 22
  11. targetSdkVersion 31
  12. versionCode = 2022111001
  13. archivesBaseName = "NetGuard-v$versionName"
  14. externalNativeBuild {
  15. cmake {
  16. cppFlags ""
  17. arguments "-DANDROID_PLATFORM=android-22"
  18. // https://developer.android.com/ndk/guides/cmake.html
  19. }
  20. }
  21. //ndkVersion "21.4.7075529"
  22. ndk {
  23. // https://developer.android.com/ndk/guides/abis.html#sa
  24. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  25. }
  26. }
  27. signingConfigs {
  28. release {
  29. storeFile file(keystoreProperties['storeFile'])
  30. storePassword keystoreProperties['storePassword']
  31. keyAlias keystoreProperties['keyAlias']
  32. keyPassword keystoreProperties['keyPassword']
  33. }
  34. }
  35. externalNativeBuild {
  36. cmake {
  37. path "CMakeLists.txt"
  38. }
  39. }
  40. buildTypes {
  41. release {
  42. minifyEnabled = true
  43. proguardFiles.add(file('proguard-rules.pro'))
  44. signingConfig signingConfigs.release
  45. buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
  46. buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
  47. buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
  48. }
  49. play {
  50. minifyEnabled = true
  51. signingConfig signingConfigs.release
  52. proguardFiles.add(file('proguard-rules.pro'))
  53. buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
  54. buildConfigField "String", "HOSTS_FILE_URI", "\"\""
  55. buildConfigField "String", "GITHUB_LATEST_API", "\"\""
  56. }
  57. debug {
  58. minifyEnabled = true
  59. proguardFiles.add(file('proguard-rules.pro'))
  60. buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
  61. buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
  62. buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
  63. }
  64. }
  65. compileOptions {
  66. sourceCompatibility JavaVersion.VERSION_1_7
  67. targetCompatibility JavaVersion.VERSION_1_7
  68. }
  69. lint {
  70. disable 'MissingTranslation'
  71. }
  72. }
  73. dependencies {
  74. implementation fileTree(dir: 'libs', include: ['*.jar'])
  75. // https://developer.android.com/jetpack/androidx/releases/
  76. implementation 'androidx.appcompat:appcompat:1.3.1'
  77. implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
  78. implementation 'androidx.recyclerview:recyclerview:1.2.1'
  79. implementation 'androidx.preference:preference:1.1.1'
  80. implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
  81. annotationProcessor 'androidx.annotation:annotation:1.2.0'
  82. // https://bumptech.github.io/glide/
  83. implementation('com.github.bumptech.glide:glide:4.11.0') {
  84. exclude group: "com.android.support"
  85. }
  86. annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
  87. }