gpt4 book ai didi

Android 库 : maven vs maven-publish gradle project

转载 作者:IT老高 更新时间:2023-10-28 23:07:11 26 4
gpt4 key购买 nike

我正在构建一个大型多模块 Android 库,需要将该库发布到公司内部的 Artifactory。

我应该使用旧的 maven插件,或新的 maven-publish插件?

注意:以上两个官方插件并不完全支持Android,所以有两个社区端口。

也很有趣 - Android 工具团队 deprecated the experimental gradle plugin这是基于 SoftwareComponent 模型 - 这是 maven-publish 插件使用的。 maven-publish 是否也被弃用了?

最佳答案

我建议您使用新的 maven publish plugin . Gradle 弃用了旧的 maven plugin使用 Gradle 1.3。据此Gradle blog post只有部分 SoftwareComponent 模型将被标记为已弃用,其余部分将被移植:

... You may therefore be wondering what is happening to the Software Model. We’re in the process of porting the configuration DSL of the native support to the current model. So the declarative nature and strong modelling language will be the same. The rule engine that was part of the Software Model will be deprecated. Everything under the model block will be ported as extensions to the current model ...

如果您想要 maven-publish 的示例,Realm-Java 使用它:https://github.com/realm/realm-java/blob/master/realm/realm-library/build.gradle

关于Android 库 : maven vs maven-publish gradle project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48469235/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com