Skip to content

Commit

Permalink
retain order
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Aug 19, 2024
1 parent 655f4ad commit b09018d
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 131 deletions.
14 changes: 7 additions & 7 deletions tooling/cli/src/helpers/pbxproj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: MIT

use std::{
collections::HashMap,
collections::BTreeMap,
path::{Path, PathBuf},
};

Expand All @@ -14,9 +14,9 @@ pub fn parse<P: AsRef<Path>>(path: P) -> crate::Result<Pbxproj> {
let mut proj = Pbxproj {
path: path.to_owned(),
raw_lines: pbxproj.split('\n').map(ToOwned::to_owned).collect(),
xc_build_configuration: HashMap::new(),
xc_configuration_list: HashMap::new(),
additions: HashMap::new(),
xc_build_configuration: BTreeMap::new(),
xc_configuration_list: BTreeMap::new(),
additions: BTreeMap::new(),
has_changes: false,
};

Expand Down Expand Up @@ -173,11 +173,11 @@ enum State {
pub struct Pbxproj {
path: PathBuf,
raw_lines: Vec<String>,
pub xc_build_configuration: HashMap<String, XCBuildConfiguration>,
pub xc_configuration_list: HashMap<String, XCConfigurationList>,
pub xc_build_configuration: BTreeMap<String, XCBuildConfiguration>,
pub xc_configuration_list: BTreeMap<String, XCConfigurationList>,

// maps the line number to the line to add
additions: HashMap<usize, String>,
additions: BTreeMap<usize, String>,

has_changes: bool,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,130 +482,6 @@ Pbxproj {
"",
],
xc_build_configuration: {
"BF284FE6E7AE0C8DDCCE398B": XCBuildConfiguration {
build_settings: [
BuildSettings {
identation: "\t\t\t\t",
line_number: 382,
key: "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES",
value: "YES",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 383,
key: "ARCHS",
value: "(\t\t\t\t\tarm64,\n\t\t\t\t\t\"arm64-sim\",\n\t\t\t\t);\n",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 387,
key: "ASSETCATALOG_COMPILER_APPICON_NAME",
value: "AppIcon",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 388,
key: "CODE_SIGN_ENTITLEMENTS",
value: "api_iOS/api_iOS.entitlements",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 389,
key: "CODE_SIGN_IDENTITY",
value: "\"iPhone Developer\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 390,
key: "DEVELOPMENT_TEAM",
value: "Q93MBH6S2F",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 391,
key: "ENABLE_BITCODE",
value: "NO",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 392,
key: "\"EXCLUDED_ARCHS[sdk=iphoneos*]\"",
value: "\"arm64-sim x86_64\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 393,
key: "\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\"",
value: "arm64",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 394,
key: "FRAMEWORK_SEARCH_PATHS",
value: "(\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"\\\".\\\"\",\n\t\t\t\t);\n",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 398,
key: "INFOPLIST_FILE",
value: "api_iOS/Info.plist",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 399,
key: "LD_RUNPATH_SEARCH_PATHS",
value: "(\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 403,
key: "\"LIBRARY_SEARCH_PATHS[arch=arm64-sim]\"",
value: "\"$(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 404,
key: "\"LIBRARY_SEARCH_PATHS[arch=arm64]\"",
value: "\"$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 405,
key: "\"LIBRARY_SEARCH_PATHS[arch=x86_64]\"",
value: "\"$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 406,
key: "PRODUCT_BUNDLE_IDENTIFIER",
value: "com.tauri.api",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 407,
key: "PRODUCT_NAME",
value: "\"Tauri API\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 408,
key: "SDKROOT",
value: "iphoneos",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 409,
key: "TARGETED_DEVICE_FAMILY",
value: "\"1,2\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 410,
key: "VALID_ARCHS",
value: "\"arm64 arm64-sim\"",
},
],
},
"A83F70B4C02DD0222038C7F1": XCBuildConfiguration {
build_settings: [
BuildSettings {
Expand Down Expand Up @@ -1238,6 +1114,130 @@ Pbxproj {
},
],
},
"BF284FE6E7AE0C8DDCCE398B": XCBuildConfiguration {
build_settings: [
BuildSettings {
identation: "\t\t\t\t",
line_number: 382,
key: "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES",
value: "YES",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 383,
key: "ARCHS",
value: "(\t\t\t\t\tarm64,\n\t\t\t\t\t\"arm64-sim\",\n\t\t\t\t);\n",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 387,
key: "ASSETCATALOG_COMPILER_APPICON_NAME",
value: "AppIcon",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 388,
key: "CODE_SIGN_ENTITLEMENTS",
value: "api_iOS/api_iOS.entitlements",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 389,
key: "CODE_SIGN_IDENTITY",
value: "\"iPhone Developer\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 390,
key: "DEVELOPMENT_TEAM",
value: "Q93MBH6S2F",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 391,
key: "ENABLE_BITCODE",
value: "NO",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 392,
key: "\"EXCLUDED_ARCHS[sdk=iphoneos*]\"",
value: "\"arm64-sim x86_64\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 393,
key: "\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\"",
value: "arm64",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 394,
key: "FRAMEWORK_SEARCH_PATHS",
value: "(\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"\\\".\\\"\",\n\t\t\t\t);\n",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 398,
key: "INFOPLIST_FILE",
value: "api_iOS/Info.plist",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 399,
key: "LD_RUNPATH_SEARCH_PATHS",
value: "(\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 403,
key: "\"LIBRARY_SEARCH_PATHS[arch=arm64-sim]\"",
value: "\"$(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 404,
key: "\"LIBRARY_SEARCH_PATHS[arch=arm64]\"",
value: "\"$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 405,
key: "\"LIBRARY_SEARCH_PATHS[arch=x86_64]\"",
value: "\"$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 406,
key: "PRODUCT_BUNDLE_IDENTIFIER",
value: "com.tauri.api",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 407,
key: "PRODUCT_NAME",
value: "\"Tauri API\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 408,
key: "SDKROOT",
value: "iphoneos",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 409,
key: "TARGETED_DEVICE_FAMILY",
value: "\"1,2\"",
},
BuildSettings {
identation: "\t\t\t\t",
line_number: 410,
key: "VALID_ARCHS",
value: "\"arm64 arm64-sim\"",
},
],
},
"DB0E254D0FD84970B57F6410": XCBuildConfiguration {
build_settings: [
BuildSettings {
Expand Down

0 comments on commit b09018d

Please sign in to comment.