简体   繁体   English

Android库:maven vs maven-publish gradle项目

[英]Android Libraries: maven vs maven-publish gradle project

I'm building a large multi-module Android library, and need to publish the library to an internal company Artifactory. 我正在构建一个大型的多模块Android库,需要将该库发布到内部公司Artifactory。

Should I use the old maven plugin, or the new maven-publish plugin? 我应该使用旧的maven插件还是新的maven-publish插件?

Note: The above two official plugins don't fully support Android, so there are two community ports. 注意:以上两个官方插件并不完全支持Android,因此有两个社区端口。

Also interesting - the Android Tools team deprecated the experimental gradle plugin that was based around the SoftwareComponent model - which is what the maven-publish plugin uses. 同样有趣的是 - Android Tools团队弃用了基于SoftwareComponent模型的实验性gradle插件 - 这是maven-publish插件使用的。 Is maven-publish deprecated too then? maven-publish被弃用了吗?

I would recommend you to use new maven publish plugin . 我建议你使用新的maven发布插件 Gradle deprecated the old maven plugin with Gradle 1.3. Gradle用Gradle 1.3弃用了旧的maven插件 According to this Gradle blog post only parts of the SoftwareComponent model will be marked as deprecated and the rest is going to be ported: 根据这篇Gradle博客文章,只有部分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. 我们正在将本机支持的配置DSL移植到当前模型。 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 ... 模型块下的所有内容都将被移植为当前模型的扩展...

If you want an example for the maven-publish , Realm-Java uses it: https://github.com/realm/realm-java/blob/master/realm/realm-library/build.gradle 如果你想要一个maven-publish的例子,Realm-Java使用它: https//github.com/realm/realm-java/blob/master/realm/realm-library/build.gradle

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

相关问题 Maven在Gradle插件中发布逻辑 - Maven-publish logic inside Gradle Plugin 与Kotlin一起为Android AAR进行Maven发布 - maven-publish with Kotlin for android aars 使用 maven-publish 发布 Android apk 和 aar with build variant (Android Gradle plugin 4.0) - Use maven-publish to publish Android apk and aar with build variant (Android Gradle plugin 4.0) 用gradle maven-publish插件导出的Kotlin Android库模块未添加依赖项 - Kotlin Android Library Module exported with gradle maven-publish plugin not adding dependencies 如何将文档字符串添加到 build.gradle.kts 中的 android maven-publish.aar 文件? - How can I add docstrings to android maven-publish .aar files in build.gradle.kts? Gradle maven-publish插件生成没有依赖关系的pom - Gradle maven-publish plugin produces pom with no dependencies 在Gradle 5中为Android项目使用Maven发布插件 - Use of Maven publish plugin for Android project in Gradle 5 如何使用maven-publish gradle插件附加AAR文件的源? - How to attach sources of an AAR file with maven-publish gradle plugin? android maven-publish 生成的pom文件有不正确的本地项目依赖的依赖信息 - Android maven-publish generated pom file has incorrect dependency information for local project dependencies maven-publish 多项目工件依赖项 - maven-publish multi-project artifacts dependencies
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM