Making magic with the network stack
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.

105 lines
3.7 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. storeFile file("my.keystore")
  34. storePassword "store_password"
  35. keyAlias "my_key_alias"
  36. keyPassword "key_password"
  37. }
  38. }
  39. externalNativeBuild {
  40. cmake {
  41. path "CMakeLists.txt"
  42. }
  43. }
  44. buildTypes {
  45. release {
  46. minifyEnabled = true
  47. proguardFiles.add(file('proguard-rules.pro'))
  48. signingConfig signingConfigs.release
  49. buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
  50. buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
  51. buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
  52. }
  53. play {
  54. minifyEnabled = true
  55. signingConfig signingConfigs.release
  56. proguardFiles.add(file('proguard-rules.pro'))
  57. buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
  58. buildConfigField "String", "HOSTS_FILE_URI", "\"\""
  59. buildConfigField "String", "GITHUB_LATEST_API", "\"\""
  60. }
  61. debug {
  62. minifyEnabled = true
  63. proguardFiles.add(file('proguard-rules.pro'))
  64. buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
  65. buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
  66. buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
  67. }
  68. }
  69. compileOptions {
  70. sourceCompatibility JavaVersion.VERSION_1_7
  71. targetCompatibility JavaVersion.VERSION_1_7
  72. }
  73. lint {
  74. disable 'MissingTranslation'
  75. }
  76. }
  77. dependencies {
  78. implementation fileTree(dir: 'libs', include: ['*.jar'])
  79. // https://developer.android.com/jetpack/androidx/releases/
  80. implementation 'androidx.appcompat:appcompat:1.3.1'
  81. implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
  82. implementation 'androidx.recyclerview:recyclerview:1.2.1'
  83. implementation 'androidx.preference:preference:1.1.1'
  84. implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
  85. annotationProcessor 'androidx.annotation:annotation:1.2.0'
  86. // https://bumptech.github.io/glide/
  87. implementation('com.github.bumptech.glide:glide:4.11.0') {
  88. exclude group: "com.android.support"
  89. }
  90. annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
  91. }