docs(sdd-119)+feat(macos): consolidate deployment-target SoT (SDD-119 amendment v0.9.17)

Resolve the macOS half of the SDD-119 item 3 single-source-of-truth follow-up. The chanora_bridge cdylib macOS deployment-target floor ('10.15') was previously hard-coded at 7 sites across Podfile and chanora_bridge.podspec; this commit collapses them to a single Ruby constant declaration in a new SoT file.

Selected Option B (Ruby constant) over Option A (.xcconfig — rejected because the podspec prepare_command runs before any xcconfig is applied) and Option C (versioned text file — rejected as overkill given both consumers are already Ruby). Realizes SAD-087(a)'s 'single macOS build-configuration location' mandate.

Out of scope: the pbxproj 'MACOSX_DEPLOYMENT_TARGET = 10.15' lines (565/666/717) belong to the PBXProject default config and are independently overridden to '11.0' at the Runner PBXNativeTarget level; they are the Runner app's floor, not the bridge cdylib's floor. The iOS half (IPHONEOS_DEPLOYMENT_TARGET=13.0) remains an open follow-up.

Files: new apps/chanora_flutter/macos/macos_deployment_target.rb (MACOS_BRIDGE_DEPLOYMENT_TARGET = '10.15'.freeze); Podfile + chanora_bridge.podspec require_relative the constant and consume it at 7 sites; docs/architecture/sdd.md SDD-119 item 3 rewritten + Notes bullet updated + v0.9.17 changelog entry.
This commit is contained in:
EdisonJwa
2026-05-18 14:39:14 +08:00
parent 92087d066a
commit a77a9b2ef2
4 changed files with 40 additions and 10 deletions
@@ -24,6 +24,8 @@
# prepare_command runs with PWD = the directory of this file, so all
# paths are relative to apps/chanora_flutter/macos/.
require_relative 'macos_deployment_target'
Pod::Spec.new do |s|
s.name = 'chanora_bridge'
s.version = '1.0.0'
@@ -36,7 +38,7 @@ Pod::Spec.new do |s|
s.license = { :type => 'Apache-2.0 OR MIT', :text => 'See LICENSE-APACHE / LICENSE-MIT at the repo root' }
s.author = { 'EdisonJwa' => 'me@edison.network' }
s.source = { :path => '.' }
s.platform = :osx, '10.15'
s.platform = :osx, MACOS_BRIDGE_DEPLOYMENT_TARGET
# Build the Rust bridge on `pod install`. The script runs under
# bash; we use `set -e` so any failure (cargo missing, target not
@@ -51,7 +53,7 @@ Pod::Spec.new do |s|
echo "[chanora_bridge.podspec] cargo build aarch64-apple-darwin"
cd "$REPO_ROOT"
PATH="$HOME/.cargo/bin:$PATH" \\
MACOSX_DEPLOYMENT_TARGET=10.15 \\
MACOSX_DEPLOYMENT_TARGET=#{MACOS_BRIDGE_DEPLOYMENT_TARGET} \\
CMAKE_POLICY_VERSION_MINIMUM=3.5 \\
LIBOPUS_STATIC=1 \\
LIBOPUS_NO_PKG=1 \\
@@ -59,7 +61,7 @@ Pod::Spec.new do |s|
echo "[chanora_bridge.podspec] cargo build x86_64-apple-darwin"
PATH="$HOME/.cargo/bin:$PATH" \\
MACOSX_DEPLOYMENT_TARGET=10.15 \\
MACOSX_DEPLOYMENT_TARGET=#{MACOS_BRIDGE_DEPLOYMENT_TARGET} \\
CMAKE_POLICY_VERSION_MINIMUM=3.5 \\
LIBOPUS_STATIC=1 \\
LIBOPUS_NO_PKG=1 \\
@@ -103,7 +105,7 @@ Pod::Spec.new do |s|
<key>CFBundleShortVersionString</key><string>1.0.0</string>
<key>CFBundleVersion</key><string>1</string>
<key>CFBundleSupportedPlatforms</key><array><string>MacOSX</string></array>
<key>MinimumOSVersion</key><string>10.15</string>
<key>MinimumOSVersion</key><string>#{MACOS_BRIDGE_DEPLOYMENT_TARGET}</string>
</dict>
</plist>
PLIST
@@ -140,7 +142,7 @@ PLIST
echo "[chanora_bridge script_phase] cargo build aarch64-apple-darwin"
cd "$REPO_ROOT"
PATH="$HOME/.cargo/bin:$PATH" \
MACOSX_DEPLOYMENT_TARGET=10.15 \
MACOSX_DEPLOYMENT_TARGET=#{MACOS_BRIDGE_DEPLOYMENT_TARGET} \
CMAKE_POLICY_VERSION_MINIMUM=3.5 \
LIBOPUS_STATIC=1 \
LIBOPUS_NO_PKG=1 \
@@ -148,7 +150,7 @@ PLIST
echo "[chanora_bridge script_phase] cargo build x86_64-apple-darwin"
PATH="$HOME/.cargo/bin:$PATH" \
MACOSX_DEPLOYMENT_TARGET=10.15 \
MACOSX_DEPLOYMENT_TARGET=#{MACOS_BRIDGE_DEPLOYMENT_TARGET} \
CMAKE_POLICY_VERSION_MINIMUM=3.5 \
LIBOPUS_STATIC=1 \
LIBOPUS_NO_PKG=1 \
@@ -188,7 +190,7 @@ PLIST
<key>CFBundleShortVersionString</key><string>1.0.0</string>
<key>CFBundleVersion</key><string>1</string>
<key>CFBundleSupportedPlatforms</key><array><string>MacOSX</string></array>
<key>MinimumOSVersion</key><string>10.15</string>
<key>MinimumOSVersion</key><string>#{MACOS_BRIDGE_DEPLOYMENT_TARGET}</string>
</dict>
</plist>
PLIST