我正在使用Gradle插件。在构建结束时,它说:
“该构建中使用了弃用的Gradle功能,使其与Gradle 8.0不兼容。
使用' - 打击模式所有'显示各个折衷警告
。 不存在
对我来说
。在线版本不确定为什么在任何情况下都应该弃用任何功能
。
I am using the Gradle plugin. At the end of the build it says:
"Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings."
But I have no idea to pass a command line option to Gradle in IDEA. I've read several suggestions to add it to the gradle.properties folder but it doesn't exist for me.
I've tried adding it to gradle-wrapper.properties but that isn't correct and doesn't change anything.
Preferably I suppose I would like to not use any deprecated gradle features. I downloaded the latest version online not sure why any of the features should be deprecated in any case.
Has anyone ever solved this before? Other answer to questions hasn't fixed the issue and I seem lost on this.
发布评论
评论(3)
使用
gradle.properties
file 。Use
org.gradle.warning.mode=(all,fail,summary,none)
in thegradle.properties
file.要禁用此警告,添加属性
org.gradle.warning.mode = none
gradle.properties 文件,无论是在项目级别还是在全球级别上。gradle.properties
将其禁用全球
将其附加到
gradle.properties
位于.gradle
文件夹中的文件夹中的用户主目录。要在一个步骤中进行:运行:
按照文档
环境
To disable this warning add the property
org.gradle.warning.mode=None
to the gradle.properties file, either at project level or at a global level.gradle.properties
To disable it globally
Append it to a
gradle.properties
located at the.gradle
folder in the user home directory.To do so in one step, run:
Below the valid values as per the documentation
Environment
我和其他人遇到的问题是找到gradle.properties文件。实际上,我本可以创建它。解决方案:
如果您的构建没有Gradle.properties文件,则只需在项目目录中创建文件即可。
在目录中,编写以下命令:org.gradle.warning.mode = all [这将记录未弃用的内容]
解决该问题,也可以完全消除警告,如果您选择的话。
希望这有助于一个让我发疯的人。
The problem I and other people were having was locating the gradle.properties file. Actually, I could have just created it. Solution:
If your build doesn't have the gradle.properties file just create the file in the project directory.
In the directory, write the following command: org.gradle.warning.mode=all [this will log whatever is deprecated]
Fix the issue or you can just eliminate the warnings altogether if you so choose.
Hope this helps someone it was driving me nuts.