File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "@build_bazel_rules_apple//apple:ios.bzl" ,
33 "ios_build_test" ,
44)
5+ load (
6+ "@build_bazel_rules_apple//apple:resources.bzl" ,
7+ "apple_precompiled_resource_bundle" ,
8+ )
59load (
610 "@build_bazel_rules_swift//mixed_language:mixed_language_library.bzl" ,
711 "mixed_language_library" ,
@@ -14,17 +18,29 @@ ios_build_test(
1418 visibility = ["@rules_xcodeproj//xcodeproj:generated" ],
1519)
1620
21+ apple_precompiled_resource_bundle (
22+ name = "MixedLibResourceBundle" ,
23+ bundle_name = "MixedLibResources" ,
24+ resources = glob (
25+ [
26+ "Model.xcdatamodeld/**" ,
27+ ],
28+ ),
29+ )
30+
1731mixed_language_library (
1832 name = "MixedLib" ,
1933 hdrs = ["MixedObjC.h" ],
2034 clang_srcs = ["MixedObjC.m" ],
35+ data = [":MixedLibResourceBundle" ],
2136 enable_modules = True ,
2237 module_name = "MixedLib" ,
2338 swift_copts = ["-application-extension" ],
2439 swift_srcs = ["MixedSwift.swift" ],
2540 tags = ["manual" ],
2641 visibility = [
2742 "//Lib:__subpackages__" ,
43+ "//MixedLib:__subpackages__" ,
2844 ],
2945 alwayslink = True ,
3046)
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+ <plist version =" 1.0" >
4+ <dict >
5+ <key >_XCCurrentVersionName</key >
6+ <string >Model 2.xcdatamodel</string >
7+ </dict >
8+ </plist >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" standalone =" yes" ?>
2+ <model type =" com.apple.IDECoreDataModeler.DataModel" documentVersion =" 1.0" lastSavedToolsVersion =" 19574" systemVersion =" 21C52" minimumToolsVersion =" Automatic" sourceLanguage =" Swift" userDefinedModelVersionIdentifier =" " >
3+ <entity name =" Entity" representedClassName =" Entity" syncable =" YES" codeGenerationType =" class" >
4+ <attribute name =" age" optional =" YES" attributeType =" Integer 16" defaultValueString =" 0" usesScalarValueType =" YES" />
5+ <attribute name =" name" optional =" YES" attributeType =" String" />
6+ </entity >
7+ <entity name =" Entity2" representedClassName =" Entity2" syncable =" YES" codeGenerationType =" class" >
8+ <attribute name =" name" optional =" YES" attributeType =" String" />
9+ <relationship name =" parent" optional =" YES" maxCount =" 1" deletionRule =" Nullify" destinationEntity =" Entity" />
10+ </entity >
11+ <elements >
12+ <element name =" Entity" positionX =" -54" positionY =" -9" width =" 128" height =" 59" />
13+ <element name =" Entity2" positionX =" -36" positionY =" 27" width =" 128" height =" 59" />
14+ </elements >
15+ </model >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" standalone =" yes" ?>
2+ <model type =" com.apple.IDECoreDataModeler.DataModel" documentVersion =" 1.0" lastSavedToolsVersion =" 19574" systemVersion =" 21C52" minimumToolsVersion =" Automatic" sourceLanguage =" Swift" userDefinedModelVersionIdentifier =" " >
3+ <entity name =" Entity" representedClassName =" Entity" syncable =" YES" codeGenerationType =" class" >
4+ <attribute name =" name" optional =" YES" attributeType =" String" />
5+ </entity >
6+ <elements >
7+ <element name =" Entity" positionX =" -63" positionY =" -18" width =" 128" height =" 44" />
8+ </elements >
9+ </model >
Original file line number Diff line number Diff line change 1+ load (
2+ "@build_bazel_rules_apple//apple:ios.bzl" ,
3+ "ios_unit_test" ,
4+ )
5+ load ("@build_bazel_rules_swift//swift:swift.bzl" , "swift_library" )
6+
7+ ios_unit_test (
8+ name = "MixedLibTests" ,
9+ bundle_id = "rules-xcodeproj.mixedlib.tests" ,
10+ minimum_os_version = "16.0" ,
11+ tags = ["manual" ],
12+ visibility = [
13+ "@rules_xcodeproj//xcodeproj:generated" ,
14+ ],
15+ deps = [":MixedLibTests.library" ],
16+ )
17+
18+ swift_library (
19+ name = "MixedLibTests.library" ,
20+ testonly = True ,
21+ srcs = glob (["**/*.swift" ]),
22+ module_name = "MixedLibTests" ,
23+ tags = ["manual" ],
24+ deps = [
25+ "//MixedLib" ,
26+ ],
27+ )
Original file line number Diff line number Diff line change 1+ import XCTest
2+ @testable import MixedLib
3+
4+ final class MixedLibTests : XCTestCase {
5+ func testMixedLib( ) {
6+ XCTAssertTrue ( true )
7+ }
8+ }
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ XCODEPROJ_TARGETS = [
131131 "//iOSApp/Test/UITests:iOSAppUITestSuite" ,
132132 "//iOSApp/Test/ObjCUnitTests:iOSAppObjCUnitTestSuite" ,
133133 "//iOSApp/Test/SwiftUnitTests:iOSAppSwiftUnitTestSuite" ,
134+ "//MixedLib/Test:MixedLibTests" ,
134135 "//Proto:proto" ,
135136 "//GRPC:echo_client" ,
136137 "//GRPC:echo_server" ,
Original file line number Diff line number Diff line change @@ -721,8 +721,12 @@ def _collect_mixed_language_input_files(
721721 for info in mixed_target_infos
722722 ],
723723 ),
724- # Same as resource collection, so no need to merge
725- xccurrentversions = EMPTY_DEPSET ,
724+ xccurrentversions = memory_efficient_depset (
725+ transitive = [
726+ info .inputs .xccurrentversions
727+ for info in mixed_target_infos
728+ ],
729+ ),
726730 ),
727731 )
728732
You can’t perform that action at this time.
0 commit comments