隐藏在使用Intellij时的Gradle守护程序的Java图标,macOS的dock?

huangapple go评论75阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年10月7日 04:59:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/64233708.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定