|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Conf2ScopeMappingContainer
Defines a set of rules for how to map the Gradle dependencies to a pom. This mapping is based on the configuration the dependencies belong to.
Field Summary | |
---|---|
static String |
COMPILE
|
static String |
PROVIDED
|
static String |
RUNTIME
|
static String |
TEST
|
Method Summary | |
---|---|
Conf2ScopeMappingContainer |
addMapping(int priority,
Configuration configuration,
String scope)
Specifies that dependencies of a certain configuration should be mapped against a certain Maven scope. |
Conf2ScopeMapping |
getMapping(Collection<Configuration> configurations)
Returns a scope that corresponds to the given configurations. |
Map<Configuration,Conf2ScopeMapping> |
getMappings()
Returns a map with all the configuration to scope mappings. |
boolean |
isSkipUnmappedConfs()
Returns whether unmapped configuration should be skipped or not. |
void |
setSkipUnmappedConfs(boolean skipDependenciesWithUnmappedConfiguration)
Sets, whether unmapped configuration should be skipped or not. |
Field Detail |
---|
static final String PROVIDED
static final String COMPILE
static final String RUNTIME
static final String TEST
Method Detail |
---|
Conf2ScopeMappingContainer addMapping(int priority, Configuration configuration, String scope)
Specifies that dependencies of a certain configuration should be mapped against a certain Maven scope. A configuration can be mapped to one and only one scope. If this method is called more than once for a particular configuration, the last call wins.
SeegetMapping(java.util.Collection)
for the rules how a scope is choosen from a set of mappings.
priority
- a number that is used for comparison with the priority of other scopes.configuration
- a Gradle configuration name (must not be null).scope
- A Maven scope name (must not be null)
getMapping(java.util.Collection)
Conf2ScopeMapping getMapping(Collection<Configuration> configurations)
Which scope is returned depends on the existing mappings. See addMapping(int, Configuration, String)
. If
only one configuration is mapped, this mapping is used to choose the scope. If more than one configuration of a
dependency is mapped, and those mappings all map to the same scope, this scope is used. If more than one
configuration is mapped and the mappings map to different scopes, the mapping with the highest priority is used.
If there is more than one mapping with the highest priority and those mappings map to different scopes, an
exception is thrown.
configurations
- The configuration
addMapping(int, Configuration, String)
Map<Configuration,Conf2ScopeMapping> getMappings()
addMapping(int, Configuration, String)
boolean isSkipUnmappedConfs()
setSkipUnmappedConfs(boolean)
void setSkipUnmappedConfs(boolean skipDependenciesWithUnmappedConfiguration)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |