Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop specifiying a manual group for xcodeproj sources #125

Merged
merged 3 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rules/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ native_binary(
visibility = ["//visibility:public"],
)
""",
canonical_id = "xcodegen-2.17.0",
sha256 = "6d1e4a8617e7d13910366c25d1e3ab475158e91e3071cb17f44e3ea29c9a1a41",
canonical_id = "xcodegen-2.17.0-19-g775e14c",
sha256 = "5dbda77da860e615e32f80de8c662757e7ccb7e5012c7fa233b137a4baa36c3d",
strip_prefix = "xcodegen",
urls = ["https://github.com/yonaskolb/XcodeGen/releases/download/2.17.0/xcodegen.zip"],
urls = ["https://github.com/segiddins/XcodeGen/releases/download/2.17.0-19-g775e14c/xcodegen.zip"],
)
7 changes: 0 additions & 7 deletions rules/xcodeproj.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,13 @@ def _gather_asset_sources(target_info, path_prefix):

for s in target_info.asset_srcs.to_list():
short_path = s.short_path
group = paths.dirname(short_path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's awesome! might help fix .lprog issue as well

(extension, path_so_far) = _classify_asset(short_path)

# Reference for logics below:
# https://github.com/bazelbuild/rules_apple/blob/master/apple/internal/partials/support/resources_support.bzl#L162
if extension == None:
payload = {
"path": paths.join(path_prefix, short_path),
"group": group,
"optional": True,
"buildPhase": "none",
}
Expand All @@ -359,7 +357,6 @@ def _gather_asset_sources(target_info, path_prefix):
for datamodel_key in datamodel_groups.keys():
payload = {
"path": paths.join(path_prefix, datamodel_key),
"group": paths.dirname(datamodel_key),
"optional": True,
"buildPhase": "none",
}
Expand All @@ -368,7 +365,6 @@ def _gather_asset_sources(target_info, path_prefix):
for asset_key in catalog_groups.keys():
payload = {
"path": paths.join(path_prefix, asset_key),
"group": paths.dirname(asset_key),
"optional": True,
"buildPhase": "none",
}
Expand All @@ -377,7 +373,6 @@ def _gather_asset_sources(target_info, path_prefix):
# Append BUILD.bazel files to project
asset_sources += [{
"path": paths.join(path_prefix, p),
"group": paths.dirname(p),
"optional": True,
"buildPhase": "none",
# TODO: add source language type once https://github.com/yonaskolb/XcodeGen/issues/850 is resolved
Expand Down Expand Up @@ -429,12 +424,10 @@ def _populate_xcodeproj_targets_and_schemes(ctx, targets, src_dot_dots):
target_macho_type = "staticlib" if product_type == "framework" else "$(inherited)"
compiled_sources = [{
"path": paths.join(src_dot_dots, s.short_path),
"group": paths.dirname(s.short_path),
"optional": True,
} for s in target_info.srcs.to_list()]
compiled_non_arc_sources = [{
"path": paths.join(src_dot_dots, s.short_path),
"group": paths.dirname(s.short_path),
"optional": True,
"compilerFlags": "-fno-objc-arc",
} for s in target_info.non_arc_srcs.to_list()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,98 +7,107 @@
objects = {

/* Begin PBXBuildFile section */
486340F1844ADD3B94BFE9F6 /* FooFrameworkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F95CB476EBF28FCFE1BCE04F /* FooFrameworkTests.m */; };
D100BF9D72B5F6940F83816B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6902D1207F875225638DE30A /* main.m */; };
0BD7FD856ED50175FA3D3BC9 /* FooFrameworkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 091655034CF618D208C22AE8 /* FooFrameworkTests.m */; };
5C8EED4DAAF3B4B069337569 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CF7A2F537C999952921627A8 /* main.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
091655034CF618D208C22AE8 /* FooFrameworkTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FooFrameworkTests.m; sourceTree = "<group>"; };
11B98E6654D00F1E74B2DA47 /* BUILD.bazel */ = {isa = PBXFileReference; path = BUILD.bazel; sourceTree = "<group>"; };
24C22223D1434365B1D0A956 /* ObjcFrameworkTestLib.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = ObjcFrameworkTestLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
413EA7F09E2ABDF7CFCB736D /* ObjcFrameworkTests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = ObjcFrameworkTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4BB7A0F977B290B8648FFDB0 /* ObjcFramework.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = ObjcFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6902D1207F875225638DE30A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../frameworks/objc/main.m; sourceTree = "<group>"; };
A889D4F5A404037DAAE41E2C /* common.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = common.pch; path = ../../../rules/library/common.pch; sourceTree = "<group>"; };
C7460A0CB5B34CD2836CB044 /* HeaderA.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HeaderA.h; path = ../frameworks/objc/HeaderA.h; sourceTree = "<group>"; };
F9528189952DC1024F47A893 /* BUILD.bazel */ = {isa = PBXFileReference; name = BUILD.bazel; path = ../frameworks/objc/BUILD.bazel; sourceTree = "<group>"; };
F95CB476EBF28FCFE1BCE04F /* FooFrameworkTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = FooFrameworkTests.m; path = ../frameworks/objc/tests/FooFrameworkTests.m; sourceTree = "<group>"; };
AD7402651F16555F753997F4 /* HeaderA.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HeaderA.h; sourceTree = "<group>"; };
BD4894AC90711E6A55CB1657 /* common.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = common.pch; sourceTree = "<group>"; };
CF7A2F537C999952921627A8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXGroup section */
2E65D165D8CB3DA10A3241BB /* ios */ = {
0A2CB2A75E2EAAB1095F1214 /* objc */ = {
isa = PBXGroup;
children = (
F9780F090C099456FA802F03 /* frameworks */,
11B98E6654D00F1E74B2DA47 /* BUILD.bazel */,
AD7402651F16555F753997F4 /* HeaderA.h */,
CF7A2F537C999952921627A8 /* main.m */,
37D2E41255E69DF775A9E8A7 /* tests */,
);
name = ios;
path = objc;
sourceTree = "<group>";
};
6666B4FAC3B5C464339017A9 /* objc */ = {
1E3DFBAC8DCF4B75D9A8F878 /* tests */ = {
isa = PBXGroup;
children = (
F9528189952DC1024F47A893 /* BUILD.bazel */,
C7460A0CB5B34CD2836CB044 /* HeaderA.h */,
6902D1207F875225638DE30A /* main.m */,
C46EA7CD087E497DFB189040 /* tests */,
7EDC6B4DDC5CF54A9237A106 /* ios */,
);
name = objc;
path = tests;
sourceTree = "<group>";
};
A3598111BA39DE57BE267C48 /* tests */ = {
37D2E41255E69DF775A9E8A7 /* tests */ = {
isa = PBXGroup;
children = (
2E65D165D8CB3DA10A3241BB /* ios */,
091655034CF618D208C22AE8 /* FooFrameworkTests.m */,
);
name = tests;
path = tests;
sourceTree = "<group>";
};
C46EA7CD087E497DFB189040 /* tests */ = {
7EDC6B4DDC5CF54A9237A106 /* ios */ = {
isa = PBXGroup;
children = (
F95CB476EBF28FCFE1BCE04F /* FooFrameworkTests.m */,
D0115B467F0DE21A500FA41C /* frameworks */,
);
name = tests;
path = ios;
sourceTree = "<group>";
};
D86E9FCCC4BB853B2A451672 /* Products */ = {
A2A2DE2B0CF19BE872E1DD76 /* library */ = {
isa = PBXGroup;
children = (
4BB7A0F977B290B8648FFDB0 /* ObjcFramework.framework */,
24C22223D1434365B1D0A956 /* ObjcFrameworkTestLib.framework */,
413EA7F09E2ABDF7CFCB736D /* ObjcFrameworkTests.xctest */,
BD4894AC90711E6A55CB1657 /* common.pch */,
);
name = Products;
path = library;
sourceTree = "<group>";
};
E8099B19B67C1115D200E916 = {
D0115B467F0DE21A500FA41C /* frameworks */ = {
isa = PBXGroup;
children = (
F1E6E5D1773FF98D954EB32A /* rules */,
A3598111BA39DE57BE267C48 /* tests */,
D86E9FCCC4BB853B2A451672 /* Products */,
0A2CB2A75E2EAAB1095F1214 /* objc */,
);
path = frameworks;
sourceTree = "<group>";
};
F1E6E5D1773FF98D954EB32A /* rules */ = {
D7905EC44A468549D712685E /* rules */ = {
isa = PBXGroup;
children = (
F5677F534CD0BBE67D08B11C /* library */,
A2A2DE2B0CF19BE872E1DD76 /* library */,
);
name = rules;
path = rules;
sourceTree = "<group>";
};
F5677F534CD0BBE67D08B11C /* library */ = {
D86E9FCCC4BB853B2A451672 /* Products */ = {
isa = PBXGroup;
children = (
A889D4F5A404037DAAE41E2C /* common.pch */,
4BB7A0F977B290B8648FFDB0 /* ObjcFramework.framework */,
24C22223D1434365B1D0A956 /* ObjcFrameworkTestLib.framework */,
413EA7F09E2ABDF7CFCB736D /* ObjcFrameworkTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
E8099B19B67C1115D200E916 = {
isa = PBXGroup;
children = (
EB104984AF478D5D5F2B07DE /* build_bazel_rules_ios */,
D86E9FCCC4BB853B2A451672 /* Products */,
);
name = library;
sourceTree = "<group>";
};
F9780F090C099456FA802F03 /* frameworks */ = {
EB104984AF478D5D5F2B07DE /* build_bazel_rules_ios */ = {
isa = PBXGroup;
children = (
6666B4FAC3B5C464339017A9 /* objc */,
D7905EC44A468549D712685E /* rules */,
1E3DFBAC8DCF4B75D9A8F878 /* tests */,
);
name = frameworks;
name = build_bazel_rules_ios;
path = ../../..;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -242,7 +251,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D100BF9D72B5F6940F83816B /* main.m in Sources */,
5C8EED4DAAF3B4B069337569 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -257,7 +266,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
486340F1844ADD3B94BFE9F6 /* FooFrameworkTests.m in Sources */,
0BD7FD856ED50175FA3D3BC9 /* FooFrameworkTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Loading