Create Library and Publish It on JitPack.

Mobile Apps Development A-Z Guide.

Volodymyr Babenko
Pharos Production
2 min readFeb 7, 2019

--

Give us a message if you’re interested in Blockchain and FinTech software development or just say Hi at Pharos Production Inc.

Most likely, many were thinking about creating their own library for further use in the application via Gradle. In my previous article, I described how to show the user a message about the absence of the Internet. Now let’s create our own library and publish it.

Step1.

In your, AndroidStudio go to File/New/New Module…

Step 2.

If using Gradle 4.6 or later, you need to make changes to the build.gradle:

  1. In root build.gradle
buildscript { 
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

2. In your library/build.gradle

apply plugin: 'com.github.dcendents.android-maven'  

group='com.github.YourUsername'

Step 3.

The next step is the most straightforward. We transfer InetMonitor and InternetAlertDialog classes into our library. And of course, do not forget about item_no_internet.xml and strings.xml.

Project tree

Step4.

For the created project it is necessary to create a repository. And in the repository to create an application release.

GitHub releases.

Step 5.

Now go to https://jitpack.io/ and register with your GitHub account. Enter the address of your repository in the search box and you will receive the address of your library!

JitPack.io

Thanks for reading!

--

--