github软件包怎么用_GitHub软件包上的Android库

github软件包怎么用

TL; DR (TL;DR)

An example Android project and walk-through of how to publish and consume libraries via GitHub Packages, along with features and tips such as achieving transitive dependencies through Gradle API dependency, source code availability in published package and local publishing through custom repo or MavenLocal.

一个Android项目示例,以及如何通过GitHub软件包发布和使用库的演练以及功能和技巧,例如通过Gradle API依赖关系实现传递依赖关系,已发布包中的源代码可用性以及通过自定义repo或MavenLocal进行本地发布。

GitHub软件包 (GitHub Packages)

GitHub Packages is a new package repository, a.k.a artifactory, service from Github. According to its documentation, they support a list of common package standards such as Maven, npm, Docker, RubyGems and NuGet. Android uses Maven to manage library packages. Compared to other Maven solutions, such as Nexus, JitPack & JFrog, Github Packages has become my favorite pick for the following reasons:

GitHub Packages是来自Github的新软件包存储库,又名人工制品。 根据其文档 ,它们支持一系列常见的软件包标准,例如Maven,npm,Docker,RubyGems和NuGet 。 Android使用Maven来管理库包。 与Nexus,JitPack和JFrog等其他Maven解决方案相比, Github Packages已成为我最喜欢的选择,原因如下:

  1. Packages live in one place with their source code repository(Github). Easier for navigation and lookup between the two.

    软件包及其源代码存储库(Github)放在一个地方。 两者之间的导航和查找更加容易。
  2. Share the same authentication credential(Personal Access Token) and permission system on Github.

    在Github上共享相同的身份验证凭据( 个人访问令牌 )和权限系统。

  3. Straightforward setup and we don’t need DevOps support.

    简单的设置,我们不需要DevOps支持。
  4. Large free data quota for Enterprise accounts.

    企业帐户的大量免费数据配额

为什么在工作中使用软件包存储库? (Why do I use package repositories at work?)

As an Application-Platform engineer, my recent work has been to abstract common layers of application architectures(e.g. MVI base classes, View component layer) into central repositories, publish them into libraries then consume them by client apps through Gradle dependencies. Example:

作为一名应用程序平台工程师,我最近的工作是将应用程序体系结构的常见层(例如MVI基类,视图组件层)抽象到中央存储库中,将其发布到库中,然后由客户端应用程序通过Gradle依赖项使用它们。 例:

Image for post
Example of using Github Packages for Android libraries
对Android库使用Github软件包的示例

一个示例项目 (An Example Project)

Let me use an example project to demo how to leverage Github Packages as an artifactory to publish and consume Android libraries.

让我使用一个示例项目来演示如何利用Github软件包作为发布和使用Android库的工件。

Goals

目标

This is what we would like to achieve with the project:

这是我们希望通过该项目实现的目标:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值