From 2cb556a87ad54d166f46391711a614416d4900a5 Mon Sep 17 00:00:00 2001 From: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:22:41 +0200 Subject: [PATCH] android: Support custom build profiles (#44182) Pass the build directory to gradle via an environment variable, to support custom profiles. Building the custom profiles already works, but follow-up commands expect the artifact at the location of the profile. This allows switching the android release build to production (in a follow-up PR). Testing: We don't run any runtime tests for android in CI --------- Signed-off-by: Jonathan Schwender --- support/android/apk/buildSrc/src/main/kotlin/Interop.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/support/android/apk/buildSrc/src/main/kotlin/Interop.kt b/support/android/apk/buildSrc/src/main/kotlin/Interop.kt index d81b6d53a22..b3f970d73bb 100644 --- a/support/android/apk/buildSrc/src/main/kotlin/Interop.kt +++ b/support/android/apk/buildSrc/src/main/kotlin/Interop.kt @@ -23,7 +23,10 @@ fun Project.getNativeTargetDir(debug: Boolean, arch: String): String { } fun getSubTargetDir(debug: Boolean, arch: String): String { - return getRustTarget(arch) + "/" + if (debug) "debug" else "release" + val buildTypeDirectory = System.getenv("SERVO_TARGET_DIR") + ?.let { File(it).name } + ?: if (debug) "debug" else "release" + return getRustTarget(arch) + "/" + buildTypeDirectory } fun Project.getJniLibsPath(debug: Boolean, arch: String): String =