aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java
diff options
context:
space:
mode:
authorGravatar Peter Schmitt <schmitt@google.com>2015-03-24 16:05:47 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-03-24 17:16:38 +0000
commit26bae084e93901c2b49c958107d8b5b890c38a47 (patch)
treed059b3a99e390008de4cd44ca95a1ff35d9fa2ea /src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java
parentc9a9f4c874aa29b446f48ee3da179ae1bf6f5435 (diff)
Compile objc resources when bundling, not at each target.
This change moves the resource compilation actions from each declaring target to the bundle in which they're stored. This bundle is (mostly, see below) the only thing that cares about the compiled resources. As a result, we avoid compiling each resource many times when in a multi-architecture context. Note that as a result of this change rules other than ios_test do no longer add the compiled datamodels and storyboards to files to build. There (should?) be no need for them anyhow. Also, Xcode targets will now no longer contain the transitive closure of datamodels, only their own. Note that in the case where the input resource is produced by a genrule the resource compilation still happens for each architecture but we ignore the results for all but one of the architectures to avoid bundling conflicts. There are also some more validation checks and nicer error messages for users when they specify illegal strings resources. -- MOS_MIGRATED_REVID=89404405
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java
index c121980bed..e559ab4e35 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java
@@ -125,7 +125,7 @@ public final class ObjcProvider implements TransitiveInfoProvider {
public static final Key<String> SDK_DYLIB = new Key<>(STABLE_ORDER);
public static final Key<SdkFramework> SDK_FRAMEWORK = new Key<>(STABLE_ORDER);
public static final Key<SdkFramework> WEAK_SDK_FRAMEWORK = new Key<>(STABLE_ORDER);
- public static final Key<Xcdatamodel> XCDATAMODEL = new Key<>(STABLE_ORDER);
+ public static final Key<Artifact> XCDATAMODEL = new Key<>(STABLE_ORDER);
public static final Key<Flag> FLAG = new Key<>(STABLE_ORDER);
/**
@@ -159,6 +159,21 @@ public final class ObjcProvider implements TransitiveInfoProvider {
public static final Key<Artifact> DEBUG_SYMBOLS = new Key<>(STABLE_ORDER);
/**
+ * Artifacts for storyboard sources.
+ */
+ public static final Key<Artifact> STORYBOARD = new Key<>(STABLE_ORDER);
+
+ /**
+ * Artifacts for .xib file sources.
+ */
+ public static final Key<Artifact> XIB = new Key<>(STABLE_ORDER);
+
+ /**
+ * Artifacts for strings source files.
+ */
+ public static final Key<Artifact> STRINGS = new Key<>(STABLE_ORDER);
+
+ /**
* Flags that apply to a transitive build dependency tree. Each item in the enum corresponds to a
* flag. If the item is included in the key {@link #FLAG}, then the flag is considered set.
*/