aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2015-07-15 22:01:18 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-07-16 08:15:20 +0000
commitb8d1e700841d8aa7186ccbdfb0eba53e12a672d0 (patch)
tree75df4237ea8401e76e88c1d0d7522cee327815ae /src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java
parentb9d84134dc95795fea6ce8477d5030bd8adf726e (diff)
Description redacted.
-- MOS_MIGRATED_REVID=98347349
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java
index 9ace1d304e..8382ac8007 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java
@@ -200,7 +200,7 @@ final class BundleSupport {
ruleContext.registerAction(
ObjcRuleClasses.spawnOnDarwinActionBuilder()
.setMnemonic("StoryboardCompile")
- .setExecutable(attributes.ibtoolwrapper())
+ .setExecutable(attributes.ibtoolWrapper())
.setCommandLine(ibActionsCommandLine(archiveRoot, zipOutput, storyboardInput))
.addOutput(zipOutput)
.addInput(storyboardInput)
@@ -238,15 +238,17 @@ final class BundleSupport {
for (Xcdatamodel datamodel : xcdatamodels) {
Artifact outputZip = datamodel.getOutputZip();
ruleContext.registerAction(
- ObjcRuleClasses.spawnJavaOnDarwinActionBuilder(attributes.momczipDeployJar())
+ ObjcRuleClasses.spawnOnDarwinActionBuilder()
.setMnemonic("MomCompile")
+ .setExecutable(attributes.momcWrapper())
.addOutput(outputZip)
.addInputs(datamodel.getInputs())
+ // TODO(dmaclach): Adding realpath here should not be required once
+ // https://github.com/google/bazel/issues/285 is fixed.
+ .addInput(attributes.realpath())
.setCommandLine(CustomCommandLine.builder()
.addPath(outputZip.getExecPath())
.add(datamodel.archiveRootForMomczip())
- .add(IosSdkCommands.MOMC_PATH)
-
.add("-XD_MOMC_SDKROOT=" + IosSdkCommands.sdkDir(objcConfiguration))
.add("-XD_MOMC_IOS_TARGET_VERSION=" + bundling.getMinimumOsVersion())
.add("-MOMC_PLATFORMS")
@@ -269,7 +271,7 @@ final class BundleSupport {
ruleContext.registerAction(
ObjcRuleClasses.spawnOnDarwinActionBuilder()
.setMnemonic("XibCompile")
- .setExecutable(attributes.ibtoolwrapper())
+ .setExecutable(attributes.ibtoolWrapper())
.setCommandLine(ibActionsCommandLine(archiveRoot, zipOutput, original))
.addOutput(zipOutput)
.addInput(original)
@@ -348,11 +350,15 @@ final class BundleSupport {
// zip file will be rooted at the bundle root, and we have to prepend the bundle root to each
// entry when merging it with the final .ipa file.
ruleContext.registerAction(
- ObjcRuleClasses.spawnJavaOnDarwinActionBuilder(attributes.actoolzipDeployJar())
+ ObjcRuleClasses.spawnOnDarwinActionBuilder()
.setMnemonic("AssetCatalogCompile")
+ .setExecutable(attributes.actoolWrapper())
.addTransitiveInputs(objcProvider.get(ASSET_CATALOG))
.addOutput(zipOutput)
.addOutput(actoolPartialInfoplist)
+ // TODO(dmaclach): Adding realpath here should not be required once
+ // https://github.com/google/bazel/issues/285 is fixed.
+ .addInput(attributes.realpath())
.setCommandLine(actoolzipCommandLine(
objcProvider,
zipOutput,
@@ -366,9 +372,6 @@ final class BundleSupport {
CustomCommandLine.Builder commandLine = CustomCommandLine.builder()
// The next three arguments are positional, i.e. they don't have flags before them.
.addPath(zipOutput.getExecPath())
- .add("") // archive root
- .add(IosSdkCommands.ACTOOL_PATH)
-
.add("--platform").add(objcConfiguration.getBundlingPlatform().getLowerCaseNameInPlist())
.addExecPath("--output-partial-info-plist", partialInfoPlist)
.add("--minimum-deployment-target").add(bundling.getMinimumOsVersion());
@@ -439,7 +442,7 @@ final class BundleSupport {
/**
* Returns the location of the ibtoolwrapper tool.
*/
- FilesToRunProvider ibtoolwrapper() {
+ FilesToRunProvider ibtoolWrapper() {
return ruleContext.getExecutablePrerequisite("$ibtoolwrapper", Mode.HOST);
}
@@ -453,17 +456,17 @@ final class BundleSupport {
}
/**
- * Returns the location of the momczip deploy jar.
+ * Returns the location of the momcwrapper.
*/
- Artifact momczipDeployJar() {
- return ruleContext.getPrerequisiteArtifact("$momczip_deploy", Mode.HOST);
+ FilesToRunProvider momcWrapper() {
+ return ruleContext.getExecutablePrerequisite("$momcwrapper", Mode.HOST);
}
/**
- * Returns the location of the actoolzip deploy jar.
+ * Returns the location of the actoolwrapper.
*/
- Artifact actoolzipDeployJar() {
- return ruleContext.getPrerequisiteArtifact("$actoolzip_deploy", Mode.HOST);
+ FilesToRunProvider actoolWrapper() {
+ return ruleContext.getExecutablePrerequisite("$actoolwrapper", Mode.HOST);
}
}
}