2

I would like to globally disable all transitive dependencies. I am using the following and it works fine.

configurations.all { transitive = false } 

Problem is that I need to allow transitive dependencies for one specific dependency. Is there a way to do this?

I tried variations of the following but with no success.

compile("my:dep:xxx") { transitive = true } 

1 Answer 1

1

Try that :

configurations.all { dependencies.matching { it.group != 'my' || it.name != 'dep' }.all { transitive = false } } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.