2023-12-05 23:53:49 +03:00
|
|
|
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
|
|
|
|
|
2023-11-14 22:58:47 +03:00
|
|
|
plugins {
|
|
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
|
alias(libs.plugins.kotlin.android)
|
2024-06-18 20:46:21 +03:00
|
|
|
alias(libs.plugins.kotlin.serialization)
|
2023-11-14 22:58:47 +03:00
|
|
|
id("property-delegate")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
|
jvmToolchain(17)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// get values from gradle or local properties
|
|
|
|
|
val qtTargetSdkVersion: String by gradleProperties
|
|
|
|
|
val qtTargetAbiList: String by gradleProperties
|
2023-12-05 23:53:49 +03:00
|
|
|
val outputBaseName: String by gradleProperties
|
2023-11-14 22:58:47 +03:00
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
namespace = "org.amnezia.vpn"
|
|
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
viewBinding = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
androidResources {
|
|
|
|
|
// don't compress Qt binary resources file
|
|
|
|
|
noCompress += "rcc"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
packaging {
|
|
|
|
|
// compress .so binary libraries
|
|
|
|
|
jniLibs.useLegacyPackaging = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
applicationId = "org.amnezia.vpn"
|
|
|
|
|
targetSdk = qtTargetSdkVersion.toInt()
|
|
|
|
|
|
|
|
|
|
// keeps language resources for only the locales specified below
|
|
|
|
|
resourceConfigurations += listOf("en", "ru", "b+zh+Hans")
|
2026-05-04 16:59:24 +02:00
|
|
|
ndk.abiFilters += qtTargetAbiList.split(",")
|
2023-11-14 22:58:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
|
getByName("main") {
|
|
|
|
|
manifest.srcFile("AndroidManifest.xml")
|
2023-11-15 22:10:44 +03:00
|
|
|
java.setSrcDirs(listOf("src"))
|
|
|
|
|
res.setSrcDirs(listOf("res"))
|
|
|
|
|
// androyddeployqt creates the folders below
|
2023-11-14 22:58:47 +03:00
|
|
|
assets.setSrcDirs(listOf("assets"))
|
|
|
|
|
jniLibs.setSrcDirs(listOf("libs"))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
release {
|
|
|
|
|
// exclude coroutine debug resource from release build
|
|
|
|
|
packaging {
|
|
|
|
|
resources.excludes += "DebugProbesKt.bin"
|
|
|
|
|
}
|
2023-12-05 23:53:49 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-21 22:48:52 +03:00
|
|
|
lint {
|
|
|
|
|
disable += "InvalidFragmentVersionForActivityResult"
|
|
|
|
|
}
|
2023-11-14 22:58:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2023-11-15 22:10:44 +03:00
|
|
|
implementation(project(":qt"))
|
2023-11-16 15:15:02 +03:00
|
|
|
implementation(project(":utils"))
|
2023-11-23 15:45:55 +03:00
|
|
|
implementation(project(":protocolApi"))
|
2023-11-23 16:45:15 +03:00
|
|
|
implementation(project(":wireguard"))
|
2023-11-26 13:07:31 +03:00
|
|
|
implementation(project(":awg"))
|
2023-11-28 20:07:39 +03:00
|
|
|
implementation(project(":openvpn"))
|
2024-06-18 20:46:21 +03:00
|
|
|
implementation(project(":xray"))
|
2023-11-14 22:58:47 +03:00
|
|
|
implementation(libs.androidx.core)
|
2023-11-21 22:48:52 +03:00
|
|
|
implementation(libs.androidx.activity)
|
2024-09-09 14:36:33 +03:00
|
|
|
implementation(libs.androidx.fragment)
|
2023-11-14 22:58:47 +03:00
|
|
|
implementation(libs.kotlinx.coroutines)
|
2024-06-18 20:46:21 +03:00
|
|
|
implementation(libs.kotlinx.serialization.protobuf)
|
2023-11-14 22:58:47 +03:00
|
|
|
implementation(libs.bundles.androidx.camera)
|
|
|
|
|
implementation(libs.google.mlkit)
|
2024-03-04 18:08:55 +03:00
|
|
|
implementation(libs.androidx.datastore)
|
2024-09-09 14:36:33 +03:00
|
|
|
implementation(libs.androidx.biometric)
|
2023-11-14 22:58:47 +03:00
|
|
|
}
|