Add support for rules_swift targets.
Requires bazelbuild/rules_apple 0.5.0 or higher.
This updates the Tulsi aspect to support the legacy SwiftInfo provider from
rules_apple and the new SwiftInfo provider from rules_swift. The legacy rule
and its support will eventually be removed.
This change also uses the new-style `apple_common.Objc` provider anywhere
that the Objc provider of a Swift target is retrieved. This is safer,
because the new Swift rules *only* propagate it using the new-style
syntax, but providers propagated the old way should still be found using
this form.
PiperOrigin-RevId: 201018964
diff --git a/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl b/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl
index 133fc94..4afcabd 100644
--- a/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl
+++ b/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl
@@ -23,6 +23,7 @@
"AppleBundleInfo",
"AppleTestInfo",
"IosExtensionBundleInfo",
+ "LegacySwiftInfo",
"SwiftInfo",
)
@@ -506,6 +507,10 @@
swift_modules = depset()
if SwiftInfo in target:
swift_info = target[SwiftInfo]
+ for modules in _getattr_as_list(swift_info, "transitive_swiftmodules"):
+ swift_modules += modules
+ elif LegacySwiftInfo in target:
+ swift_info = target[LegacySwiftInfo]
for modules in _getattr_as_list(swift_info, "transitive_modules"):
swift_modules += modules
return swift_modules
@@ -513,8 +518,9 @@
def _collect_module_maps(target):
"""Returns a depset of Clang module maps found on the given target."""
maps = depset()
- if SwiftInfo in target:
- for module_maps in _getattr_as_list(target, "objc.module_map"):
+ if LegacySwiftInfo in target or SwiftInfo in target:
+ objc = target[apple_common.Objc]
+ for module_maps in _getattr_as_list(objc, "module_map"):
maps += module_maps
return maps
@@ -525,8 +531,9 @@
# swift_* targets put the generated header into their objc provider HEADER
# field.
- if SwiftInfo in target and hasattr(target, "objc"):
- headers += target.objc.header
+ if ((LegacySwiftInfo in target or SwiftInfo in target) and
+ apple_common.Objc in target):
+ headers += target[apple_common.Objc].header
return headers
def _target_filtering_info(ctx):
@@ -677,9 +684,15 @@
infoplist = None
# Collect Swift related attributes.
+ swift_info = None
if SwiftInfo in target:
+ swift_info = target[SwiftInfo]
+ elif LegacySwiftInfo in target:
+ swift_info = target[LegacySwiftInfo]
+
+ if swift_info:
attributes["has_swift_info"] = True
- transitive_attributes["swift_language_version"] = target[SwiftInfo].swift_version
+ transitive_attributes["swift_language_version"] = swift_info.swift_version
transitive_attributes["has_swift_dependency"] = True
all_attributes = attributes + inheritable_attributes + transitive_attributes
diff --git a/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects_paths.bzl b/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects_paths.bzl
index b50f6fc..b71755d 100644
--- a/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects_paths.bzl
+++ b/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects_paths.bzl
@@ -21,12 +21,16 @@
"@build_bazel_rules_apple//apple:providers.bzl",
_AppleBundleInfo = "AppleBundleInfo",
_IosExtensionBundleInfo = "IosExtensionBundleInfo",
- _SwiftInfo = "SwiftInfo",
+ _LegacySwiftInfo = "SwiftInfo",
)
load(
"@build_bazel_rules_apple//apple/testing:apple_test_rules.bzl",
_AppleTestInfo = "AppleTestInfo",
)
+load(
+ "@build_bazel_rules_swift//swift:swift.bzl",
+ _SwiftInfo = "SwiftInfo",
+)
# Re-export providers.
AppleBundleInfo = _AppleBundleInfo
@@ -35,4 +39,6 @@
IosExtensionBundleInfo = _IosExtensionBundleInfo
+LegacySwiftInfo = _LegacySwiftInfo
+
SwiftInfo = _SwiftInfo
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..f532ebd
--- /dev/null
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.pbxproj
@@ -0,0 +1,705 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ E6AF4947391E055E00000000 /* a.swift in srcs */ = {isa = PBXBuildFile; fileRef = 43D68C28391E055E00000000 /* a.swift */; };
+ E6AF494747AA0D5F00000000 /* a.swift in srcs */ = {isa = PBXBuildFile; fileRef = 43D68C2847AA0D5F00000000 /* a.swift */; };
+ E6AF49476172FAAB00000000 /* b.swift in srcs */ = {isa = PBXBuildFile; fileRef = 43D68C286172FAAB00000000 /* b.swift */; };
+ E6AF49479BF237E400000000 /* b.swift in srcs */ = {isa = PBXBuildFile; fileRef = 43D68C289BF237E400000000 /* b.swift */; };
+ E6AF4947B8FD39A800000000 /* b.swift in srcs */ = {isa = PBXBuildFile; fileRef = 43D68C28B8FD39A800000000 /* b.swift */; };
+ E6AF4947E197C62500000000 /* a.swift in srcs */ = {isa = PBXBuildFile; fileRef = 43D68C28E197C62500000000 /* a.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 819366726921D83500000000 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7E7BD0EA2957FA6A00000000 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = ECCC95946921D83400000000;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 43D68C2800A7363600000000 /* _idx_SwiftLibrary_685F5FCA_ios_min8.0.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = _idx_SwiftLibrary_685F5FCA_ios_min8.0.framework; path = _idx_SwiftLibrary_685F5FCA_ios_min8.0.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 43D68C28391E055E00000000 /* a.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = a.swift; path = "tulsi-workspace/tulsi_e2e_legacy_swift/SwiftLibraryV3/srcs/a.swift"; sourceTree = "<group>"; };
+ 43D68C2847AA0D5F00000000 /* a.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = a.swift; path = "tulsi-workspace/tulsi_e2e_legacy_swift/SwiftLibrary/srcs/a.swift"; sourceTree = "<group>"; };
+ 43D68C284AD8CBBA00000000 /* BUILD */ = {isa = PBXFileReference; lastKnownFileType = text; name = BUILD; path = tulsi_e2e_legacy_swift/BUILD; sourceTree = "<group>"; };
+ 43D68C286172FAAB00000000 /* b.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = b.swift; path = "tulsi-workspace/tulsi_e2e_legacy_swift/SwiftLibraryV4/srcs/b.swift"; sourceTree = "<group>"; };
+ 43D68C286C1A8B0400000000 /* _idx_SwiftLibraryV3_6E4E4437_ios_min8.0.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = _idx_SwiftLibraryV3_6E4E4437_ios_min8.0.framework; path = _idx_SwiftLibraryV3_6E4E4437_ios_min8.0.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 43D68C289BF237E400000000 /* b.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = b.swift; path = "tulsi-workspace/tulsi_e2e_legacy_swift/SwiftLibrary/srcs/b.swift"; sourceTree = "<group>"; };
+ 43D68C28A308212600000000 /* _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0.framework; path = _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 43D68C28A7C2E88000000000 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = Info.plist; path = "tulsi-workspace/tulsi_e2e_legacy_swift/Info.plist"; sourceTree = "<group>"; };
+ 43D68C28B8FD39A800000000 /* b.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = b.swift; path = "tulsi-workspace/tulsi_e2e_legacy_swift/SwiftLibraryV3/srcs/b.swift"; sourceTree = "<group>"; };
+ 43D68C28E197C62500000000 /* a.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = a.swift; path = "tulsi-workspace/tulsi_e2e_legacy_swift/SwiftLibraryV4/srcs/a.swift"; sourceTree = "<group>"; };
+ 43D68C28E8DDAB2F00000000 /* Application-Info-binary.plist */ = {isa = PBXFileReference; explicitFileType = text.plist; name = "Application-Info-binary.plist"; path = "tulsi-workspace/_tulsi-includes/x/x/tulsi_e2e_legacy_swift/Application-Info-binary.plist"; sourceTree = "<group>"; };
+ 43D68C28F49055A600000000 /* Application.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; name = Application.app; path = Application.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXGroup section */
+ 966FB6DE0562C2F700000000 /* Indexer */ = {
+ isa = PBXGroup;
+ children = (
+ 43D68C286C1A8B0400000000 /* _idx_SwiftLibraryV3_6E4E4437_ios_min8.0.framework */,
+ 43D68C28A308212600000000 /* _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0.framework */,
+ 43D68C2800A7363600000000 /* _idx_SwiftLibrary_685F5FCA_ios_min8.0.framework */,
+ );
+ name = Indexer;
+ sourceTree = "<group>";
+ };
+ 966FB6DE07201E0200000000 /* _tulsi-includes */ = {
+ isa = PBXGroup;
+ children = (
+ 966FB6DE88DDC84A00000000 /* x */,
+ );
+ name = "_tulsi-includes";
+ sourceTree = "<group>";
+ };
+ 966FB6DE2A082C2300000000 /* tulsi_e2e_legacy_swift */ = {
+ isa = PBXGroup;
+ children = (
+ 43D68C28E8DDAB2F00000000 /* Application-Info-binary.plist */,
+ );
+ name = tulsi_e2e_legacy_swift;
+ sourceTree = "<group>";
+ };
+ 966FB6DE2A082C2300000001 /* tulsi_e2e_legacy_swift */ = {
+ isa = PBXGroup;
+ children = (
+ 43D68C284AD8CBBA00000000 /* BUILD */,
+ 43D68C28A7C2E88000000000 /* Info.plist */,
+ 966FB6DE582F53CF00000000 /* SwiftLibrary */,
+ 966FB6DE906B825800000000 /* SwiftLibraryV3 */,
+ 966FB6DE906B425B00000000 /* SwiftLibraryV4 */,
+ );
+ name = tulsi_e2e_legacy_swift;
+ sourceTree = "<group>";
+ };
+ 966FB6DE2BD1037D00000000 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 43D68C28F49055A600000000 /* Application.app */,
+ 966FB6DE0562C2F700000000 /* Indexer */,
+ 966FB6DE07201E0200000000 /* _tulsi-includes */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 966FB6DE582F53CF00000000 /* SwiftLibrary */ = {
+ isa = PBXGroup;
+ children = (
+ 966FB6DE5B9D018E00000000 /* srcs */,
+ );
+ name = SwiftLibrary;
+ sourceTree = "<group>";
+ };
+ 966FB6DE5B9D018E00000000 /* srcs */ = {
+ isa = PBXGroup;
+ children = (
+ 43D68C2847AA0D5F00000000 /* a.swift */,
+ 43D68C289BF237E400000000 /* b.swift */,
+ );
+ name = srcs;
+ sourceTree = "<group>";
+ };
+ 966FB6DE5B9D018E00000001 /* srcs */ = {
+ isa = PBXGroup;
+ children = (
+ 43D68C28391E055E00000000 /* a.swift */,
+ 43D68C28B8FD39A800000000 /* b.swift */,
+ );
+ name = srcs;
+ sourceTree = "<group>";
+ };
+ 966FB6DE5B9D018E00000002 /* srcs */ = {
+ isa = PBXGroup;
+ children = (
+ 43D68C28E197C62500000000 /* a.swift */,
+ 43D68C286172FAAB00000000 /* b.swift */,
+ );
+ name = srcs;
+ sourceTree = "<group>";
+ };
+ 966FB6DE6C1A2E9100000000 /* mainGroup */ = {
+ isa = PBXGroup;
+ children = (
+ 966FB6DE2BD1037D00000000 /* Products */,
+ 966FB6DE2A082C2300000001 /* tulsi_e2e_legacy_swift */,
+ );
+ name = mainGroup;
+ path = ..;
+ sourceTree = SOURCE_ROOT;
+ };
+ 966FB6DE88DDC84A00000000 /* x */ = {
+ isa = PBXGroup;
+ children = (
+ 966FB6DE88DDC84A00000001 /* x */,
+ );
+ name = x;
+ sourceTree = "<group>";
+ };
+ 966FB6DE88DDC84A00000001 /* x */ = {
+ isa = PBXGroup;
+ children = (
+ 966FB6DE2A082C2300000000 /* tulsi_e2e_legacy_swift */,
+ );
+ name = x;
+ sourceTree = "<group>";
+ };
+ 966FB6DE906B425B00000000 /* SwiftLibraryV4 */ = {
+ isa = PBXGroup;
+ children = (
+ 966FB6DE5B9D018E00000002 /* srcs */,
+ );
+ name = SwiftLibraryV4;
+ sourceTree = "<group>";
+ };
+ 966FB6DE906B825800000000 /* SwiftLibraryV3 */ = {
+ isa = PBXGroup;
+ children = (
+ 966FB6DE5B9D018E00000001 /* srcs */,
+ );
+ name = SwiftLibraryV3;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXLegacyTarget section */
+ ECCC95946921D83400000000 /* _bazel_clean_ */ = {
+ isa = PBXLegacyTarget;
+ buildArgumentsString = "\"/fake/tulsi_test_bazel\" \"bazel-bin\"";
+ buildConfigurationList = DE475583CA83BF7E00000000 /* Build configuration list for PBXLegacyTarget "_bazel_clean_" */;
+ buildPhases = (
+ );
+ buildToolPath = "${PROJECT_FILE_PATH}/.tulsi/Scripts/bazel_clean.sh";
+ buildWorkingDirectory = "${SRCROOT}/..";
+ dependencies = (
+ );
+ name = _bazel_clean_;
+ passBuildSettingsInEnvironment = 1;
+ productName = _bazel_clean_;
+ };
+/* End PBXLegacyTarget section */
+
+/* Begin PBXNativeTarget section */
+ 3D31C5E63B02791A00000000 /* _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DE47558315238EC300000000 /* Build configuration list for PBXNativeTarget "_idx_SwiftLibraryV4_6E4E44B6_ios_min8.0" */;
+ buildPhases = (
+ 605793E20000000000000001 /* Sources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 4DAD0B426921D83500000000 /* PBXTargetDependency */,
+ );
+ name = _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0;
+ productName = _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0;
+ productReference = 43D68C28A308212600000000 /* _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+ 3D31C5E6478AC07800000000 /* _idx_SwiftLibraryV3_6E4E4437_ios_min8.0 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DE475583F5C6BAF200000000 /* Build configuration list for PBXNativeTarget "_idx_SwiftLibraryV3_6E4E4437_ios_min8.0" */;
+ buildPhases = (
+ 605793E20000000000000000 /* Sources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 4DAD0B426921D83500000000 /* PBXTargetDependency */,
+ );
+ name = _idx_SwiftLibraryV3_6E4E4437_ios_min8.0;
+ productName = _idx_SwiftLibraryV3_6E4E4437_ios_min8.0;
+ productReference = 43D68C286C1A8B0400000000 /* _idx_SwiftLibraryV3_6E4E4437_ios_min8.0.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+ 3D31C5E6587E672A00000000 /* _idx_SwiftLibrary_685F5FCA_ios_min8.0 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DE475583DDE7494B00000000 /* Build configuration list for PBXNativeTarget "_idx_SwiftLibrary_685F5FCA_ios_min8.0" */;
+ buildPhases = (
+ 605793E20000000000000002 /* Sources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 4DAD0B426921D83500000000 /* PBXTargetDependency */,
+ );
+ name = _idx_SwiftLibrary_685F5FCA_ios_min8.0;
+ productName = _idx_SwiftLibrary_685F5FCA_ios_min8.0;
+ productReference = 43D68C2800A7363600000000 /* _idx_SwiftLibrary_685F5FCA_ios_min8.0.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+ 3D31C5E66B144ABC00000000 /* Application */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DE475583F843F89400000000 /* Build configuration list for PBXNativeTarget "Application" */;
+ buildPhases = (
+ 84B422718CDAC38F00000000 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 4DAD0B426921D83500000000 /* PBXTargetDependency */,
+ );
+ name = Application;
+ productName = Application;
+ productReference = 43D68C28F49055A600000000 /* Application.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 7E7BD0EA2957FA6A00000000 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastSwiftUpdateCheck = 0710;
+ LastUpgradeCheck = 0900;
+ };
+ buildConfigurationList = DE475583808660A400000000 /* Build configuration list for PBXProject "LegacySwiftProject" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 966FB6DE6C1A2E9100000000 /* mainGroup */;
+ targets = (
+ 3D31C5E66B144ABC00000000 /* Application */,
+ ECCC95946921D83400000000 /* _bazel_clean_ */,
+ 3D31C5E6478AC07800000000 /* _idx_SwiftLibraryV3_6E4E4437_ios_min8.0 */,
+ 3D31C5E63B02791A00000000 /* _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0 */,
+ 3D31C5E6587E672A00000000 /* _idx_SwiftLibrary_685F5FCA_ios_min8.0 */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 84B422718CDAC38F00000000 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 0;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/bash;
+ shellScript = "set -e\ncd \"${SRCROOT}/..\"\nexec \"${PROJECT_FILE_PATH}/.tulsi/Scripts/bazel_build.py\" //tulsi_e2e_legacy_swift:Application --bazel \"/fake/tulsi_test_bazel\" --bazel_bin_path \"bazel-bin\" --verbose --bazel_options[Debug] --define=TULSI_TEST=dbg --ios_minimum_os=7.0 --macos_minimum_os=10.10 --tvos_minimum_os=10.0 --watchos_minimum_os=3.0 --xcode_version=9.2 -- --bazel_options[Release] --define=TULSI_TEST=rel --ios_minimum_os=7.0 --macos_minimum_os=10.10 --tvos_minimum_os=10.0 --watchos_minimum_os=3.0 --xcode_version=9.2 -- --bazel_startup_options[Debug] --bazelrc=/dev/null -- ";
+ showEnvVarsInLog = 1;
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 605793E20000000000000000 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 0;
+ files = (
+ E6AF4947391E055E00000000 /* a.swift in srcs */,
+ E6AF4947B8FD39A800000000 /* b.swift in srcs */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 605793E20000000000000001 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 0;
+ files = (
+ E6AF4947E197C62500000000 /* a.swift in srcs */,
+ E6AF49476172FAAB00000000 /* b.swift in srcs */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 605793E20000000000000002 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 0;
+ files = (
+ E6AF494747AA0D5F00000000 /* a.swift in srcs */,
+ E6AF49479BF237E400000000 /* b.swift in srcs */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 4DAD0B426921D83500000000 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ targetProxy = 819366726921D83500000000 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 44936BD67EED3C4D00000000 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGNING_REQUIRED = NO;
+ CODE_SIGN_IDENTITY = "";
+ ENABLE_TESTABILITY = YES;
+ FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks";
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "$(TULSI_BWRS) $(TULSI_WR)/bazel-bin $(TULSI_WR)/bazel-genfiles $(TULSI_BWRS)/_tulsi-includes/x/x";
+ ONLY_ACTIVE_ARCH = YES;
+ PYTHONIOENCODING = utf8;
+ SDKROOT = iphoneos;
+ SWIFT_VERSION = 4;
+ TULSI_BWRS = "${TULSI_WR}/tulsi-workspace";
+ TULSI_PROJECT = LegacySwiftProject;
+ TULSI_VERSION = 9.99.999.9999;
+ TULSI_WR = "${SRCROOT}/..";
+ };
+ name = Debug;
+ };
+ 44936BD67EED3C4D00000001 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Stub Launch Image";
+ BAZEL_TARGET = "//tulsi_e2e_legacy_swift:Application";
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
+ INFOPLIST_FILE = "${PROJECT_FILE_PATH}/.tulsi/Resources/StubInfoPlist.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.invalid;
+ PRODUCT_NAME = Application;
+ SDKROOT = iphoneos;
+ TULSI_BUILD_PATH = tulsi_e2e_legacy_swift;
+ TULSI_SWIFT_DEPENDENCY = YES;
+ };
+ name = Debug;
+ };
+ 44936BD67EED3C4D00000002 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
+ HEADER_SEARCH_PATHS = "$(inherited) $(TULSI_BWRS)/tools/cpp/gcc3 ";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 3";
+ PRODUCT_NAME = _idx_SwiftLibraryV3_6E4E4437_ios_min8.0;
+ SDKROOT = iphoneos;
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_legacy_swift/SwiftLibraryV3/_objs";
+ };
+ name = Debug;
+ };
+ 44936BD67EED3C4D00000003 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
+ HEADER_SEARCH_PATHS = "$(inherited) $(TULSI_BWRS)/tools/cpp/gcc3 ";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 4";
+ PRODUCT_NAME = _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0;
+ SDKROOT = iphoneos;
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_legacy_swift/SwiftLibraryV4/_objs";
+ };
+ name = Debug;
+ };
+ 44936BD67EED3C4D00000004 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
+ HEADER_SEARCH_PATHS = "$(inherited) $(TULSI_BWRS)/tools/cpp/gcc3 ";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ PRODUCT_NAME = _idx_SwiftLibrary_685F5FCA_ios_min8.0;
+ SDKROOT = iphoneos;
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_legacy_swift/SwiftLibrary/_objs";
+ };
+ name = Debug;
+ };
+ 44936BD6A3D45CE900000000 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGNING_REQUIRED = NO;
+ CODE_SIGN_IDENTITY = "";
+ ENABLE_TESTABILITY = YES;
+ FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks";
+ GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1";
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "$(TULSI_BWRS) $(TULSI_WR)/bazel-bin $(TULSI_WR)/bazel-genfiles $(TULSI_BWRS)/_tulsi-includes/x/x";
+ ONLY_ACTIVE_ARCH = YES;
+ PYTHONIOENCODING = utf8;
+ SDKROOT = iphoneos;
+ SWIFT_VERSION = 4;
+ TULSI_BWRS = "${TULSI_WR}/tulsi-workspace";
+ TULSI_MUST_USE_DSYM = YES;
+ TULSI_PROJECT = LegacySwiftProject;
+ TULSI_VERSION = 9.99.999.9999;
+ TULSI_WR = "${SRCROOT}/..";
+ };
+ name = Release;
+ };
+ 44936BD6A3D45CE900000001 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Stub Launch Image";
+ BAZEL_TARGET = "//tulsi_e2e_legacy_swift:Application";
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1";
+ INFOPLIST_FILE = "${PROJECT_FILE_PATH}/.tulsi/Resources/StubInfoPlist.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.invalid;
+ PRODUCT_NAME = Application;
+ SDKROOT = iphoneos;
+ TULSI_BUILD_PATH = tulsi_e2e_legacy_swift;
+ TULSI_MUST_USE_DSYM = YES;
+ TULSI_SWIFT_DEPENDENCY = YES;
+ };
+ name = Release;
+ };
+ 44936BD6A3D45CE900000002 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1";
+ HEADER_SEARCH_PATHS = "$(inherited) $(TULSI_BWRS)/tools/cpp/gcc3 ";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 3";
+ PRODUCT_NAME = _idx_SwiftLibraryV3_6E4E4437_ios_min8.0;
+ SDKROOT = iphoneos;
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_legacy_swift/SwiftLibraryV3/_objs";
+ };
+ name = Release;
+ };
+ 44936BD6A3D45CE900000003 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1";
+ HEADER_SEARCH_PATHS = "$(inherited) $(TULSI_BWRS)/tools/cpp/gcc3 ";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 4";
+ PRODUCT_NAME = _idx_SwiftLibraryV4_6E4E44B6_ios_min8.0;
+ SDKROOT = iphoneos;
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_legacy_swift/SwiftLibraryV4/_objs";
+ };
+ name = Release;
+ };
+ 44936BD6A3D45CE900000004 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1";
+ HEADER_SEARCH_PATHS = "$(inherited) $(TULSI_BWRS)/tools/cpp/gcc3 ";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ PRODUCT_NAME = _idx_SwiftLibrary_685F5FCA_ios_min8.0;
+ SDKROOT = iphoneos;
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_legacy_swift/SwiftLibrary/_objs";
+ };
+ name = Release;
+ };
+ 44936BD6C928366700000000 /* __TulsiTestRunner_Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGNING_REQUIRED = NO;
+ CODE_SIGN_IDENTITY = "";
+ ENABLE_TESTABILITY = YES;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "";
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_CFLAGS = "-help";
+ OTHER_LDFLAGS = "-help";
+ OTHER_SWIFT_FLAGS = "-help";
+ PYTHONIOENCODING = utf8;
+ SDKROOT = iphoneos;
+ SWIFT_INSTALL_OBJC_HEADER = NO;
+ SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(PRODUCT_NAME).h";
+ SWIFT_VERSION = 4;
+ TULSI_BWRS = "${TULSI_WR}/tulsi-workspace";
+ TULSI_PROJECT = LegacySwiftProject;
+ TULSI_VERSION = 9.99.999.9999;
+ TULSI_WR = "${SRCROOT}/..";
+ };
+ name = __TulsiTestRunner_Debug;
+ };
+ 44936BD6C928366700000001 /* __TulsiTestRunner_Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Stub Launch Image";
+ BAZEL_TARGET = "//tulsi_e2e_legacy_swift:Application";
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
+ HEADER_SEARCH_PATHS = "";
+ INFOPLIST_FILE = "${PROJECT_FILE_PATH}/.tulsi/Resources/StubInfoPlist.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_CFLAGS = "-help";
+ OTHER_LDFLAGS = "-help";
+ OTHER_SWIFT_FLAGS = "-help";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.invalid;
+ PRODUCT_NAME = Application;
+ SDKROOT = iphoneos;
+ SWIFT_INSTALL_OBJC_HEADER = NO;
+ SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(PRODUCT_NAME).h";
+ TULSI_BUILD_PATH = tulsi_e2e_legacy_swift;
+ TULSI_SWIFT_DEPENDENCY = YES;
+ };
+ name = __TulsiTestRunner_Debug;
+ };
+ 44936BD6FCBCA00300000000 /* __TulsiTestRunner_Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGNING_REQUIRED = NO;
+ CODE_SIGN_IDENTITY = "";
+ ENABLE_TESTABILITY = YES;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1";
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "";
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_CFLAGS = "-help";
+ OTHER_LDFLAGS = "-help";
+ OTHER_SWIFT_FLAGS = "-help";
+ PYTHONIOENCODING = utf8;
+ SDKROOT = iphoneos;
+ SWIFT_INSTALL_OBJC_HEADER = NO;
+ SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(PRODUCT_NAME).h";
+ SWIFT_VERSION = 4;
+ TULSI_BWRS = "${TULSI_WR}/tulsi-workspace";
+ TULSI_MUST_USE_DSYM = YES;
+ TULSI_PROJECT = LegacySwiftProject;
+ TULSI_VERSION = 9.99.999.9999;
+ TULSI_WR = "${SRCROOT}/..";
+ };
+ name = __TulsiTestRunner_Release;
+ };
+ 44936BD6FCBCA00300000001 /* __TulsiTestRunner_Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Stub Launch Image";
+ BAZEL_TARGET = "//tulsi_e2e_legacy_swift:Application";
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1";
+ HEADER_SEARCH_PATHS = "";
+ INFOPLIST_FILE = "${PROJECT_FILE_PATH}/.tulsi/Resources/StubInfoPlist.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_CFLAGS = "-help";
+ OTHER_LDFLAGS = "-help";
+ OTHER_SWIFT_FLAGS = "-help";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.invalid;
+ PRODUCT_NAME = Application;
+ SDKROOT = iphoneos;
+ SWIFT_INSTALL_OBJC_HEADER = NO;
+ SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(PRODUCT_NAME).h";
+ TULSI_BUILD_PATH = tulsi_e2e_legacy_swift;
+ TULSI_MUST_USE_DSYM = YES;
+ TULSI_SWIFT_DEPENDENCY = YES;
+ };
+ name = __TulsiTestRunner_Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ DE47558315238EC300000000 /* Build configuration list for PBXNativeTarget "_idx_SwiftLibraryV4_6E4E44B6_ios_min8.0" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 44936BD67EED3C4D00000003 /* Debug */,
+ 44936BD6A3D45CE900000003 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ DE475583808660A400000000 /* Build configuration list for PBXProject "LegacySwiftProject" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 44936BD67EED3C4D00000000 /* Debug */,
+ 44936BD6A3D45CE900000000 /* Release */,
+ 44936BD6C928366700000000 /* __TulsiTestRunner_Debug */,
+ 44936BD6FCBCA00300000000 /* __TulsiTestRunner_Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ DE475583CA83BF7E00000000 /* Build configuration list for PBXLegacyTarget "_bazel_clean_" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ DE475583DDE7494B00000000 /* Build configuration list for PBXNativeTarget "_idx_SwiftLibrary_685F5FCA_ios_min8.0" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 44936BD67EED3C4D00000004 /* Debug */,
+ 44936BD6A3D45CE900000004 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ DE475583F5C6BAF200000000 /* Build configuration list for PBXNativeTarget "_idx_SwiftLibraryV3_6E4E4437_ios_min8.0" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 44936BD67EED3C4D00000002 /* Debug */,
+ 44936BD6A3D45CE900000002 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ DE475583F843F89400000000 /* Build configuration list for PBXNativeTarget "Application" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 44936BD67EED3C4D00000001 /* Debug */,
+ 44936BD6A3D45CE900000001 /* Release */,
+ 44936BD6C928366700000001 /* __TulsiTestRunner_Debug */,
+ 44936BD6FCBCA00300000001 /* __TulsiTestRunner_Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 7E7BD0EA2957FA6A00000000 /* Project object */;
+}
\ No newline at end of file
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..a3f43a8
--- /dev/null
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>BuildSystemType</key>
+ <string>Original</string>
+ <key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
+ <false/>
+</dict>
+</plist>
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.xcworkspace/xcuserdata/_TEST_USER_.xcuserdatad/WorkspaceSettings.xcsettings b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.xcworkspace/xcuserdata/_TEST_USER_.xcuserdatad/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..8ab079c
--- /dev/null
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/project.xcworkspace/xcuserdata/_TEST_USER_.xcuserdatad/WorkspaceSettings.xcsettings
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IssueFilterStyle</key>
+ <string>ShowAll</string>
+ <key>LiveSourceIssuesEnabled</key>
+ <true/>
+</dict>
+</plist>
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcshareddata/xcschemes/Application.xcscheme b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcshareddata/xcschemes/Application.xcscheme
new file mode 100644
index 0000000..0441890
--- /dev/null
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcshareddata/xcschemes/Application.xcscheme
@@ -0,0 +1,29 @@
+
+<Scheme LastUpgradeVersion="0900" version="1.3">
+ <BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">
+ <BuildActionEntries>
+ <BuildActionEntry buildForArchiving="YES" buildForTesting="YES" buildForRunning="YES" buildForAnalyzing="YES" buildForProfiling="YES">
+ <BuildableReference BlueprintIdentifier="3D31C5E66B144ABC00000000" ReferencedContainer="container:LegacySwiftProject.xcodeproj" BuildableName="Application.app" BlueprintName="Application" BuildableIdentifier="primary"></BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES" buildConfiguration="__TulsiTestRunner_Debug">
+ <Testables></Testables>
+ <BuildableProductRunnable runnableDebuggingMode="0">
+ <BuildableReference BlueprintIdentifier="3D31C5E66B144ABC00000000" ReferencedContainer="container:LegacySwiftProject.xcodeproj" BuildableName="Application.app" BlueprintName="Application" BuildableIdentifier="primary"></BuildableReference>
+ </BuildableProductRunnable>
+ </TestAction>
+ <LaunchAction selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" launchStyle="0" buildConfiguration="Debug" debugServiceExtension="internal" ignoresPersistentStateOnLaunch="NO" useCustomWorkingDirectory="NO" allowLocationSimulation="YES" debugDocumentVersioning="YES">
+ <EnvironmentVariables></EnvironmentVariables>
+ <BuildableProductRunnable runnableDebuggingMode="0">
+ <BuildableReference BlueprintIdentifier="3D31C5E66B144ABC00000000" ReferencedContainer="container:LegacySwiftProject.xcodeproj" BuildableName="Application.app" BlueprintName="Application" BuildableIdentifier="primary"></BuildableReference>
+ </BuildableProductRunnable>
+ </LaunchAction>
+ <ProfileAction useCustomWorkingDirectory="NO" shouldUseLaunchSchemeArgsEnv="YES" buildConfiguration="__TulsiTestRunner_Release" debugDocumentVersioning="YES">
+ <BuildableProductRunnable runnableDebuggingMode="0">
+ <BuildableReference BlueprintIdentifier="3D31C5E66B144ABC00000000" ReferencedContainer="container:LegacySwiftProject.xcodeproj" BuildableName="Application.app" BlueprintName="Application" BuildableIdentifier="primary"></BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction buildConfiguration="Debug"></AnalyzeAction>
+ <ArchiveAction buildConfiguration="Release" revealArchiveInOrganizer="YES"></ArchiveAction>
+</Scheme>
\ No newline at end of file
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcshareddata/xcschemes/_idx_Scheme.xcscheme b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcshareddata/xcschemes/_idx_Scheme.xcscheme
new file mode 100644
index 0000000..90e827f
--- /dev/null
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcshareddata/xcschemes/_idx_Scheme.xcscheme
@@ -0,0 +1,25 @@
+
+<Scheme LastUpgradeVersion="0900" version="1.3">
+ <BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">
+ <BuildActionEntries>
+ <BuildActionEntry buildForArchiving="YES" buildForTesting="YES" buildForRunning="YES" buildForAnalyzing="YES" buildForProfiling="YES">
+ <BuildableReference BlueprintIdentifier="3D31C5E63B02791A00000000" ReferencedContainer="container:LegacySwiftProject.xcodeproj" BuildableName="_idx_SwiftLibraryV4_6E4E44B6_ios_min8.0.framework" BlueprintName="_idx_SwiftLibraryV4_6E4E44B6_ios_min8.0" BuildableIdentifier="primary"></BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry buildForArchiving="YES" buildForTesting="YES" buildForRunning="YES" buildForAnalyzing="YES" buildForProfiling="YES">
+ <BuildableReference BlueprintIdentifier="3D31C5E6478AC07800000000" ReferencedContainer="container:LegacySwiftProject.xcodeproj" BuildableName="_idx_SwiftLibraryV3_6E4E4437_ios_min8.0.framework" BlueprintName="_idx_SwiftLibraryV3_6E4E4437_ios_min8.0" BuildableIdentifier="primary"></BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry buildForArchiving="YES" buildForTesting="YES" buildForRunning="YES" buildForAnalyzing="YES" buildForProfiling="YES">
+ <BuildableReference BlueprintIdentifier="3D31C5E6587E672A00000000" ReferencedContainer="container:LegacySwiftProject.xcodeproj" BuildableName="_idx_SwiftLibrary_685F5FCA_ios_min8.0.framework" BlueprintName="_idx_SwiftLibrary_685F5FCA_ios_min8.0" BuildableIdentifier="primary"></BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES" buildConfiguration="Debug">
+ <Testables></Testables>
+ </TestAction>
+ <LaunchAction selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" launchStyle="0" buildConfiguration="Debug" debugServiceExtension="internal" ignoresPersistentStateOnLaunch="NO" useCustomWorkingDirectory="NO" allowLocationSimulation="YES" debugDocumentVersioning="YES">
+ <EnvironmentVariables></EnvironmentVariables>
+ </LaunchAction>
+ <ProfileAction useCustomWorkingDirectory="NO" shouldUseLaunchSchemeArgsEnv="YES" buildConfiguration="Release" debugDocumentVersioning="YES"></ProfileAction>
+ <AnalyzeAction buildConfiguration="Debug"></AnalyzeAction>
+ <ArchiveAction buildConfiguration="Release" revealArchiveInOrganizer="YES"></ArchiveAction>
+</Scheme>
\ No newline at end of file
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcuserdata/_TEST_USER_.xcuserdatad/xcschemes/xcschememanagement.plist b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcuserdata/_TEST_USER_.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..36e5e1f
--- /dev/null
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/LegacySwiftProject.xcodeproj/xcuserdata/_TEST_USER_.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Application.xcscheme_^#shared#^_</key>
+ <dict>
+ <key>isShown</key>
+ <true/>
+ </dict>
+ <key>_idx_Scheme.xcscheme_^#shared#^_</key>
+ <dict>
+ <key>isShown</key>
+ <false/>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict/>
+</dict>
+</plist>
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SwiftProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SwiftProject.xcodeproj/project.pbxproj
index c102b13..a4d10f0 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SwiftProject.xcodeproj/project.pbxproj
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SwiftProject.xcodeproj/project.pbxproj
@@ -393,7 +393,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 3";
PRODUCT_NAME = _idx_SwiftLibraryV3_56AA3A57_ios_min8.0;
SDKROOT = iphoneos;
- SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift/SwiftLibraryV3/_objs";
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift";
};
name = Debug;
};
@@ -406,7 +406,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 4";
PRODUCT_NAME = _idx_SwiftLibraryV4_56AA3A59_ios_min8.0;
SDKROOT = iphoneos;
- SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift/SwiftLibraryV4/_objs";
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift";
};
name = Debug;
};
@@ -418,7 +418,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = _idx_SwiftLibrary_EA7FC891_ios_min8.0;
SDKROOT = iphoneos;
- SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift/SwiftLibrary/_objs";
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift";
};
name = Debug;
};
@@ -485,7 +485,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 3";
PRODUCT_NAME = _idx_SwiftLibraryV3_56AA3A57_ios_min8.0;
SDKROOT = iphoneos;
- SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift/SwiftLibraryV3/_objs";
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift";
};
name = Release;
};
@@ -498,7 +498,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 4";
PRODUCT_NAME = _idx_SwiftLibraryV4_56AA3A59_ios_min8.0;
SDKROOT = iphoneos;
- SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift/SwiftLibraryV4/_objs";
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift";
};
name = Release;
};
@@ -510,7 +510,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = _idx_SwiftLibrary_EA7FC891_ios_min8.0;
SDKROOT = iphoneos;
- SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift/SwiftLibrary/_objs";
+ SWIFT_INCLUDE_PATHS = "$(inherited) $(TULSI_BWRS)/_tulsi-includes/x/x/tulsi_e2e_swift";
};
name = Release;
};
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/LegacySwift.BUILD b/src/TulsiGeneratorIntegrationTests/Resources/LegacySwift.BUILD
new file mode 100644
index 0000000..483b671
--- /dev/null
+++ b/src/TulsiGeneratorIntegrationTests/Resources/LegacySwift.BUILD
@@ -0,0 +1,77 @@
+# Copyright 2016 The Tulsi Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# mock BUILD file using Swift targets for aspect testing.
+
+load(
+ "@build_bazel_rules_apple//apple:ios.bzl",
+ "ios_application",
+)
+load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library")
+
+ios_application(
+ name = "Application",
+ bundle_id = "com.example.invalid",
+ families = [
+ "iphone",
+ "ipad",
+ ],
+ infoplists = ["Info.plist"],
+ minimum_os_version = "8.0",
+ deps = [":ApplicationLibrary"],
+)
+
+objc_library(
+ name = "ApplicationLibrary",
+ srcs = [
+ "//tools/objc:objc_dummy.m",
+ ],
+ deps = [
+ ":SwiftLibrary",
+ ":SwiftLibraryV3",
+ ":SwiftLibraryV4",
+ ],
+)
+
+swift_library(
+ name = "SwiftLibraryV3",
+ srcs = [
+ "SwiftLibraryV3/srcs/a.swift",
+ "SwiftLibraryV3/srcs/b.swift",
+ ],
+ copts = [
+ "-swift-version",
+ "3",
+ ],
+)
+
+swift_library(
+ name = "SwiftLibraryV4",
+ srcs = [
+ "SwiftLibraryV4/srcs/a.swift",
+ "SwiftLibraryV4/srcs/b.swift",
+ ],
+ copts = [
+ "-swift-version",
+ "4",
+ ],
+)
+
+swift_library(
+ name = "SwiftLibrary",
+ srcs = [
+ "SwiftLibrary/srcs/a.swift",
+ "SwiftLibrary/srcs/b.swift",
+ ],
+)
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/Swift.BUILD b/src/TulsiGeneratorIntegrationTests/Resources/Swift.BUILD
index 483b671..9ca183b 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/Swift.BUILD
+++ b/src/TulsiGeneratorIntegrationTests/Resources/Swift.BUILD
@@ -18,7 +18,7 @@
"@build_bazel_rules_apple//apple:ios.bzl",
"ios_application",
)
-load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library")
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
ios_application(
name = "Application",