cocoapods-bazel 0.1.5 → 0.1.7.1
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 +11 -1
- data/lib/cocoapods/bazel/target.rb +23 -12
- data/lib/cocoapods/bazel/version.rb +1 -1
- data/lib/cocoapods/bazel.rb +6 -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: d2d368d169ce3eb04e6b90afaa67190a777256f115b7d06b7b4e120eb2684a29
|
4
|
+
data.tar.gz: 28786338c1b48d58d64fdcacbab8fc8c9a8b0dfde40e4a6e689dd11813a13139
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aa26e8030f1a686ea9e1e157c569b0b1de30cce3400beb184207e5ac7d67ce2e05442c3a9c20e501bdfe9759f6661198dbd4b6a42d0816651efc5dd3bce1d7f
|
7
|
+
data.tar.gz: 04a40e6fd04b7740b6c3ca112d30dcea506d1097b9a13ca09b87298802b59c5f68828ebae022dd60aac14b26988a30a88712b42fe947b861ce393a34dd8d1814
|
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
|
+
2.7.8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
0.1.7
|
2
|
+
* Adding `testonly` to targets that link with XCTest becomes an opt-in with config `enable_add_testonly`
|
3
|
+
|
4
|
+
0.1.6
|
5
|
+
* New xcframework_excluded_platforms option
|
6
|
+
* Add .ruby-version file, update github action code
|
7
|
+
|
1
8
|
0.1.5
|
2
9
|
* Add `testonly` to targets that link with XCTest to account for requirements in https://github.com/bazelbuild/rules_swift/pull/868 (#82)
|
3
10
|
|
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,9 @@ 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,
|
60
|
+
enable_add_testonly: false
|
59
61
|
}.with_indifferent_access.freeze
|
60
62
|
|
61
63
|
private_constant :DEFAULTS
|
@@ -115,6 +117,14 @@ module Pod
|
|
115
117
|
def build_file_doc
|
116
118
|
to_h[:build_file_doc]
|
117
119
|
end
|
120
|
+
|
121
|
+
def xcframework_excluded_platforms
|
122
|
+
to_h[:xcframework_excluded_platforms]
|
123
|
+
end
|
124
|
+
|
125
|
+
def enable_add_testonly
|
126
|
+
to_h[:enable_add_testonly]
|
127
|
+
end
|
118
128
|
end
|
119
129
|
end
|
120
130
|
end
|
@@ -30,9 +30,13 @@ 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,
|
39
|
+
xcframework_excluded_platforms = [], enable_add_testonly = false)
|
36
40
|
@installer = installer
|
37
41
|
@pod_target = pod_target
|
38
42
|
@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 +47,8 @@ module Pod
|
|
43
47
|
@default_xcconfigs = default_xcconfigs
|
44
48
|
@resolved_xconfig_by_config = {}
|
45
49
|
@experimental_deps_debug_and_release = experimental_deps_debug_and_release
|
50
|
+
@xcframework_excluded_platforms = xcframework_excluded_platforms
|
51
|
+
@enable_add_testonly = enable_add_testonly
|
46
52
|
@relative_sandbox_root = installer.sandbox.root.relative_path_from(installer.config.installation_root).to_s
|
47
53
|
end
|
48
54
|
|
@@ -374,10 +380,10 @@ module Pod
|
|
374
380
|
kwargs[:runtime_deps] = []
|
375
381
|
kwargs[:sdk_dylibs] = file_accessors.flat_map { |fa| fa.spec_consumer.libraries }.sort.uniq
|
376
382
|
kwargs[:sdk_frameworks] = file_accessors.flat_map { |fa| fa.spec_consumer.frameworks }.sort.uniq
|
377
|
-
kwargs[:testonly] = true if kwargs[:sdk_frameworks].include? 'XCTest'
|
383
|
+
kwargs[:testonly] = true if (kwargs[:sdk_frameworks].include? 'XCTest') && @enable_add_testonly
|
378
384
|
kwargs[:sdk_includes] = []
|
379
385
|
kwargs[:weak_sdk_frameworks] = file_accessors.flat_map { |fa| fa.spec_consumer.weak_frameworks }.sort.uniq
|
380
|
-
kwargs[:testonly] = true if kwargs[:weak_sdk_frameworks].include? 'XCTest'
|
386
|
+
kwargs[:testonly] = true if (kwargs[:weak_sdk_frameworks].include? 'XCTest') && @enable_add_testonly
|
381
387
|
|
382
388
|
kwargs[:vendored_static_frameworks] = glob(attr: :vendored_static_frameworks, return_files: true)
|
383
389
|
kwargs[:vendored_dynamic_frameworks] = glob(attr: :vendored_dynamic_frameworks, return_files: true)
|
@@ -691,15 +697,20 @@ module Pod
|
|
691
697
|
{
|
692
698
|
'name' => xcframework.name,
|
693
699
|
'slices' => xcframework.slices.map do |slice|
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
700
|
+
platform_name = rules_ios_platform_name(slice.platform)
|
701
|
+
if @xcframework_excluded_platforms.include?(platform_name)
|
702
|
+
nil
|
703
|
+
else
|
704
|
+
{
|
705
|
+
'identifier' => slice.identifier,
|
706
|
+
'platform' => platform_name,
|
707
|
+
'platform_variant' => slice.platform_variant.to_s,
|
708
|
+
'supported_archs' => slice.supported_archs,
|
709
|
+
'path' => slice.path.relative_path_from(@package_dir).to_s,
|
710
|
+
'build_type' => { 'linkage' => slice.build_type.linkage.to_s, 'packaging' => slice.build_type.packaging.to_s }
|
711
|
+
}
|
712
|
+
end
|
713
|
+
end.compact
|
703
714
|
}
|
704
715
|
end
|
705
716
|
end
|
data/lib/cocoapods/bazel.rb
CHANGED
@@ -44,7 +44,9 @@ 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,
|
49
|
+
config.enable_add_testonly
|
48
50
|
)
|
49
51
|
end
|
50
52
|
|
@@ -53,7 +55,9 @@ module Pod
|
|
53
55
|
pod_target,
|
54
56
|
nil,
|
55
57
|
default_xcconfigs,
|
56
|
-
config.experimental_deps_debug_and_release
|
58
|
+
config.experimental_deps_debug_and_release,
|
59
|
+
config.xcframework_excluded_platforms,
|
60
|
+
config.enable_add_testonly
|
57
61
|
)
|
58
62
|
|
59
63
|
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.7.1
|
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-16 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
|