@@ -13,6 +13,7 @@ CARGO_TARGET_DIR = { value = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target",
13
13
CARGO_MAKE_TOOLCHAIN_DEFAULT = { source = " ${CARGO_MAKE_CI}" , default_value = " nightly" , mapping = { "true" = " nightly-2022-08-08" , "false" = " nightly" } }
14
14
CARGO_MAKE_TOOLCHAIN = { value = " ${CARGO_MAKE_TOOLCHAIN_DEFAULT}" , condition = { env_not_set = [" CARGO_MAKE_TOOLCHAIN" ] } }
15
15
CARGO_BUILD_TYPE = { source = " ${CARGO_MAKE_PROFILE}" , default_value = " debug" , mapping = { "development" = " debug" , "release" = " release" } }
16
+ CARGO_PROFILE = { source = " ${CARGO_BUILD_TYPE}" , mapping = { "debug" = " dev" , "release" = " release" } }
16
17
SWIFT_CONFIGURATION = { source = " ${CARGO_MAKE_PROFILE}" , default_value = " debug" , mapping = { "development" = " debug" , "release" = " release" } }
17
18
BACKTRACE_DEFAULT = { source = " ${CARGO_MAKE_CI}" , mapping = { "true" = " 1" , "false" = " 0" } }
18
19
RUST_BACKTRACE = { value = " ${BACKTRACE_DEFAULT}" , condition = { env_not_set = [" RUST_BACKTRACE" ] } }
@@ -92,7 +93,7 @@ script = [
92
93
echo "*************************************"
93
94
echo "Cargo:"
94
95
echo " Home: ${CARGO_MAKE_CARGO_HOME}"
95
- echo " Profile: ${CARGO_MAKE_CARGO_PROFILE }"
96
+ echo " Profile: ${CARGO_MAKE_PROFILE }"
96
97
echo "*************************************"
97
98
'''
98
99
]
@@ -107,7 +108,7 @@ args = ["run", "${CARGO_MAKE_TOOLCHAIN}", "cargo", "check", "${@}"]
107
108
category = " Build"
108
109
description = " Runs cargo build"
109
110
command = " rustup"
110
- args = [" run" , " ${CARGO_MAKE_TOOLCHAIN}" , " cargo" , " build" , " --" , " @@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)" , " ${@}" ]
111
+ args = [" run" , " ${CARGO_MAKE_TOOLCHAIN}" , " cargo" , " build" , " --profile " , " ${CARGO_PROFILE} " , " -- " , " @@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)" , " ${@}" ]
111
112
112
113
[tasks .swift ]
113
114
workspace = false
@@ -132,46 +133,30 @@ args = [
132
133
" -headers" , " ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/swift/LiveViewNativeCore/include" ,
133
134
" -output" , " ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/swift/LiveViewNative/LiveViewNativeCore.xcframework"
134
135
]
135
- dependencies = [" build-universal- macos" , " build-universal -ios" , " remove-existing-xcframework" ]
136
+ dependencies = [" build-macos" , " build-ios" , " remove-existing-xcframework" ]
136
137
137
138
[tasks .remove-existing-xcframework ]
138
139
workspace = false
139
140
private = true
140
141
script_runner = " @duckscript"
141
142
script = " rm -r ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/swift/LiveViewNative/LiveViewNativeCore.xcframework"
142
143
143
- [tasks .build-universal- macos ]
144
+ [tasks .build-macos ]
144
145
workspace = false
145
146
category = " Build"
146
147
description = " Compiles for all targets needed to produce a universal library for macOS"
147
148
command = " rustup"
148
149
args = [" run" , " ${CARGO_MAKE_TOOLCHAIN}" , " cargo" , " build" , " @@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)" , " --target" , " aarch64-apple-darwin" , " --target" , " x86_64-apple-darwin" , " -p" , " liveview-native-core" ]
149
150
dependencies = [" install-targets" ]
150
151
151
- [tasks .package-universal-macos ]
152
- workspace = false
153
- category = " Packaging"
154
- description = " Produces a universal library for macOS"
155
- command = " lipo"
156
- args = [" ${CARGO_TARGET_DIR}/aarch64-apple-darwin/debug/libliveview_native_core.a" , " ${CARGO_TARGET_DIR}/x86_64-apple-darwin/debug/libliveview_native_core.a" , " -create" , " -output" , " ${CARGO_TARGET_DIR}/universal-macos/debug/libliveview_native_core.a" ]
157
- dependencies = [" build-universal-macos" ]
158
-
159
- [tasks .build-universal-ios ]
152
+ [tasks .build-ios ]
160
153
workspace = false
161
154
category = " Build"
162
155
description = " Compiles for all targets needed to produce a universal library for iOS"
163
156
command = " rustup"
164
157
args = [" run" , " ${CARGO_MAKE_TOOLCHAIN}" , " cargo" , " build" , " @@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)" , " --target" , " aarch64-apple-ios" , " --target" , " aarch64-apple-ios-sim" , " --target" , " x86_64-apple-ios" , " -p" , " liveview-native-core" ]
165
158
dependencies = [" prepare-targets" ]
166
159
167
- [tasks .package-universal-ios ]
168
- workspace = false
169
- category = " Packaging"
170
- description = " Produces a universal library for iOS"
171
- command = " lipo"
172
- args = [" ${CARGO_TARGET_DIR}/aarch64-apple-ios/debug/libliveview_native_core.a" , " ${CARGO_TARGET_DIR}/x86_64-apple-ios/debug/libliveview_native_core.a" , " -create" , " -output" , " ${CARGO_TARGET_DIR}/universal-ios/debug/libliveview_native_core.a" ]
173
- dependencies = [" build-universal-ios" ]
174
-
175
160
[tasks .prepare-targets ]
176
161
workspace = false
177
162
private = true
0 commit comments