DEV Community

Nedim
Nedim

Posted on

My own android library?

Introduction to topic

I am doing android development for over one and half year. I have been making app after app using different third libraries to achieve my end goal and getting all sorts of app features figured out.
In latest android app that I am building for client, little thought crossed my mind. What if I wanted to change behavior of the library and add my functions to it?
What then happens?

Eureka part

If you have good grap of Java or Kotlin this will be easy to follow. If not go build more apps and get better at it.Then come back here I promise we won't run away.

We need that one thing changed or library is really great but kind of buggy we are on mission to fix it. First step check if wanted library is open source . Open source means that we can do what ever we want with it in terms of coding of course.

Follow trough

What are steps we need to take to get our own version of library.

  • Fork the existing project or clone project you wanna change and push it new repository on Bitbucket or Github
  • Go to file you want a change ,in our example we want to change only res value of the library.
  • Save changes
  • Go to JitPack and sign in with your Github account.
  • Add name of your project to Lookup spot [username]/[NameOfTheLib]
  • Get version and click on GET it button

Now you have all parts to use and implement it in your app

End result

  • Add JitPack in your app build.gradle
    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }
  • Implementation in app
dependencies {
            implementation 'com.github.username:LibName:Tag'
    }

Source nedim.co

Top comments (0)