Skip to content

Commit 08271d8

Browse files
authored
feat: update plus plugins version (#4619)
* update dart and flutter sdk version * run dart fix * update _plus plugin versions and fix the code for breaking changes
1 parent 549f355 commit 08271d8

File tree

223 files changed

+2656
-2569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+2656
-2569
lines changed

.github/composite_actions/launch_android_emulator/dist/main.cjs

Lines changed: 505 additions & 494 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/composite_actions/launch_android_emulator/dist/main.cjs.map

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/composite_actions/launch_ios_simulator/dist/main.cjs

Lines changed: 473 additions & 428 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/composite_actions/launch_ios_simulator/dist/main.cjs.map

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/composite_actions/log_cw_metric/dist/main.cjs

Lines changed: 492 additions & 466 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/composite_actions/log_cw_metric/dist/main.cjs.map

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/composite_actions/setup_chromedriver/dist/main.cjs

Lines changed: 675 additions & 699 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/composite_actions/setup_chromedriver/dist/main.cjs.map

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/actions.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Setup Dart
3333
uses: dart-lang/setup-dart@e58aeb62aef51dcc4d0ba8eada7c08092aad5314 # main
3434
with:
35-
sdk: 3.2.0-150.0.dev
35+
sdk: 3.3.0
3636

3737
- name: Setup pnpm
3838
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # 2.4.0
@@ -57,7 +57,7 @@ jobs:
5757
- name: Setup Dart
5858
uses: dart-lang/setup-dart@e58aeb62aef51dcc4d0ba8eada7c08092aad5314 # main
5959
with:
60-
sdk: 3.2.0-150.0.dev
60+
sdk: 3.3.0
6161

6262
- name: Get Packages
6363
working-directory: actions
@@ -117,7 +117,7 @@ jobs:
117117
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # 3.12.0
118118
with:
119119
distribution: "corretto" # Amazon Corretto Build of OpenJDK
120-
java-version: "11"
120+
java-version: "17"
121121

122122
- name: Test
123123
timeout-minutes: 10

.github/workflows/amplify_canaries.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- "any" # latest
3232
include:
3333
- channel: "stable"
34-
flutter-version: "3.10.1"
34+
flutter-version: "3.19.0"
3535
steps:
3636
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # 3.6.0
3737
with:
@@ -43,11 +43,10 @@ jobs:
4343
channel: ${{ matrix.channel }}
4444
flutter-version: ${{ matrix.flutter-version }}
4545

46-
# Flutter requires Java 11 to build android apps with Gradle.
4746
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # 3.12.0
4847
with:
4948
distribution: "corretto" # Amazon Corretto Build of OpenJDK
50-
java-version: "11"
49+
java-version: "17"
5150

5251
- name: Build Canary (iOS)
5352
run: build-support/build_canary.sh ios --no-codesign
@@ -88,7 +87,7 @@ jobs:
8887
- "any" # latest
8988
include:
9089
- channel: "stable"
91-
flutter-version: "3.10.1"
90+
flutter-version: "3.19.0"
9291
steps:
9392
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # 3.6.0
9493
with:
@@ -101,11 +100,10 @@ jobs:
101100
channel: ${{ matrix.channel }}
102101
flutter-version: ${{ matrix.flutter-version }}
103102

104-
# Flutter requires Java 11 to build android apps with Gradle.
105103
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # 3.12.0
106104
with:
107105
distribution: "corretto" # Amazon Corretto Build of OpenJDK
108-
java-version: "11"
106+
java-version: "17"
109107

110108
# Must be run before `fetch_backends` so that `pubspec.lock` is present.
111109
- name: Pub Upgrade
@@ -162,7 +160,7 @@ jobs:
162160
- "any" # latest
163161
include:
164162
- channel: "stable"
165-
flutter-version: "3.10.1"
163+
flutter-version: "3.19.0"
166164
ios-version:
167165
- "14.5"
168166
- "16"

.github/workflows/dart_dart2js.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
matrix:
2323
sdk:
2424
# Minimum supported Dart version
25-
- "3.0.1"
25+
- "3.3.0"
2626
- stable
2727
- beta
2828
browser:

.github/workflows/dart_ddc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
matrix:
2323
sdk:
2424
# Minimum supported Dart version
25-
- "3.0.1"
25+
- "3.3.0"
2626
- stable
2727
- beta
2828
browser:

.github/workflows/dart_vm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
sdk:
2323
# Minimum supported Dart version
24-
- "3.0.1"
24+
- "3.3.0"
2525
- stable
2626
- beta
2727
# Skips 'beta' tests on PRs

.github/workflows/e2e_android.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
persist-credentials: false
4242
submodules: true
4343

44-
# Flutter requires Java 11 to build android apps with Gradle.
4544
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # 3.12.0
4645
with:
4746
distribution: "corretto" # Amazon Corretto Build of OpenJDK

.github/workflows/flutter_android.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ jobs:
4949
cache: true
5050
channel: ${{ matrix.channel }}
5151

52+
- name: Setup Java
53+
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # 3.12.0
54+
with:
55+
distribution: "corretto" # Amazon Corretto Build of OpenJDK
56+
java-version: "17"
57+
5258
- name: Setup aft
5359
run: flutter pub global activate -spath packages/aft
5460

.github/workflows/flutter_vm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- "any" # latest
3131
include:
3232
- channel: "stable"
33-
flutter-version: "3.10.1"
33+
flutter-version: "3.19.0"
3434
# Skips 'beta' tests on PRs
3535
exclude:
3636
- channel: ${{ (github.event_name == 'pull_request') && 'beta' || 'NONE' }}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ When Amplify adds a new enumeration entry or sealed class subtype, we will publi
3838
Applications that use a `switch` statement to evaluate all members of an enumerated type can add a `default` clause to prevent
3939
new cases from causing compile warnings or errors.
4040

41+
#### Semantic versioning and dependencies update
42+
43+
We follow [semantic versioning for updating our dependencies](https://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api). This includes updating the dart and flutter SDK version.
44+
4145
## Category / Platform Support
4246

4347
| Category | Android | iOS | Web | Windows | MacOS | Linux |

actions/lib/src/node/child_process.dart

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ external ChildProcess get childProcess;
1818
extension type ChildProcess(JSObject it) {
1919
@JS('spawn')
2020
external NodeChildProcess _spawn(
21-
String command,
22-
JSArray args,
21+
String command,
22+
JSArray args,
2323
_ChildProcessOptions options,
2424
);
2525

2626
@JS('exec')
2727
external NodeChildProcess _exec(
2828
String command,
29-
_ChildProcessOptions options,
30-
[JSFunction callback,] // (error: Error, stdout: string, stderr: string) => void
31-
);
29+
_ChildProcessOptions options, [
30+
JSFunction callback,
31+
] // (error: Error, stdout: string, stderr: string) => void
32+
);
3233

3334
@JS('execSync')
3435
external JSUint8Array? _execSync(
@@ -48,7 +49,7 @@ extension type ChildProcess(JSObject it) {
4849
final completer = Completer<ProcessResult>();
4950
late NodeChildProcess child;
5051
child = _exec(
51-
<String>[command, ...args].join(' '),
52+
<String>[command, ...args].join(' '),
5253
_ChildProcessOptions(
5354
cwd: workingDirectory,
5455
env: <String, String?>{
@@ -87,8 +88,8 @@ extension type ChildProcess(JSObject it) {
8788
bool echoOutput = false,
8889
}) {
8990
try {
90-
final stdout = _execSync(
91-
<String>[command, ...args].join(' '),
91+
final stdout = _execSync(
92+
<String>[command, ...args].join(' '),
9293
_ChildProcessOptions(
9394
cwd: workingDirectory,
9495
env: <String, String?>{
@@ -105,14 +106,14 @@ extension type ChildProcess(JSObject it) {
105106
),
106107
);
107108
return ProcessResult(
108-
-1,
109-
0,
110-
stdout?.toDart ?? Uint8List(0),
109+
-1,
110+
0,
111+
stdout?.toDart ?? Uint8List(0),
111112
Uint8List(0),
112113
);
113114
} on Object catch (e) {
114115
final message = switch (e) {
115-
JSError _ => e.message,
116+
final JSError e => e.message,
116117
_ => e.toString(),
117118
};
118119
throw ProcessException(command, args, message);
@@ -135,10 +136,11 @@ extension type ChildProcess(JSObject it) {
135136
ProcessStartMode.detachedWithStdio => 'pipe',
136137
ProcessStartMode.inheritStdio => 'inherit',
137138
_ => unreachable,
138-
}.toJS;
139+
}
140+
.toJS;
139141
return _spawn(
140-
command,
141-
args.map((arg) => arg.toJS).toList().toJS,
142+
command,
143+
args.map((arg) => arg.toJS).toList().toJS,
142144
_ChildProcessOptions(
143145
cwd: workingDirectory,
144146
env: {
@@ -236,10 +238,10 @@ extension type EventEmitter._(JSObject it) implements JSObject {
236238
Future<T> once<T extends JSAny?>(String eventName) {
237239
final completer = Completer<T>();
238240
_once(
239-
eventName,
241+
eventName,
240242
// Callbacks may be called with 0-3 args. This will generate
241243
// stubs for each of the argument counts, mimicking a variadic
242-
// JS function.
244+
// JS function.
243245
//
244246
// We are really only concerned with the first, though.
245247
([JSAny? arg0, JSAny? arg1, JSAny? arg2]) {
@@ -253,5 +255,6 @@ extension type EventEmitter._(JSObject it) implements JSObject {
253255
@JS()
254256
@anonymous
255257
extension type NodeWriteableStream._(JSObject it) {
256-
external void write(JSUint8Array chunk, [String? encoding, JSFunction flushCallback]);
258+
external void write(JSUint8Array chunk,
259+
[String? encoding, JSFunction flushCallback]);
257260
}

actions/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 1.0.0
44
publish_to: none
55

66
environment:
7-
sdk: ^3.2.0-150.0.dev
7+
sdk: ^3.3.0
88

99
dependencies:
1010
aws_common: ^0.6.1

actions/test/node/common.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ void setupNodeTest() {
1818
final childProcess = require('node:child_process');
1919
final os = require('node:os');
2020

21-
globalContext['process'.toJS] = process;
22-
globalContext['fs'.toJS] = fs;
23-
globalContext['childProcess'.toJS] = childProcess;
24-
globalContext['os'.toJS] = os;
21+
globalContext['process'] = process;
22+
globalContext['fs'] = fs;
23+
globalContext['childProcess'] = childProcess;
24+
globalContext['os'] = os;
2525
}

build-support/build_canary.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ cp -r $ROOT_DIR/canaries/lib .
2424
cp $ROOT_DIR/build-support/dummy_amplifyconfiguration.dart lib/amplifyconfiguration.dart
2525

2626
# Android
27-
sed -i '' -e "s/ext.kotlin_version = .*/ext.kotlin_version = \"1.8.21\"/" ./android/build.gradle
27+
sed -i '' -e "s/ext.kotlin_version = .*/ext.kotlin_version = \"1.9.10\"/" ./android/build.gradle
2828
# TODO(khatruong2009): remove this line after the next stable release (3.22.0 or 4.0)
2929
sed -i '' -e "s/minSdkVersion .*/minSdkVersion 24/" ./android/app/build.gradle
3030
sed -i '' -e "s/minSdk .*/minSdk 24/" ./android/app/build.gradle
31-
sed -i '' -e "s/compileSdkVersion .*/compileSdkVersion 33/" ./android/app/build.gradle
31+
sed -i '' -e "s/compileSdk .*/compileSdk 33/" ./android/app/build.gradle
3232
cat ./android/app/build.gradle
3333
# iOS
3434
sed -i '' -e "s/# platform .*/platform :ios, '13.0'/" ./ios/Podfile

canaries/android/app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion flutter.compileSdkVersion
29+
namespace 'com.amazonaws.amplify.amplified_todo'
30+
compileSdk flutter.compileSdkVersion
3031
ndkVersion flutter.ndkVersion
3132

3233
compileOptions {

canaries/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.9.10'
33
repositories {
44
google()
55
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.4.2'
9+
classpath 'com.android.tools.build:gradle:8.1.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

canaries/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip

canaries/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: amplified_todo
22
publish_to: none
33

44
environment:
5-
sdk: ^3.0.0
6-
flutter: ">=3.10.0"
5+
sdk: ^3.3.0
6+
flutter: ^3.19.0
77

88
dependencies:
99
amplify_analytics_pinpoint: ^1.0.0

infra/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: infra
22
publish_to: none
33

44
environment:
5-
sdk: ^3.0.0
5+
sdk: ^3.3.0
66

77
dependencies:
88
amplify_core: any

packages/aft/lib/src/config/package_selector.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class _PackageSelector extends PackageSelector {
176176
@override
177177
Object? toJson() => {
178178
'include': _include.toJson(),
179-
if (_exclude != null) 'exclude': _exclude!.toJson(),
179+
if (_exclude != null) 'exclude': _exclude.toJson(),
180180
};
181181
}
182182

packages/aft/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 0.1.1
44
publish_to: none
55

66
environment:
7-
sdk: ^3.0.0
7+
sdk: ^3.3.0
88

99
dependencies:
1010
args: ^2.3.0

packages/amplify/amplify_flutter/example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify/amplify_flutter/example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify/amplify_flutter/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify/amplify_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)