英文:
Hide Gradle daemon's Java icon on macOS dock when using Intellij?
问题
我对Intellij、macOS和gradle都不太熟悉,但我想隐藏macOS dock中与gradle守护进程相关的Java图标。在我的zshenv(类似于bashrc或bash_profile)中设置JAVA_TOOL_OPTIONS="-Dapple.awt.UIElement=true
(如此处所述),在命令行中运行时已经足够,但在从Intellij运行构建时不起作用。
我还尝试在我的主目录gradle.properties文件中使用org.gradle.jvmargs
来设置守护进程标志,使用相同的标志(org.gradle.jvmargs=-Dapple.awt.UIElement=true
),但是所有的-D
标志似乎都被删除了(无论是从终端运行还是从Intellij运行,这似乎是一个独立的问题,鉴于您应该能够使用该参数设置-D
标志),因此没有任何效果。
肯定有一种简单的方法来做到这一点。
英文:
I'm new to Intellij, macOS, and gradle, and would like to hide the Java icons from the macOS dock associated the gradle daemon processes. Setting JAVA_TOOL_OPTIONS="-Dapple.awt.UIElement=true
(as described here) in my zshenv (similar to bashrc or bash_profile) is sufficient when running from the command line, but does not work when running the build from Intellij.
I also tried setting the daemon flags using org.gradle.jvmargs
with the same flag (org.gradle.jvmargs=-Dapple.awt.UIElement=true
) in my home gradle.properties file, but all -D
flags are somehow stripped out (regardless of whether or not it's being run from the terminal or from Intellij, which seems like its own issue, given that you should be able to set -D
flags with this parameter), and thus has no effect.
Surely there is an easy way to do this?
答案1
得分: 2
在项目根目录的 gradle.properties
文件中设置类似于 systemProp.apple.awt.UIElement=true
的属性应该会起作用。
英文:
Setting the property like systemProp.apple.awt.UIElement=true
in gradle.properties
file in project root directory should work.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论