From 0b536de3fbf691fadb6063066be507d7682b6b8d Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Fri, 9 Oct 2026 14:25:56 -0400 Subject: [PATCH] Plugin build: honour the MOBILEGL_BUILD_DISAGGREGATED env fallbacks. --- android-plugin/build.gradle.kts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/android-plugin/build.gradle.kts b/android-plugin/build.gradle.kts index 8ba5c02b..dc0bffd1 100644 --- a/android-plugin/build.gradle.kts +++ b/android-plugin/build.gradle.kts @@ -31,12 +31,15 @@ subprojects { cmake { // P5 trace A/B: :MobileGL owns libMobileGL.so, not :app's replay runner. // Both flavors ship the render server, so the split shape is on by default - // (-Pmobilegl.buildDisaggregated=OFF opts out); INPROC follows it, as in - // MobileGL/build.gradle. - val disaggregated = project.findProperty("mobilegl.buildDisaggregated") ?: "ON" + // (-Pmobilegl.buildDisaggregated=OFF or MOBILEGL_BUILD_DISAGGREGATED=OFF opts + // out); INPROC follows it, as in MobileGL/build.gradle. + val disaggregated = project.findProperty("mobilegl.buildDisaggregated") + ?: System.getenv("MOBILEGL_BUILD_DISAGGREGATED") ?: "ON" + val disaggregatedInproc = project.findProperty("mobilegl.buildDisaggregatedInproc") + ?: System.getenv("MOBILEGL_BUILD_DISAGGREGATED_INPROC") ?: disaggregated arguments += listOf( "-DMOBILEGL_BUILD_DISAGGREGATED=$disaggregated", - "-DMOBILEGL_BUILD_DISAGGREGATED_INPROC=${project.findProperty("mobilegl.buildDisaggregatedInproc") ?: disaggregated}", + "-DMOBILEGL_BUILD_DISAGGREGATED_INPROC=$disaggregatedInproc", ) mobileGlCmakeCompilerLauncher().takeIf(String::isNotEmpty)?.let { compilerLauncher -> arguments += listOf(