googlesamples / unity-jar-resolver

Unity plugin which resolves Android & iOS dependencies and performs version management
Other
1.29k stars 348 forks source link

How to exclude a library from dependencies #251

Open mahdi-malv opened 5 years ago

mahdi-malv commented 5 years ago

Hi. In Gradle, there's an option to exclude a library from one's dependencies to avoid it from being added. Like:

implementation("androidx.work:work-rxjava2:${versions.workManager}")  
{ exclude group: 'io.reactivex.rxjava2', module: 'rxjava' }

So when I want to add another library that is a custom version of rxjava, there won't be any duplicate entry error.

Is there any feature in jar resolver?

p.s. If I use mainTemplate.gradle, I can do this manually, but if I don't, I can't.

a-maurice commented 5 years ago

Hi @mahdi-malv

Unfortunately there is no such feature in the jar resolver. As you mention though, you can accomplish something like this using the mainTemplate.gradle, if need be.

vitorbaraujo commented 5 years ago

I believe this would be a great addition to the jar-resolver