-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify the dependencies migration for new libraries (#34619)
Summary: Pull Request resolved: #34619 When it comes to migrate existing libraries, users needs to update their .podspec files with a bunch [of changes](https://reactnative.dev/docs/0.69/new-architecture-library-ios#add-folly-and-other-dependencies). This diff groups those changes in a single function, so that contributors can just invoke that function to prepare their dependencies. ## Changelog [iOS][Changed] - Add function to simplify podspecs Reviewed By: cortinico Differential Revision: D39312203 fbshipit-source-id: ed631839e07d472a1fdcba33310f9b1d94fe2fd7
- Loading branch information
1 parent
54e50ea
commit 82e9c6a
Showing
6 changed files
with
141 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
class SpecMock | ||
|
||
attr_accessor :compiler_flags | ||
attr_accessor :pod_target_xcconfig | ||
attr_reader :dependencies | ||
|
||
def initialize | ||
@compiler_flags = "" | ||
@pod_target_xcconfig = Hash.new | ||
@dependencies = [] | ||
end | ||
|
||
def dependency(dependency_name, version = nil) | ||
toPush = {"dependency_name": dependency_name} | ||
toPush["version"] = version if version | ||
@dependencies.push(toPush) | ||
end | ||
|
||
def to_hash | ||
return { | ||
"compiler_flags" => @compiler_flags, | ||
"pod_target_xcconfig" => @pod_target_xcconfig, | ||
} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters