mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-08-03 18:16:15 +00:00
bump build memory, run-mobile device fallback
This commit is contained in:
parent
fb805b738b
commit
71a125065c
4 changed files with 36 additions and 14 deletions
|
|
@ -1,11 +1,11 @@
|
|||
#Kotlin
|
||||
kotlin.code.style=official
|
||||
kotlin.daemon.jvmargs=-Xmx6144M
|
||||
kotlin.native.jvmArgs=-Xmx12288M
|
||||
kotlin.daemon.jvmargs=-Xmx8192M
|
||||
kotlin.native.jvmArgs=-Xmx16384M
|
||||
kotlin.mpp.enableCInteropCommonization=true
|
||||
|
||||
#Gradle
|
||||
org.gradle.jvmargs=-Xmx8192M -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=1536m
|
||||
org.gradle.jvmargs=-Xmx12288M -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=2048m
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
CURRENT_PROJECT_VERSION=92
|
||||
MARKETING_VERSION=0.2.20
|
||||
MARKETING_VERSION=1.1.20
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\nif [ -z \"$JAVA_HOME\" ] && [ -x \"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/bin/java\" ]; then\n export JAVA_HOME=\"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home\"\nfi\nif [ -n \"$JAVA_HOME\" ]; then\n export PATH=\"$JAVA_HOME/bin:/opt/homebrew/bin:$PATH\"\nelse\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\ncd \"$SRCROOT/..\"\n./gradlew :composeApp:embedAndSignAppleFrameworkForXcode\n";
|
||||
shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\nif [ -z \"$JAVA_HOME\" ] && [ -x \"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/bin/java\" ]; then\n export JAVA_HOME=\"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home\"\nfi\nif [ -n \"$JAVA_HOME\" ]; then\n export PATH=\"$JAVA_HOME/bin:/opt/homebrew/bin:$PATH\"\nelse\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\nif [ -z \"$GRADLE_OPTS\" ]; then\n export GRADLE_OPTS=\"-Xmx12288M -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=2048m\"\nfi\nif [ -z \"$KOTLIN_DAEMON_JVMARGS\" ]; then\n export KOTLIN_DAEMON_JVMARGS=\"-Xmx8192M\"\nfi\ncd \"$SRCROOT/..\"\n./gradlew :composeApp:embedAndSignAppleFrameworkForXcode\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ first_booted_ios_simulator() {
|
|||
xcrun simctl list devices booted | awk -F '[()]' '/Booted/ { print $2; exit }'
|
||||
}
|
||||
|
||||
preferred_ios_device() {
|
||||
selected_ios_device() {
|
||||
xcrun xcdevice list --timeout 5 2>/dev/null | python3 -c '
|
||||
import json
|
||||
import sys
|
||||
|
|
@ -91,11 +91,21 @@ physical = [
|
|||
if device.get("platform") == "com.apple.platform.iphoneos"
|
||||
and not device.get("simulator", False)
|
||||
and device.get("available") is True
|
||||
and device.get("modelName") == os.environ["IOS_PREFERRED_DEVICE_MODEL"]
|
||||
]
|
||||
|
||||
if physical:
|
||||
print(physical[0].get("identifier", ""))
|
||||
preferred_model = os.environ["IOS_PREFERRED_DEVICE_MODEL"]
|
||||
preferred = [
|
||||
device for device in physical
|
||||
if device.get("modelName") == preferred_model
|
||||
]
|
||||
|
||||
selected = (preferred or physical or [None])[0]
|
||||
if selected:
|
||||
print("\t".join([
|
||||
selected.get("identifier", ""),
|
||||
selected.get("name", ""),
|
||||
selected.get("modelName", ""),
|
||||
]))
|
||||
'
|
||||
}
|
||||
|
||||
|
|
@ -336,16 +346,28 @@ run_ios_physical() {
|
|||
require_command xcodebuild
|
||||
require_command xcrun
|
||||
|
||||
local physical_device_id
|
||||
physical_device_id="$(IOS_PREFERRED_DEVICE_MODEL="$IOS_PREFERRED_DEVICE_MODEL" preferred_ios_device)"
|
||||
local physical_device_info
|
||||
physical_device_info="$(IOS_PREFERRED_DEVICE_MODEL="$IOS_PREFERRED_DEVICE_MODEL" selected_ios_device)"
|
||||
|
||||
if [[ -n "$physical_device_info" ]]; then
|
||||
local physical_device_id=""
|
||||
local physical_device_name=""
|
||||
local physical_device_model=""
|
||||
IFS=$'\t' read -r physical_device_id physical_device_name physical_device_model <<<"$physical_device_info"
|
||||
|
||||
if [[ -n "$physical_device_id" ]]; then
|
||||
local derived_data_path
|
||||
derived_data_path="$(ios_derived_data_path device "$distribution")"
|
||||
|
||||
local device_app_path
|
||||
device_app_path="$derived_data_path/Build/Products/Debug-iphoneos/$IOS_APP_NAME"
|
||||
|
||||
if [[ "$physical_device_model" == "$IOS_PREFERRED_DEVICE_MODEL" ]]; then
|
||||
echo "Using preferred iOS physical device: ${physical_device_name:-$physical_device_id} ($physical_device_model)"
|
||||
else
|
||||
echo "Preferred iOS device not available: $IOS_PREFERRED_DEVICE_MODEL"
|
||||
echo "Using connected iOS physical device: ${physical_device_name:-$physical_device_id}${physical_device_model:+ ($physical_device_model)}"
|
||||
fi
|
||||
|
||||
echo "Building iOS $distribution debug app for physical device $physical_device_id..."
|
||||
env NUVIO_IOS_DISTRIBUTION="$distribution" xcodebuild \
|
||||
-project "$IOS_PROJECT" \
|
||||
|
|
@ -368,8 +390,8 @@ run_ios_physical() {
|
|||
return
|
||||
fi
|
||||
|
||||
echo "Preferred iOS device not available: $IOS_PREFERRED_DEVICE_MODEL" >&2
|
||||
echo "Connect and unlock that device, then rerun: ./scripts/run-mobile.sh ios p" >&2
|
||||
echo "No available iOS physical devices found." >&2
|
||||
echo "Connect and unlock a device, then rerun: ./scripts/run-mobile.sh ios p" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue