mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
Fix for Qt Creator
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
@@ -11,6 +13,7 @@ kotlin {
|
|||||||
// get values from gradle or local properties
|
// get values from gradle or local properties
|
||||||
val qtTargetSdkVersion: String by gradleProperties
|
val qtTargetSdkVersion: String by gradleProperties
|
||||||
val qtTargetAbiList: String by gradleProperties
|
val qtTargetAbiList: String by gradleProperties
|
||||||
|
val outputBaseName: String by gradleProperties
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "org.amnezia.vpn"
|
namespace = "org.amnezia.vpn"
|
||||||
@@ -76,6 +79,17 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fix for Qt Creator to allow deploying the application to a device
|
||||||
|
// to enable this fix, add the line outputBaseName=android-build to local.properties
|
||||||
|
if (outputBaseName.isNotEmpty()) {
|
||||||
|
applicationVariants.all {
|
||||||
|
outputs.map { it as BaseVariantOutputImpl }
|
||||||
|
.forEach { output ->
|
||||||
|
output.outputFileName = "$outputBaseName-${buildType.name}.apk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lint {
|
lint {
|
||||||
disable += "InvalidFragmentVersionForActivityResult"
|
disable += "InvalidFragmentVersionForActivityResult"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ private class PropertyDelegate(
|
|||||||
private val localProperties: Properties = localProperties(rootDir)
|
private val localProperties: Properties = localProperties(rootDir)
|
||||||
) : ReadOnlyProperty<Any?, String> {
|
) : ReadOnlyProperty<Any?, String> {
|
||||||
override fun getValue(thisRef: Any?, property: KProperty<*>): String =
|
override fun getValue(thisRef: Any?, property: KProperty<*>): String =
|
||||||
providers.gradleProperty(property.name).orNull ?: localProperties.getProperty(property.name)
|
providers.gradleProperty(property.name).orNull ?: localProperties.getProperty(property.name).orEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
private lateinit var settingsPropertyDelegate: ReadOnlyProperty<Any?, String>
|
private lateinit var settingsPropertyDelegate: ReadOnlyProperty<Any?, String>
|
||||||
|
|||||||
Reference in New Issue
Block a user