Ahmad Mahmoud Saleh
Ahmad Mahmoud Saleh

Reputation: 169

How to exclude a specific library from Android module (Library)

I built an Android library and published it on Jitpack.io, in this library I'm using some other libraries for debugging purposes such as Facebook Flipper and Hyperion but I don't want to export these libraries, meaning, I don't want these libraries' files to make its way to anyone who is going to use my library, How can I do that ?

Upvotes: 1

Views: 1745

Answers (1)

Murph_Fish
Murph_Fish

Reputation: 359

Looks like you want to define gradle dependencies based on build or flavor. For example :

debugImplementation "example.debug:dependency"

Now when you build your artifact, you just build a non debug variant and the dependency will not be included.

You can read more here: https://developer.android.com/studio/build/dependencies#dependency_configurations

Upvotes: 3

Related Questions