Skip to content

Commit

Permalink
fix(datastore): Pin Starscream (#3584)
Browse files Browse the repository at this point in the history
The repo added a new enum case (daltoniam/Starscream@f900d67) which is not handled by Amplify's `AppSyncRealTimeClient` causing build failures for Starscream >4.0.4
  • Loading branch information
dnys1 authored Aug 20, 2023
1 parent b239ace commit cc5c582
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build-support/build_canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"

PROJECT_DIR=$(mktemp -d)
echo "Building in $PROJECT_DIR"
cd $PROJECT_DIR

# generate
Expand All @@ -23,11 +24,13 @@ cp -r $ROOT_DIR/canaries/lib .
cp $ROOT_DIR/build-support/dummy_amplifyconfiguration.dart lib/amplifyconfiguration.dart

# Android
sed -i'' -e "s/ext.kotlin_version = .*/ext.kotlin_version = \"1.8.21\"/" ./android/build.gradle
sed -i'' -e "s/minSdkVersion .*/minSdkVersion 24/" ./android/app/build.gradle
sed -i'' -e "s/compileSdkVersion .*/compileSdkVersion 33/" ./android/app/build.gradle
sed -i '' -e "s/ext.kotlin_version = .*/ext.kotlin_version = \"1.8.21\"/" ./android/build.gradle
sed -i '' -e "s/minSdkVersion .*/minSdkVersion 24/" ./android/app/build.gradle
sed -i '' -e "s/compileSdkVersion .*/compileSdkVersion 33/" ./android/app/build.gradle
cat ./android/app/build.gradle
# iOS
sed -i'' -e "s/# platform .*/platform :ios, '13.0'/" ./ios/Podfile && cat ./ios/Podfile
sed -i '' -e "s/# platform .*/platform :ios, '13.0'/" ./ios/Podfile
cat ./ios/Podfile
pod repo update

flutter build $@
1 change: 1 addition & 0 deletions packages/amplify_datastore/ios/amplify_datastore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The DataStore module for Amplify Flutter.
s.dependency 'Amplify', '1.30.4'
s.dependency 'AmplifyPlugins/AWSAPIPlugin', '1.30.4'
s.dependency 'AmplifyPlugins/AWSDataStorePlugin', '1.30.4'
s.dependency 'Starscream', '4.0.4'
s.platform = :ios, '13.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
Expand Down

0 comments on commit cc5c582

Please sign in to comment.