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(