-
-
Save artem-zinnatullin/4c250e04636e25797165 to your computer and use it in GitHub Desktop.
// You can place it in the root build.gradle | |
allprojects { | |
tasks.withType(JavaForkOptions) { | |
// Forked processes like GradleWorkerMain for tests won't steal focus! | |
jvmArgs '-Djava.awt.headless=true' | |
} | |
} |
@edarchis you are welcome!
Amazing! Added this flag also to android studio tests run configuration.
Thank you!
❤️
This was annoying the heck out of me. Thanks!
@mttkay @emartynov #DevelopersWantComfort #DevelopersGetComfort
👍 thank you so much! Finally, I can use ./gradlew test -t
without losing my sanity!
Only way to make it work with tests, right now, is adding it to the Run configuration:
This helped to avoid the window to popup when running ./gradlew
:
http://stackoverflow.com/a/13849939/108742
Another Mac OS specific flag -Dapple.awt.UIElement=true
for whatever reason, the jvmArgs
thing stopped working for me recently. I had to add this to my .bashrc: export JAVA_TOOL_OPTIONS='-Djava.awt.headless=true'
Uh, same for me, thanks for receipt @edenman
if you use Gradle Kotlin DSL: gradle/kotlin-dsl-samples#439 (comment)
Thanks for the tip, exactly what I needed.