diff --git a/.gitignore b/.gitignore index e0db44b0d94..ff2474a3524 100644 --- a/.gitignore +++ b/.gitignore @@ -142,9 +142,7 @@ vendor/ /packages/react-native/sdks/hermes-engine/hermes-engine-from-local-source-dir.tar.gz # iOS prebuilds -/packages/react-native/third-party/glog -/packages/react-native/third-party/.swiftpm -/packages/react-native/third-party/.build +/packages/react-native/third-party/ fix_*.patch *.xcframework diff --git a/scripts/releases/prebuild/constants.js b/scripts/releases/prebuild/constants.js new file mode 100644 index 00000000000..443834ecc72 --- /dev/null +++ b/scripts/releases/prebuild/constants.js @@ -0,0 +1,18 @@ +/** + * 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. + * + * @flow + * @format + * @oncall react_native + */ + +module.exports = { + SOURCE_FOLDER: 'source', // This is where the original structure will be stored + TARGET_FOLDER: 'target', // This is where the final structure will be stored + HEADERS_FOLDER: 'headers', // This is where the headers will be stored + SCRIPTS_FOLDER: 'scripts', // This is where the scripts will be stored + RESOURCES_FOLDER: 'Resources', // This is where the resources will be stored in side the target folder +}; diff --git a/scripts/releases/prebuild/types.js b/scripts/releases/prebuild/types.js new file mode 100644 index 00000000000..7e86ff60046 --- /dev/null +++ b/scripts/releases/prebuild/types.js @@ -0,0 +1,62 @@ +/** + * 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. + * + * @flow + * @format + * @oncall react_native + */ + +/*:: +export type Folder = RegExp; + +export type Files = $ReadOnly<{ + headers: $ReadOnlyArray, + sources: $ReadOnlyArray, + resources?: $ReadOnlyArray, + // Relative path from target root to where the header files should be copied. + // Can be used to ensure header search paths like + // are correctly resolved. + headerTargetFolder?: string, + headerSkipFolderNames?: string, +}>; + +export type Define = $ReadOnly<{ + name: string, + value?: string, +}>; + +export type Settings = $ReadOnly<{ + headerSearchPaths?: $ReadOnlyArray, + defines?: $ReadOnlyArray, + compilerFlags?: $ReadOnlyArray, + linkedLibraries?: $ReadOnlyArray, + publicHeaderFiles: string, + linkerSettings?: $ReadOnlyArray +}>; + +export type Dependency = $ReadOnly<{ + name: string, + version: string, + url: URL, + prepareScript?: string, + files: Files, + settings: Settings, + disabled?: boolean, + dependencies?: $ReadOnlyArray, +}>; + +export type Platform = + 'iOS' | + 'iOS Simulator' | + 'macOS' | + 'macOS,variant=Mac Catalyst' | + 'tvOS' | + 'tvOS Simulator' | + 'visionOS' | + 'visionOS Simulator'; +*/ + +module.exports = {};