显示Gradle的飞溅屏幕

发布于 2025-02-06 15:51:32 字数 996 浏览 2 评论 0原文

启动我的Java应用程序时,我会显示下一个蚂蚁目标的Splash屏幕:

<target name="default" description="run program via classpath">
    <echo message="var.distribute.version.type=${var.distribute.version.type}" />
    <ac:switch value="${var.distribute.version.type}">
        <ac:case value="${prop.distribute.version.lite}">
            <ac:runtarget target="compile-lite" />
        </ac:case>
        <ac:case value="${prop.distribute.version.pro}">
            <ac:runtarget target="compile-pro" />
        </ac:case>
    </ac:switch>
    <echo>Running with classpath=${toString:run.classpath}</echo>
    <java classname="${main.class}" fork="true">
        <jvmarg value="-splash:${images.dir}/splash.png" />
        <classpath refid="run.classpath" />
    </java>
</target>

尼斯。这是工作。但是现在我需要对Gradle做同样的事情。 Gradle如何展示飞溅屏幕?

我通过此操作我的Java应用程序:

gradle run

When start my java application I show splash screen usging the next Ant target:

<target name="default" description="run program via classpath">
    <echo message="var.distribute.version.type=${var.distribute.version.type}" />
    <ac:switch value="${var.distribute.version.type}">
        <ac:case value="${prop.distribute.version.lite}">
            <ac:runtarget target="compile-lite" />
        </ac:case>
        <ac:case value="${prop.distribute.version.pro}">
            <ac:runtarget target="compile-pro" />
        </ac:case>
    </ac:switch>
    <echo>Running with classpath=${toString:run.classpath}</echo>
    <java classname="${main.class}" fork="true">
        <jvmarg value="-splash:${images.dir}/splash.png" />
        <classpath refid="run.classpath" />
    </java>
</target>

Nice. It's work. But now I need to do the same by Gradle. How show splash screen by Gradle?

I run my java app by this:

gradle run

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文