ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Follow publication

Android Libraries on GitHub Packages

Chen Zhang
ProAndroidDev
Published in
6 min readMay 6, 2020

--

TL;DR

GitHub Packages

Why do I use package repositories at work?

Example of using Github Packages for Android libraries

An Example Project

Goals for example project to achieve
api 'com.chenzhang2006.libraries:droidlib:x.x.x'
implementation 'com.chenzhang2006.libraries:droidlib2:x.x.x'

Explaining Publishing Script

publish.gradle for droidlibrary2
apply from: file('publish.gradle')
apply plugin: 'maven-publish'
declare publication for droidlib2
Gradle script to expose API dependencies as transitive dependency

Perform Publishing

Available granular publishing tasks
pom.xml

gradlew :droidlibrary:publish

Client Side Gradle Setup and Run

implementation 'com.chenzhang2006.libraries:droidlib2:x.x.x'

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

No responses yet