简体   繁体   English

如何在 IntelliJ 中使用库的代码而不是 jar 文件

[英]How to use a library's code in IntelliJ instead of the jar file

I'm using gradle for my build tool.我正在使用 gradle 作为我的构建工具。 I have a project that uses a jar file and I have the jar file imported into my gradle for my project which works great when doing build and deploy.我有一个使用 jar 文件的项目,并且我将 jar 文件导入到我的项目的 gradle 中,这在构建和部署时效果很好。

Problem is that I'm developing the jar file along with the project.问题是我正在与项目一起开发 jar 文件。 When I change the library code, I have to build and move the jar file into my project.当我更改库代码时,我必须构建 jar 文件并将其移动到我的项目中。 PITA.皮塔饼。

Instead, I'd like to set up my IntelliJ environment so it uses the module's code first and then looks at the jar file later/never.相反,我想设置我的 IntelliJ 环境,使其首先使用模块的代码,然后稍后/从不查看 jar 文件。

It seems like something that IntelliJ should be set up to do, but searching turned up nothing and I can't seem to find anything banging around in the IDE.似乎应该设置 IntelliJ 来做一些事情,但是搜索什么也没发现,我似乎在 IDE 中找不到任何东西。

Anyone tackle this?有人解决这个问题吗?

Currently such setup is not supported for Gradle project.目前 Gradle 项目不支持此类设置。 There is however a hidden option that you may try to set:但是,您可以尝试设置一个隐藏选项:

external.system.substitute.library.dependencies = true

via "Help | Edit Custom Properties" and restart.通过“帮助|编辑自定义属性”并重新启动。

The corresponding request for this is https://youtrack.jetbrains.com/issue/IDEA-134885对此的相应请求是https://youtrack.jetbrains.com/issue/IDEA-134885

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

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