Exclude parent project dependencies from child project classpath
问题 I have parent project that defines dependency on some local libraries for all its child projects: subprojects { dependencies { compile fileTree(dir: '../somelib', include: '*.jar') } } Can I exclude some jars (or even whole library folder) from parent's dependencies in child project without touching parent build.gradle ? 回答1: Maybe this helps you. Add this in your child's project build.gradle configurations { all.collect { configuration -> configuration.exclude group: 'org.springframework.ws'