aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2017-07-25 09:29:35 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-07-25 13:17:49 +0200
commit32ff770b91f0ff2361a179098aa5c502cec8430c (patch)
tree8e1cbaf6e809db00c84dd55eadbc51189981872d /src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java
parentea23c2b762adec6625f35ea737d0cf63daf6038d (diff)
Route Xcode version information through an implicit dependency instead of the configuration.
This is part of the crusade to kill package loading in configuration creation. AppleConfiguration still retains the version information for the following reasons: - Some Skylark rules access it that way. The plan is to create an xcode_config_alias() rule that can be an implicit dependency of Skylark rules and to export the version information to Skylark from XcodeVersionsProvider. - The minimum OS version is part of the name of the output directory. The plan for that is simply to remove it. Hopefully we can get away with it. - They allow us to add assertions to make sure the new mechanism works like the old one. RELNOTES: None. PiperOrigin-RevId: 163038724
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java
index 897deace6a..8526bbcba2 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java
@@ -25,10 +25,10 @@ import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.packages.Attribute.SplitTransition;
import com.google.devtools.build.lib.rules.apple.AppleCommandLineOptions;
-import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration.ConfigurationDistinguisher;
import com.google.devtools.build.lib.rules.apple.ApplePlatform.PlatformType;
import com.google.devtools.build.lib.rules.apple.DottedVersion;
+import com.google.devtools.build.lib.rules.apple.XcodeConfig;
import com.google.devtools.build.lib.rules.objc.ReleaseBundlingSupport.SplitArchTransition;
import java.io.Serializable;
import javax.annotation.Nullable;
@@ -67,8 +67,7 @@ public class IosExtension extends ReleaseBundlingTargetFactory {
@Override
protected DottedVersion bundleMinimumOsVersion(RuleContext ruleContext) {
return determineMinimumOsVersion(
- ruleContext.getFragment(AppleConfiguration.class)
- .getMinimumOsForPlatformType(PlatformType.IOS),
+ XcodeConfig.getMinimumOsForPlatformType(ruleContext, PlatformType.IOS),
EXTENSION_MINIMUM_OS_VERSION);
}