简体   繁体   English

通过 IntelliJ IDEA 中的 Gradle 依赖 OptaPlanner

[英]OptaPlanner dependencies via Gradle within IntelliJ IDEA

I read through the OptaPlanner documentation and within, it describes how the dependencies can be mapped with Maven, Gradle, etc. That said, it only references the Maven POM configuration.我通读了 OptaPlanner 文档,其中描述了如何使用 Maven、Gradle 等映射依赖项。也就是说,它只引用了 Maven POM 配置。 Does anyone happen to know the dependency mapping for Gradle?有没有人碰巧知道 Gradle 的依赖映射? I'm a bit green with automated dependency management and would love NOT to have to download and manually map the Jar file(s).我对自动依赖管理有点陌生,并且希望不必下载和手动映射 Jar 文件。 I've grown to enjoy Gradle, except when I can't find a Gradle option for dependencies.我越来越喜欢 Gradle,除非我找不到依赖项的 Gradle 选项。 =( =(

Your help would be appreciated.您的帮助将不胜感激。

Best Regards!此致!

Follow the documentation , open the Maven repository page for the dependency you need .按照文档,打开您需要的依赖项Maven 存储库页面

On the right you will see the format for Gradle:在右侧,您将看到 Gradle 的格式:

implementation 'org.optaplanner:optaplanner-core:7.20.0.Final'

In IntelliJ IDEA open build.gradle file and inside the dependencies section of this file paste this very line .在 IntelliJ IDEA 中打开build.gradle文件并在该文件的dependencies部分粘贴这一行 Refresh Gradle projects as suggested by the IDE notification to get the dependency downloaded and added to the project.按照 IDE 通知的建议刷新 Gradle 项目,以下载依赖项并将其添加到项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM