2017-10-23 19:51:27 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2015-10-24 18:01:55 +00:00
|
|
|
|
2019-01-19 19:28:49 +00:00
|
|
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
|
|
def keystoreProperties = new Properties()
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
|
2017-10-23 19:51:27 +00:00
|
|
|
android {
|
2023-09-16 08:44:36 +00:00
|
|
|
compileSdkVersion = 34
|
2015-10-24 18:01:55 +00:00
|
|
|
|
2017-10-23 19:51:27 +00:00
|
|
|
defaultConfig {
|
|
|
|
applicationId = "eu.faircode.netguard"
|
2024-09-01 09:08:51 +00:00
|
|
|
versionName = "2.330"
|
2018-10-17 13:57:38 +00:00
|
|
|
minSdkVersion 22
|
2023-09-16 08:44:36 +00:00
|
|
|
targetSdkVersion 34
|
2024-09-01 09:08:51 +00:00
|
|
|
versionCode = 2024090101
|
2017-10-23 19:51:27 +00:00
|
|
|
archivesBaseName = "NetGuard-v$versionName"
|
2016-02-09 11:00:14 +00:00
|
|
|
|
2017-10-23 19:51:27 +00:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2019-07-31 09:47:01 +00:00
|
|
|
cppFlags ""
|
|
|
|
arguments "-DANDROID_PLATFORM=android-22"
|
2017-10-23 19:51:27 +00:00
|
|
|
// https://developer.android.com/ndk/guides/cmake.html
|
|
|
|
}
|
2016-04-03 06:15:41 +00:00
|
|
|
}
|
|
|
|
|
2023-10-09 07:43:51 +00:00
|
|
|
ndkVersion "25.2.9519653"
|
2016-02-09 11:00:14 +00:00
|
|
|
ndk {
|
2017-12-20 16:30:00 +00:00
|
|
|
// https://developer.android.com/ndk/guides/abis.html#sa
|
2019-07-31 09:47:01 +00:00
|
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
2016-02-09 11:00:14 +00:00
|
|
|
}
|
2017-10-23 19:51:27 +00:00
|
|
|
}
|
2019-01-19 19:28:49 +00:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
storeFile file(keystoreProperties['storeFile'])
|
|
|
|
storePassword keystoreProperties['storePassword']
|
|
|
|
keyAlias keystoreProperties['keyAlias']
|
|
|
|
keyPassword keystoreProperties['keyPassword']
|
|
|
|
}
|
|
|
|
}
|
2016-02-09 11:00:14 +00:00
|
|
|
|
2018-10-02 06:11:11 +00:00
|
|
|
|
2017-10-23 19:51:27 +00:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path "CMakeLists.txt"
|
2016-01-14 14:02:32 +00:00
|
|
|
}
|
2017-10-23 19:51:27 +00:00
|
|
|
}
|
2016-02-09 11:00:14 +00:00
|
|
|
|
2017-10-23 19:51:27 +00:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled = true
|
|
|
|
proguardFiles.add(file('proguard-rules.pro'))
|
2019-01-19 19:28:49 +00:00
|
|
|
signingConfig signingConfigs.release
|
2018-12-19 14:07:36 +00:00
|
|
|
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
|
2020-09-09 20:58:33 +00:00
|
|
|
buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
|
2018-12-19 14:07:36 +00:00
|
|
|
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
|
2015-10-24 18:01:55 +00:00
|
|
|
}
|
2018-12-21 11:01:02 +00:00
|
|
|
play {
|
|
|
|
minifyEnabled = true
|
2019-01-19 19:28:49 +00:00
|
|
|
signingConfig signingConfigs.release
|
2018-12-21 11:01:02 +00:00
|
|
|
proguardFiles.add(file('proguard-rules.pro'))
|
|
|
|
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
|
|
|
|
buildConfigField "String", "HOSTS_FILE_URI", "\"\""
|
|
|
|
buildConfigField "String", "GITHUB_LATEST_API", "\"\""
|
|
|
|
}
|
2017-10-23 19:51:27 +00:00
|
|
|
debug {
|
|
|
|
minifyEnabled = true
|
|
|
|
proguardFiles.add(file('proguard-rules.pro'))
|
2018-12-19 14:07:36 +00:00
|
|
|
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
|
2020-09-09 20:58:33 +00:00
|
|
|
buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
|
2018-12-19 14:07:36 +00:00
|
|
|
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
|
2016-01-09 11:10:11 +00:00
|
|
|
}
|
|
|
|
}
|
2021-06-14 10:14:25 +00:00
|
|
|
|
|
|
|
compileOptions {
|
2023-09-16 07:40:13 +00:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
2021-06-14 10:14:25 +00:00
|
|
|
}
|
2022-01-19 07:40:23 +00:00
|
|
|
|
|
|
|
lint {
|
|
|
|
disable 'MissingTranslation'
|
|
|
|
}
|
2023-08-29 13:17:57 +00:00
|
|
|
namespace 'eu.faircode.netguard'
|
2023-09-16 09:20:10 +00:00
|
|
|
buildFeatures {
|
|
|
|
aidl true
|
|
|
|
}
|
2015-10-24 18:01:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2017-10-23 19:51:27 +00:00
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2017-09-20 07:54:28 +00:00
|
|
|
|
2019-04-16 17:46:35 +00:00
|
|
|
// https://developer.android.com/jetpack/androidx/releases/
|
2023-09-16 09:24:58 +00:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
2020-10-08 17:22:07 +00:00
|
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
2023-09-16 09:24:58 +00:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.1'
|
|
|
|
implementation 'androidx.preference:preference:1.2.1'
|
|
|
|
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
|
|
|
|
annotationProcessor 'androidx.annotation:annotation:1.7.0'
|
2017-09-20 07:54:28 +00:00
|
|
|
|
2018-01-10 05:45:15 +00:00
|
|
|
// https://bumptech.github.io/glide/
|
2023-09-16 09:24:58 +00:00
|
|
|
implementation('com.github.bumptech.glide:glide:4.14.2') {
|
2020-01-09 18:24:55 +00:00
|
|
|
exclude group: "com.android.support"
|
|
|
|
}
|
2023-09-16 09:24:58 +00:00
|
|
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
|
2015-10-24 18:01:55 +00:00
|
|
|
}
|