4

有没有办法让 IntelliJ 使用 gradle 自动更新到依赖项的最新快照?

我目前有两个项目,A 和 B。A 是 B 使用的库。我同时从头开始开发它们。

我有一个 Jenkins 构建,它从开发分支检查代码,运行 gradle 构建脚本,然后将工件发布到我的快照工件存储库。

build.gradle设置为使用我的快照存储库中的 integration.latest,但 IntelliJ 不会自动提取更改。我必须去jetgradle,点击刷新然后导入新的快照,然后删除之前的快照。

有没有更简单的方法?

4

2 回答 2

1

So it seems like there is not a way to pull in the latest snapshot automatically. I wanted to have nicely modularized library projects but still actively develop them at the same time I was working on projects that depended on them.

I ended up creating a main project with its own build.gradle. I then added git submodules for my library projects.

This allows me to have separated library projects that I can reuse but also a fast development cycle as I don't have to wait for artifacts to get pushed to my artifactory server.

My Jenkins builds still pull artifacts from my artifactory server though.

于 2012-10-21T22:42:11.217 回答
0

如果您更新项目 A 中的本地代码并希望看到它们反映在项目 B 中并以 A 作为依赖项,您应该gradle install在项目 A 上运行。(安装在 IntelliJ 任务面板上可用)安装将更新本地 maven 存储库中的 jar,并且将使用最新代码更新 IntelliJ。

于 2014-04-08T17:10:04.860 回答