OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to Add My Android Library's Dependencies in Github Packages?

  • Thread starter Thread starter Qazi Fahim Farhan
  • Start date Start date
Q

Qazi Fahim Farhan

Guest
I am building an Android library (say, MyLibrary) which will be added to other apps of my company. The library has some dependencies in the build.gradle file like this:

Code:
dependencies{
    implementation 'com.alimuzaffar.lib:pinentryedittext:2.0.6'
    implementation "com.google.android.gms:play-services-auth-api-phone:17.3.0"
// ... other dependencies
}

After making the library, I created a Github package, so I can add it to another app (say AppDemo) in AppDemos build.gradle file like this:

Code:
dependencies{
    implementation 'com.mycompany:mylibrary:1.2.3'
    // other dependencies
}

The problem is I get dependency errors, that is, MyLibrarys dependencies (in this example, pinentryedittext , play-services-auth-api-phone as shown in the library's build.gradle file above) are missing. I have googled the problem and tried out some solutions, such as, Mobbeel fataar gradle plugin,and some other similar plugins, but I could not make them work. Could anyone help my with this or give me a working sample? Any help will be appreciable.
<p>I am building an Android library (say, <code>MyLibrary</code>) which will be added to other apps of my company. The library has some dependencies in the <code>build.gradle</code> file like this:</p>

<pre><code>dependencies{
implementation 'com.alimuzaffar.lib:pinentryedittext:2.0.6'
implementation "com.google.android.gms:play-services-auth-api-phone:17.3.0"
// ... other dependencies
}

</code></pre>

<p>After making the library, I created a Github package, so I can add it to another app (say <code>AppDemo</code>) in <code>AppDemo</code>s <code>build.gradle</code> file like this:</p>

<pre><code>dependencies{
implementation 'com.mycompany:mylibrary:1.2.3'
// other dependencies
}
</code></pre>

<p>The problem is I get dependency errors, that is, <code>MyLibrary</code>s dependencies (in this example, <code>pinentryedittext</code> , <code>play-services-auth-api-phone</code> as shown in the library's <code>build.gradle</code> file above) are missing.
I have googled the problem and tried out some solutions, such as, <a href="https://github.com/Mobbeel/fataar-gradle-plugin" rel="noreferrer">Mobbeel fataar gradle plugin</a>,and some other similar plugins, but I could not make them work.
Could anyone help my with this or give me a working sample? Any help will be appreciable. </p>
Continue reading...
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top