/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/scripts/codegen/templates/Package.swift.template
59 строк
2 KB
Riccardo Cipolleschi
Make codegen generate a Package.swift file for Codegen'd target (#53619)
10 сен 2025, 15:25
10 сен 2025, 15:25
a7cd3cc
Код
Авторство
О чём код?
// swift-tools-version: 6.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "React-GeneratedCode", platforms: [.iOS(.v15), .macCatalyst(SupportedPlatform.MacCatalystVersion.v13)], products: [ // Products define the executables and libraries a package produces, making them visible to other packages. .library( name: "ReactCodegen", targets: ["ReactCodegen"]), .library( name: "ReactAppDependencyProvider", targets: ["ReactAppDependencyProvider"]), ], dependencies: [ .package(name: "React", path: "{reactNativePath}") ], targets: [ // Targets are the basic building blocks of a package, defining a module or a test suite. // Targets can depend on other targets in this package and products from dependencies. .target( name: "ReactCodegen", dependencies: ["React"], path: "ReactCodegen", exclude: ["ReactCodegen.podspec"], publicHeadersPath: ".", cSettings: [ .headerSearchPath("headers") ], cxxSettings: [ .headerSearchPath("headers"), .unsafeFlags(["-std=c++20"]), ], linkerSettings: [ .linkedFramework("Foundation") ] ), .target( name: "ReactAppDependencyProvider", dependencies: ["ReactCodegen"], path: "ReactAppDependencyProvider", exclude: ["ReactAppDependencyProvider.podspec"], publicHeadersPath: ".", cSettings: [ .headerSearchPath("headers"), ], cxxSettings: [ .headerSearchPath("headers"), .unsafeFlags(["-std=c++20"]), ], linkerSettings: [ .linkedFramework("Foundation") ] ) ] )