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:
@@ -1,4 +1,5 @@
|
||||
platform :osx, '10.15'
|
||||
require_relative 'macos_deployment_target'
|
||||
platform :osx, MACOS_BRIDGE_DEPLOYMENT_TARGET
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Single source of truth for the macOS deployment-target floor consumed by the
|
||||
# chanora_bridge Rust cdylib build (SAD-087(a), SDD-119 v0.9.17 amendment).
|
||||
#
|
||||
# This value is the macOS SDK floor against which `libchanora_bridge.dylib` is
|
||||
# compiled — it is NOT the Flutter Runner app's deployment target (which lives
|
||||
# in Runner.xcodeproj/project.pbxproj at the PBXNativeTarget level and is
|
||||
# currently `11.0`). The bridge floor is intentionally broader (`10.15`) so the
|
||||
# cdylib symbols remain link-compatible with any consumer >= 10.15; the Runner
|
||||
# app's own minimum is independently set at the Xcode-target layer.
|
||||
#
|
||||
# Consumers:
|
||||
# - apps/chanora_flutter/macos/Podfile (`platform :osx, ...`)
|
||||
# - apps/chanora_flutter/macos/chanora_bridge.podspec
|
||||
# (`s.platform`, the prepare_command / script_phase
|
||||
# `MACOSX_DEPLOYMENT_TARGET=...` env exports, and the embedded
|
||||
# framework Info.plist `MinimumOSVersion`)
|
||||
#
|
||||
# To bump the floor, edit ONLY this file. Do not introduce any other literal
|
||||
# occurrence of the floor string in this directory.
|
||||
|
||||
MACOS_BRIDGE_DEPLOYMENT_TARGET = '10.15'.freeze
|
||||
Reference in New Issue
Block a user