summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2024-12-10 16:47:21 +0100
committerAlbin <albin@mullvad.net>2024-12-10 16:47:21 +0100
commitd90f4a2097b4beb49eeb87ee5befd40454c8974e (patch)
treefaad06fe2a88420b5e59969c82f97da2fd2b06a5 /android
parente946529711b30c1a23a7ef890c36545468a5eb2d (diff)
parente03ffe41b595c9e9723f6606f10ac01ac822fd21 (diff)
downloadmullvadvpn-d90f4a2097b4beb49eeb87ee5befd40454c8974e.tar.xz
mullvadvpn-d90f4a2097b4beb49eeb87ee5befd40454c8974e.zip
Merge branch 'fix-external-process-gradle-call-droid-1544'
Diffstat (limited to 'android')
-rw-r--r--android/buildSrc/src/main/kotlin/Utils.kt21
1 files changed, 7 insertions, 14 deletions
diff --git a/android/buildSrc/src/main/kotlin/Utils.kt b/android/buildSrc/src/main/kotlin/Utils.kt
index a3f3759960..ffea7ce51f 100644
--- a/android/buildSrc/src/main/kotlin/Utils.kt
+++ b/android/buildSrc/src/main/kotlin/Utils.kt
@@ -13,18 +13,11 @@ fun Project.generateVersionName(localProperties: Properties): String {
}
private fun Project.execVersionCodeCargoCommand() =
- execWithOutput { commandLine("cargo", "run", "-q", "--bin", "mullvad-version", "versionCode") }
- .toInt()
+ providers.exec {
+ commandLine("cargo", "run", "-q", "--bin", "mullvad-version", "versionCode")
+ }.standardOutput.asText.get().trim().toInt()
-private fun Project.execVersionNameCargoCommand() = execWithOutput {
- commandLine("cargo", "run", "-q", "--bin", "mullvad-version", "versionName")
-}
-
-private fun Project.execWithOutput(spec: ExecSpec.() -> Unit) =
- ByteArrayOutputStream().use { outputStream ->
- exec {
- this.spec()
- this.standardOutput = outputStream
- }
- outputStream.toString().trim()
- }
+private fun Project.execVersionNameCargoCommand() =
+ providers.exec {
+ commandLine("cargo", "run", "-q", "--bin", "mullvad-version", "versionName")
+ }.standardOutput.asText.get().trim()