How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

How can I include only specific classes from a library instead of adding the entire dependency in Gradle?

calendar_today June 10, 2026 person Ankita domain spring-boot

I’m working on a project where I only need a few specific classes from a third-party library. However, when I add the dependency in Gradle, it includes the entire library. Is there a way in Gradle to import or include only certain classes or parts of a library instead of the whole dependency?

open_in_new Read original post