I wonder if there is any way to subtract from a configuration in a similar way that you do extendsFrom?
What I’m trying to achieve is this:
I’m building a WAR file and I’m using the “provided” configuration from Nebulas plugin (and another configuration that is a bit of a hack) to avoid getting some dependencies in the classpath:
I personally consider excluding / subtracting to be a hacky practice and always try to avoid it if possible. In this case you may accidentally subtract a transitive dependency that’s in two configurations. Are you sure there’s not a solution to group your dependencies into configurations and only add together what you need for a given scenario?
Also, are you aware of the compileOnly configuration added in gradle 2.12?
As I said in my previous post, this is not the preferred way of doing things But as so many times you got what you got and need to handle it. Moving over to compileOnly is one of the reasons I want to see the current classpath so that I can use a plugin that compares the old classpath to the new when I change the configuration.
I’m thinking of temporary hacking together something that can output the current classpath so I can continue and remove the horrible configuration hack that I got now