π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Replace deprecated Gradle process APIs
Manav Rathi2d8ffb1dc95d
diff --git a/android/apps/ensu/app/build.gradle.kts b/android/apps/ensu/app/build.gradle.ktsindex c85b517723..bc90ab9328 100644--- a/android/apps/ensu/app/build.gradle.kts+++ b/android/apps/ensu/app/build.gradle.kts@@ -1,4 +1,3 @@-import java.io.ByteArrayOutputStreamimport java.util.Propertiesimport org.jetbrains.kotlin.gradle.dsl.JvmTarget@@ -22,13 +21,7 @@ if (hasReleaseKeystore) {val knownAbis = listOf("arm64-v8a", "armeabi-v7a", "x86_64")fun capture(vararg cmd: String): String? = runCatching {- val out = ByteArrayOutputStream()- exec {- commandLine(*cmd)- standardOutput = out- errorOutput = ByteArrayOutputStream()- }- out.toString().trim()+ providers.exec { commandLine(*cmd) }.standardOutput.asText.get().trim()}.getOrNull()diff --git a/android/apps/ensu/rust/build.gradle.kts b/android/apps/ensu/rust/build.gradle.ktsindex 865d7eefe2..f24509433e 100644--- a/android/apps/ensu/rust/build.gradle.kts+++ b/android/apps/ensu/rust/build.gradle.kts@@ -1,4 +1,3 @@-import java.io.ByteArrayOutputStreamimport org.jetbrains.kotlin.gradle.dsl.JvmTargetplugins {@@ -12,13 +11,7 @@ val debugJniLibsDir = layout.buildDirectory.dir("generated/jniLibs/debug")val releaseJniLibsDir = layout.buildDirectory.dir("generated/jniLibs/release")fun capture(vararg cmd: String): String? = runCatching {- val out = ByteArrayOutputStream()- exec {- commandLine(*cmd)- standardOutput = out- errorOutput = ByteArrayOutputStream()- }- out.toString().trim()+ providers.exec { commandLine(*cmd) }.standardOutput.asText.get().trim()}.getOrNull()@@ -58,7 +51,7 @@ fun registerBuildRustJni(outputDir: Provider<Directory>,resolveAbis: () -> List<String>,) =- tasks.register(taskName) {+ tasks.register<Exec>(taskName) {val abis = resolveAbis()inputs.files(fileTree(file("../../../../rust")) { exclude("**/target/**") })@@ -67,7 +60,7 @@ fun registerBuildRustJni(inputs.property("ndk", providers.provider { android.ndkVersion })outputs.dir(outputDir)- doLast {+ doFirst {val version = android.ndkVersionval ndkDir = runCatching {android.ndkDirectory@@ -81,21 +74,19 @@ fun registerBuildRustJni(outDir.deleteRecursively()outDir.mkdirs()- exec {- workingDir = file("scripts")- commandLine(- "bash",- "./build-rust.sh",- "--toolchain",- toolchain.absolutePath,- "--out-dir",- outDir.absolutePath,- *abis.toTypedArray(),- )- environment("ANDROID_NDK", ndkDir.absolutePath)- environment("ANDROID_NDK_ROOT", ndkDir.absolutePath)- environment("NDK_ROOT", ndkDir.absolutePath)- }+ workingDir = file("scripts")+ commandLine(+ "bash",+ "./build-rust.sh",+ "--toolchain",+ toolchain.absolutePath,+ "--out-dir",+ outDir.absolutePath,+ *abis.toTypedArray(),+ )+ environment("ANDROID_NDK", ndkDir.absolutePath)+ environment("ANDROID_NDK_ROOT", ndkDir.absolutePath)+ environment("NDK_ROOT", ndkDir.absolutePath)}}