53 lines
2.1 KiB
Groovy
53 lines
2.1 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
}
|
|
|
|
android {
|
|
namespace "su.cin.rapvpn"
|
|
compileSdk 35
|
|
|
|
signingConfigs {
|
|
release {
|
|
// Для тестовой среды используем debug-сертификат как fallback, чтобы APK всегда можно было установить.
|
|
// Когда будет отдельный keystore для prod/release — заменим на него в этом блоке.
|
|
initWith signingConfigs.debug
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig true
|
|
}
|
|
|
|
def normalizeGradleString = { value ->
|
|
return (value == null ? "" : value.toString()).replace("\\", "\\\\").replace("\"", "\\\"")
|
|
}
|
|
|
|
def defaultBackendUrl = project.findProperty("RAP_ANDROID_DEFAULT_BACKEND_URL") ?: "http://192.168.200.61:18080/api/v1"
|
|
def defaultFabricBootstrapPeers = project.findProperty("RAP_ANDROID_FABRIC_BOOTSTRAP_PEERS") ?: "quic://192.168.200.85:18080,quic://195.123.240.88:19131"
|
|
def defaultClusterId = project.findProperty("RAP_ANDROID_DEFAULT_CLUSTER_ID") ?: "cfc0743d-d960-49fb-9de8-96e063d5e4aa"
|
|
def defaultOrganizationId = project.findProperty("RAP_ANDROID_DEFAULT_ORGANIZATION_ID") ?: "125ff8b2-5ac1-4406-9bbb-ebbe18f7c7ed"
|
|
|
|
defaultConfig {
|
|
applicationId "su.cin.rapvpn"
|
|
minSdk 26
|
|
targetSdk 35
|
|
versionCode 227
|
|
versionName "0.2.227"
|
|
buildConfigField "String", "DEFAULT_BACKEND_URL", "\"${normalizeGradleString(defaultBackendUrl)}\""
|
|
buildConfigField "String", "FABRIC_BOOTSTRAP_PEERS", "\"${normalizeGradleString(defaultFabricBootstrapPeers)}\""
|
|
buildConfigField "String", "DEFAULT_CLUSTER_ID", "\"${normalizeGradleString(defaultClusterId)}\""
|
|
buildConfigField "String", "DEFAULT_ORGANIZATION_ID", "\"${normalizeGradleString(defaultOrganizationId)}\""
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation files("libs/rap-fabricvpn.aar")
|
|
implementation "com.squareup.okhttp3:okhttp:5.3.2"
|
|
}
|