public class MultiPlatformTargetConfigurationTransformer extends Object implements TargetConfigurationTransformer
TargetConfigurationTransformer
that transforms a single target configuration with a
multiplatform as a target platform to multiple target configurations each containing platforms
that are forming multiplatform.
For example, a multiplatform "A" contains "B" as a base platform and "X", "Y", "Z" as nested platforms. In this case a target configuration with the "A" platform will be transformed to a set of platforms: "A", "X", "Y", "Z". Note that this transformation doesn't use "B" since the multiplatform uses its base platform to match constraints. Using the multiplatform instead of the base platform allows us to keep the rest of attributes (that don't use transformations) consistent with attributes that use transformations.
Constructor and Description |
---|
MultiPlatformTargetConfigurationTransformer(TargetPlatformResolver targetPlatformResolver) |
Modifier and Type | Method and Description |
---|---|
boolean |
needsTransformation(TargetConfiguration targetConfiguration,
DependencyStack dependencyStack) |
com.google.common.collect.ImmutableList<TargetConfiguration> |
transform(TargetConfiguration targetConfiguration,
DependencyStack dependencyStack)
Transforms a single target configurations into multiple target configurations.
|
public MultiPlatformTargetConfigurationTransformer(TargetPlatformResolver targetPlatformResolver)
public com.google.common.collect.ImmutableList<TargetConfiguration> transform(TargetConfiguration targetConfiguration, DependencyStack dependencyStack)
TargetConfigurationTransformer
transform
in interface TargetConfigurationTransformer
public boolean needsTransformation(TargetConfiguration targetConfiguration, DependencyStack dependencyStack)
needsTransformation
in interface TargetConfigurationTransformer
true
is the given target configuration can be transformed into other
configurations.