Created
July 21, 2015 19:58
-
-
Save artem-zinnatullin/4c250e04636e25797165 to your computer and use it in GitHub Desktop.
Prevent Gradle Workers from taking focus! #DevelopersLikeComfort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' | |
} | |
} |
❤️
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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amazing! Added this flag also to android studio tests run configuration.
Thank you!