cocoapods-bazel 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +2 -4
- data/.ruby-version +1 -0
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/Rakefile +2 -1
- data/lib/cocoapods/bazel/config.rb +6 -1
- data/lib/cocoapods/bazel/target.rb +21 -10
- data/lib/cocoapods/bazel/version.rb +1 -1
- data/lib/cocoapods/bazel.rb +4 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18e391e17513b6f8fd7fba0dc3b2f34d06298f15eb8fbcf3df4403eeada78360
|
4
|
+
data.tar.gz: f62bdce927bf09a6b8497679093a4718e7d4f669db27dd601204c2b7ae695ec1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6c3af7c4f42a0df183911102d0dfc0818d8f394fe39923d585565db3ccc1613c219f7617e8a75951c3cafae2165d1e980724e31b551ccdb45515db59a6033d0
|
7
|
+
data.tar.gz: 0c32119ec63ea0442bf1ab116a505f882ed94e610947eac22bd7d9fb1fa3e0ce0a1e15e61293db41de7ab74c3fda66564e15e63af90b3f41114b617f8df69629
|
data/.github/workflows/tests.yml
CHANGED
@@ -11,12 +11,10 @@ jobs:
|
|
11
11
|
name: Build and Test
|
12
12
|
runs-on: macos-latest
|
13
13
|
steps:
|
14
|
-
- uses: actions/checkout@
|
14
|
+
- uses: actions/checkout@v4
|
15
|
+
- uses: ruby/setup-ruby@v1
|
15
16
|
- name: Print Xcode version
|
16
17
|
run: sudo xcode-select -p
|
17
|
-
- uses: actions/setup-ruby@v1
|
18
|
-
with:
|
19
|
-
ruby-version: "2.x" # Version range or exact version of a Ruby version to use, using semvers version range syntax.
|
20
18
|
- name: Install Gems
|
21
19
|
run: bundle install
|
22
20
|
- name: Build and Test
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
0.1.6
|
2
|
+
* New xcframework_excluded_platforms option
|
3
|
+
* Add .ruby-version file, update github action code
|
4
|
+
|
5
|
+
0.1.5
|
6
|
+
* Add `testonly` to targets that link with XCTest to account for requirements in https://github.com/bazelbuild/rules_swift/pull/868 (#82)
|
7
|
+
|
1
8
|
0.1.4
|
2
9
|
|
3
10
|
* Fix issues with glob evaluation (#64, #65)
|
data/README.md
CHANGED
@@ -72,4 +72,4 @@ Bug reports and pull requests are welcome on GitHub [here](https://github.com/ba
|
|
72
72
|
|
73
73
|
## License
|
74
74
|
|
75
|
-
The gem is available as open source under the terms of the [
|
75
|
+
The gem is available as open source under the terms of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
data/Rakefile
CHANGED
@@ -55,7 +55,8 @@ module Pod
|
|
55
55
|
build_file_doc: '',
|
56
56
|
features: {
|
57
57
|
experimental_deps_debug_and_release: false
|
58
|
-
}
|
58
|
+
},
|
59
|
+
xcframework_excluded_platforms: [].freeze
|
59
60
|
}.with_indifferent_access.freeze
|
60
61
|
|
61
62
|
private_constant :DEFAULTS
|
@@ -115,6 +116,10 @@ module Pod
|
|
115
116
|
def build_file_doc
|
116
117
|
to_h[:build_file_doc]
|
117
118
|
end
|
119
|
+
|
120
|
+
def xcframework_excluded_platforms
|
121
|
+
to_h[:xcframework_excluded_platforms]
|
122
|
+
end
|
118
123
|
end
|
119
124
|
end
|
120
125
|
end
|
@@ -30,9 +30,12 @@ module Pod
|
|
30
30
|
include XCConfigResolver
|
31
31
|
|
32
32
|
attr_reader :installer, :pod_target, :file_accessors, :non_library_spec, :label, :package, :default_xcconfigs, :resolved_xconfig_by_config, :relative_sandbox_root
|
33
|
+
|
34
|
+
# rubocop:disable Style/AccessModifierDeclarations
|
33
35
|
private :installer, :pod_target, :file_accessors, :non_library_spec, :label, :package, :default_xcconfigs, :resolved_xconfig_by_config, :relative_sandbox_root
|
36
|
+
# rubocop:enable Style/AccessModifierDeclarations
|
34
37
|
|
35
|
-
def initialize(installer, pod_target, non_library_spec = nil, default_xcconfigs = {}, experimental_deps_debug_and_release = false)
|
38
|
+
def initialize(installer, pod_target, non_library_spec = nil, default_xcconfigs = {}, experimental_deps_debug_and_release = false, xcframework_excluded_platforms = [])
|
36
39
|
@installer = installer
|
37
40
|
@pod_target = pod_target
|
38
41
|
@file_accessors = non_library_spec ? pod_target.file_accessors.select { |fa| fa.spec == non_library_spec } : pod_target.file_accessors.select { |fa| fa.spec.library_specification? }
|
@@ -43,6 +46,7 @@ module Pod
|
|
43
46
|
@default_xcconfigs = default_xcconfigs
|
44
47
|
@resolved_xconfig_by_config = {}
|
45
48
|
@experimental_deps_debug_and_release = experimental_deps_debug_and_release
|
49
|
+
@xcframework_excluded_platforms = xcframework_excluded_platforms
|
46
50
|
@relative_sandbox_root = installer.sandbox.root.relative_path_from(installer.config.installation_root).to_s
|
47
51
|
end
|
48
52
|
|
@@ -374,8 +378,10 @@ module Pod
|
|
374
378
|
kwargs[:runtime_deps] = []
|
375
379
|
kwargs[:sdk_dylibs] = file_accessors.flat_map { |fa| fa.spec_consumer.libraries }.sort.uniq
|
376
380
|
kwargs[:sdk_frameworks] = file_accessors.flat_map { |fa| fa.spec_consumer.frameworks }.sort.uniq
|
381
|
+
kwargs[:testonly] = true if kwargs[:sdk_frameworks].include? 'XCTest'
|
377
382
|
kwargs[:sdk_includes] = []
|
378
383
|
kwargs[:weak_sdk_frameworks] = file_accessors.flat_map { |fa| fa.spec_consumer.weak_frameworks }.sort.uniq
|
384
|
+
kwargs[:testonly] = true if kwargs[:weak_sdk_frameworks].include? 'XCTest'
|
379
385
|
|
380
386
|
kwargs[:vendored_static_frameworks] = glob(attr: :vendored_static_frameworks, return_files: true)
|
381
387
|
kwargs[:vendored_dynamic_frameworks] = glob(attr: :vendored_dynamic_frameworks, return_files: true)
|
@@ -689,15 +695,20 @@ module Pod
|
|
689
695
|
{
|
690
696
|
'name' => xcframework.name,
|
691
697
|
'slices' => xcframework.slices.map do |slice|
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
698
|
+
platform_name = rules_ios_platform_name(slice.platform)
|
699
|
+
if @xcframework_excluded_platforms.include?(platform_name)
|
700
|
+
nil
|
701
|
+
else
|
702
|
+
{
|
703
|
+
'identifier' => slice.identifier,
|
704
|
+
'platform' => platform_name,
|
705
|
+
'platform_variant' => slice.platform_variant.to_s,
|
706
|
+
'supported_archs' => slice.supported_archs,
|
707
|
+
'path' => slice.path.relative_path_from(@package_dir).to_s,
|
708
|
+
'build_type' => { 'linkage' => slice.build_type.linkage.to_s, 'packaging' => slice.build_type.packaging.to_s }
|
709
|
+
}
|
710
|
+
end
|
711
|
+
end.compact
|
701
712
|
}
|
702
713
|
end
|
703
714
|
end
|
data/lib/cocoapods/bazel.rb
CHANGED
@@ -44,7 +44,8 @@ module Pod
|
|
44
44
|
pod_target,
|
45
45
|
fa.spec,
|
46
46
|
default_xcconfigs,
|
47
|
-
config.experimental_deps_debug_and_release
|
47
|
+
config.experimental_deps_debug_and_release,
|
48
|
+
config.xcframework_excluded_platforms
|
48
49
|
)
|
49
50
|
end
|
50
51
|
|
@@ -53,7 +54,8 @@ module Pod
|
|
53
54
|
pod_target,
|
54
55
|
nil,
|
55
56
|
default_xcconfigs,
|
56
|
-
config.experimental_deps_debug_and_release
|
57
|
+
config.experimental_deps_debug_and_release,
|
58
|
+
config.xcframework_excluded_platforms
|
57
59
|
)
|
58
60
|
|
59
61
|
bazel_targets = [default_target] + targets_without_library_specification
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-bazel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shawn Chen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- ".rspec"
|
54
54
|
- ".rubocop.yml"
|
55
55
|
- ".rubocop_todo.yml"
|
56
|
+
- ".ruby-version"
|
56
57
|
- CHANGELOG.md
|
57
58
|
- Gemfile
|
58
59
|
- LICENSE.txt
|
@@ -93,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
94
|
- !ruby/object:Gem::Version
|
94
95
|
version: '0'
|
95
96
|
requirements: []
|
96
|
-
rubygems_version: 3.
|
97
|
+
rubygems_version: 3.4.10
|
97
98
|
signing_key:
|
98
99
|
specification_version: 4
|
99
100
|
summary: A plugin for CocoaPods that generates Bazel build files for pods
|