小编San*_*ica的帖子

为什么我收到警告“此构建使用了过时的 Gradle 函数,这使得它与 Gradle 8.0 不兼容”。?

当使用--warning-mode all 键运行时,我得到以下信息。

The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the mainClass property instead. See https://docs.gradle.org/7.3/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main for more details.
Run Code Online (Sandbox Code Playgroud)

但我不使用这个参数,我使用mainClass

构建.gradle

plugins {
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.10'
    id 'org.beryx.jlink' version '2.24.4'
}

repositories {
    mavenCentral()
}

application {
    mainModule = 'pigletmodule'
    mainClass = 'piglet.Main'
}

javafx {
    version = "17.0.1"
    modules = ['javafx.controls']
}

jlink {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher { …
Run Code Online (Sandbox Code Playgroud)

java gradle build.gradle

7
推荐指数
1
解决办法
5170
查看次数

手动运行 git 操作时如何指定特定提交?

如何创建只能手动启动的工作流程,同时需要指定与其一起工作的特定提交?

workflow github-actions

5
推荐指数
2
解决办法
3232
查看次数

标签 统计

build.gradle ×1

github-actions ×1

gradle ×1

java ×1

workflow ×1