Compile configuration subset


(Paolo Finamore) #1

Hi Everyone,

Is it possible to specify a configuration subset or declare a configuration which is a subset of another?

Given the following dependencies section:

dependencies{
compile 'log4j:log4j:1.2.16',
'com.sun.xml.ws:jaxws-rt:2.2.1',
'com.sun.xml.ws:jaxws-tools:2.2.1',
'org.hibernate:hibernate-entitymanager:5.2.11.Final',
'javax:javaee-api:7.0'
}

i would remove A SUBSET (all but log4j) of those dependencies in the eclipse classpath section. The following code remove properly ALL the dependencies declared in compile configuration:

eclipse {
classpath {
minusConfiguration += [ configurations.compile ]
}
}

Thanks in advance