gradle exclude dependency jar from parent subprojects

For example, i have 10 sub modules in my project, root build.gradle like:

subprojects {
    dependencies {
        compile 'a'
        compile 'b'
        compile 'c'
    }
}

But module A do not need dependency jar a, how can i exclude a in A's build.gradle?

1 answer

  • answered 2018-11-08 07:10 ajianzheng

    I've solved it:

    configurations.compile.exclude.module: 'a'