bintray - 将多模块 Gradle 工件发布到 JCenter

bintray - publishing multi-module Gradle artifacts to JCenter

my project 被组织为一个 Gradle 多项目构建,有五个 Java modules/sub-projects。构建它们时,会产生五个不同的 JAR 工件。

其中四个工件包含帮助程序 类 或代码的小而孤立的部分,用于执行非常具体的事情(例如针对我的特定用例域优化的高效图形搜索)。只有一个项目是 "main" 工件,以独立方式使用是有意义的,但它需要所有五个工件才能 运行。

我想让 this core artifact 对用户可用,并且我已成功将所有五个工件上传到 Bintray 帐户。镜像到JCenter时,我有两个顾虑:

  1. 我是否必须主动 link 所有 5 个项目到 JCenter,或者有没有办法只将 "core" 工件公开给一般 public?
  2. "Is Pom Project" 复选框有什么作用?据我了解,Gradle 为每个 Maven publication 工件创建 POM 文件,因此对于 Maven 风格的构建,应始终选中此框。这是正确的吗?

(不包含除 "I work at Bintray and I fixed it for you in our system!" 之外的解决方案的潜在重复项:

谢谢! - 格雷戈尔

希望能全部回答

  1. Do I have to actively link all 5 projects to JCenter, or is there a way to only expose the "core" artifact to the general public?

正如您附加的另一个 所说,它是在路径级别链接的,这意味着如果您将 org/worldcubeassociation/tnoodle/lib-scrambles/ 作为路径,那么 只有那些模块 将链接到 Jcenter。

  1. What does the "Is Pom Project" checkbox do? As I understand it, Gradle creates POM files for every Maven publication artifact, so this box should always be checked for Maven-style builds. Is this correct?

是的,你是对的。 POM 文件已创建并上传。您可以在 path.

中看到 POM 文件

有关更多信息,您可以随时查看中央存储库 guide