mirror of https://github.com/M66B/NetGuard.git
92 lines
3.1 KiB
Groovy
92 lines
3.1 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
def keystoreProperties = new Properties()
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
android {
|
|
compileSdkVersion = 29
|
|
|
|
defaultConfig {
|
|
applicationId = "eu.faircode.netguard"
|
|
versionName = "2.269"
|
|
minSdkVersion 22
|
|
targetSdkVersion 29
|
|
versionCode = 2019102901
|
|
archivesBaseName = "NetGuard-v$versionName"
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
cppFlags ""
|
|
arguments "-DANDROID_PLATFORM=android-22"
|
|
// https://developer.android.com/ndk/guides/cmake.html
|
|
}
|
|
}
|
|
|
|
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']
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
disable 'MissingTranslation'
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path "CMakeLists.txt"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled = true
|
|
useProguard = true
|
|
proguardFiles.add(file('proguard-rules.pro'))
|
|
signingConfig signingConfigs.release
|
|
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
|
|
buildConfigField "String", "HOSTS_FILE_URI", "\"http://www.netguard.me/hosts\""
|
|
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
|
|
}
|
|
play {
|
|
minifyEnabled = true
|
|
useProguard = 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
|
|
useProguard = true
|
|
proguardFiles.add(file('proguard-rules.pro'))
|
|
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
|
|
buildConfigField "String", "HOSTS_FILE_URI", "\"http://www.netguard.me/hosts\""
|
|
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
// https://developer.android.com/jetpack/androidx/releases/
|
|
implementation 'androidx.appcompat:appcompat:1.0.2'
|
|
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
|
annotationProcessor 'androidx.annotation:annotation:1.0.2'
|
|
|
|
// https://bumptech.github.io/glide/
|
|
implementation 'com.github.bumptech.glide:glide:4.9.0'
|
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
|
|
}
|