NetGuard/app/build.gradle

105 lines
3.6 KiB
Groovy

apply plugin: 'com.android.application'
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
compileSdkVersion = 34
defaultConfig {
applicationId = "eu.faircode.netguard"
versionName = "2.322"
minSdkVersion 22
targetSdkVersion 34
versionCode = 2023100401
archivesBaseName = "NetGuard-v$versionName"
externalNativeBuild {
cmake {
cppFlags ""
arguments "-DANDROID_PLATFORM=android-22"
// https://developer.android.com/ndk/guides/cmake.html
}
}
ndkVersion "25.2.9519653"
ndk {
// https://developer.android.com/ndk/guides/abis.html#sa
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
signingConfigs {
release {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
buildTypes {
release {
minifyEnabled = true
proguardFiles.add(file('proguard-rules.pro'))
signingConfig signingConfigs.release
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
}
play {
minifyEnabled = true
signingConfig signingConfigs.release
proguardFiles.add(file('proguard-rules.pro'))
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "HOSTS_FILE_URI", "\"\""
buildConfigField "String", "GITHUB_LATEST_API", "\"\""
}
debug {
minifyEnabled = true
proguardFiles.add(file('proguard-rules.pro'))
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lint {
disable 'MissingTranslation'
}
namespace 'eu.faircode.netguard'
buildFeatures {
aidl true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// https://developer.android.com/jetpack/androidx/releases/
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
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'
// https://bumptech.github.io/glide/
implementation('com.github.bumptech.glide:glide:4.14.2') {
exclude group: "com.android.support"
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
}