Skip to content

Commit 8afa565

Browse files
committed
chore(widgets): build update
1 parent 859df73 commit 8afa565

File tree

3 files changed

+41
-31
lines changed

3 files changed

+41
-31
lines changed

packages/ui-mobile-base/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.1.0'
9+
classpath 'com.android.tools.build:gradle:8.3.2'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

packages/ui-mobile-base/ios/build.sh

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -e
55

66
BUILD_DIR=$(PWD)/TNSWidgets/build
77
rm -rf $BUILD_DIR
8+
arch=$(uname -m)
89

910
echo "Build for iphonesimulator"
1011
xcodebuild \
@@ -47,43 +48,52 @@ xcodebuild \
4748
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
4849
-quiet
4950

50-
# Only available with Xcode >= 15.2
51-
echo "Build for visionOS Simulator"
52-
xcodebuild \
53-
-project TNSWidgets/TNSWidgets.xcodeproj \
54-
-scheme TNSWidgets \
55-
-configuration Release \
56-
-destination "generic/platform=visionOS Simulator" \
57-
clean build \
58-
BUILD_DIR=$BUILD_DIR \
59-
SKIP_INSTALL=NO \
60-
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
61-
-quiet
51+
if [ "$arch" = "arm64" ]; then
52+
# Only available with Xcode >= 15.2
53+
echo "Build for visionOS Simulator"
54+
xcodebuild \
55+
-project TNSWidgets/TNSWidgets.xcodeproj \
56+
-scheme TNSWidgets \
57+
-configuration Release \
58+
-destination "generic/platform=visionOS Simulator" \
59+
clean build \
60+
BUILD_DIR=$BUILD_DIR \
61+
SKIP_INSTALL=NO \
62+
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
63+
-quiet
6264

63-
echo "Build for visionOS"
64-
xcodebuild \
65-
-project TNSWidgets/TNSWidgets.xcodeproj \
66-
-scheme TNSWidgets \
67-
-configuration Release \
68-
-destination "generic/platform=visionOS" \
69-
clean build \
70-
BUILD_DIR=$BUILD_DIR \
71-
SKIP_INSTALL=NO \
72-
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
73-
-quiet
65+
echo "Build for visionOS"
66+
xcodebuild \
67+
-project TNSWidgets/TNSWidgets.xcodeproj \
68+
-scheme TNSWidgets \
69+
-configuration Release \
70+
-destination "generic/platform=visionOS" \
71+
clean build \
72+
BUILD_DIR=$BUILD_DIR \
73+
SKIP_INSTALL=NO \
74+
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
75+
-quiet
76+
fi
7477

7578
echo "Creating XCFramework"
7679
BASE=$BUILD_DIR/Release
77-
xcodebuild \
78-
-create-xcframework \
80+
81+
extra_frameworks=""
82+
83+
# Check hardware arch (works even if running under Rosetta)
84+
if [ "$arch" = "arm64" ]; then
85+
extra_frameworks="\
86+
-framework $BASE-xrsimulator/TNSWidgets.framework \
87+
-debug-symbols $BASE-xrsimulator/TNSWidgets.framework.dSYM \
88+
-framework $BASE-xros/TNSWidgets.framework \
89+
-debug-symbols $BASE-xros/TNSWidgets.framework.dSYM"
90+
fi
91+
xcodebuild -create-xcframework \
7992
-framework $BASE-iphoneos/TNSWidgets.framework \
8093
-debug-symbols $BASE-iphoneos/TNSWidgets.framework.dSYM \
8194
-framework $BASE-iphonesimulator/TNSWidgets.framework \
8295
-debug-symbols $BASE-iphonesimulator/TNSWidgets.framework.dSYM \
8396
-framework $BASE-maccatalyst/TNSWidgets.framework \
8497
-debug-symbols $BASE-maccatalyst/TNSWidgets.framework.dSYM \
85-
-framework $BASE-xrsimulator/TNSWidgets.framework \
86-
-debug-symbols $BASE-xrsimulator/TNSWidgets.framework.dSYM \
87-
-framework $BASE-xros/TNSWidgets.framework \
88-
-debug-symbols $BASE-xros/TNSWidgets.framework.dSYM \
98+
$extra_frameworks \
8999
-output $BUILD_DIR/TNSWidgets.xcframework

0 commit comments

Comments
 (0)