Open denzap opened 6 months ago
There is a system property flag that can be used-Dstudio.tests.headless=true
: https://github.com/gradle/gradle-profiler/blob/2b4653eddf5bf5e0fe0ae6198c912b64c03aa3b7/src/main/java/org/gradle/profiler/studio/launcher/StudioLauncherProvider.java#L19
This flag has to be passed to gradle-profiler Java process.
Note: It's not documented so it's considered internal. So we might change it in the future.
Thank you! That's exactly what I needed.
In case anyone else encounters a similar setup, to ensure that the gradle-profiler --benchmark ...
command with the android-studio-sync
scenario runs successfully, you need to:
local.properties
file - sdk.dir=...
.studio.tests.headless=true
, I used export JAVA_TOOL_OPTIONS=-Dstudio.tests.headless=true
before running gradle-profiler --benchmark ...
.Hedgehog
- please use Android Studio Iguana 2023.2.1.15 or newer
. https://github.com/gradle/gradle-profiler/issues/517
Hello,
I am currently working on implementing an automatic benchmark run in our project to compare two builds before and after making any changes. The benchmarking process takes place on our Continuous Integration (CI) platform without a display.
While regular scenarios with Gradle tasks are working fine, I encountered an issue when trying to implement the
android-studio-sync
scenario. Running sync requiresAndroid Studio
, and since it is a GUI application, it needs to be somehow launched in headless mode.I have attempted to start the studio with
-Djava.awt.headless=true
and usedXvfb
to create a virtual display, but these approaches did not resolve the issue. The benchmark run fails with the errorjava.lang.IllegalStateException: Timeout waiting for incoming connection from plugin.
Is there currently a way to achieve this idea in a Docker environment with a headless setup?
Thank you for your assistance.