Skip to content

Commit

Permalink
feat: update plus plugins version (#4619)
Browse files Browse the repository at this point in the history
* update dart and flutter sdk version
* run dart fix
* update _plus plugin versions and fix the code for breaking changes
  • Loading branch information
NikaHsn committed Apr 17, 2024
1 parent 5323a81 commit 62c51a5
Show file tree
Hide file tree
Showing 223 changed files with 2,656 additions and 2,569 deletions.
999 changes: 505 additions & 494 deletions .github/composite_actions/launch_android_emulator/dist/main.cjs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

901 changes: 473 additions & 428 deletions .github/composite_actions/launch_ios_simulator/dist/main.cjs

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .github/composite_actions/launch_ios_simulator/dist/main.cjs.map

Large diffs are not rendered by default.

958 changes: 492 additions & 466 deletions .github/composite_actions/log_cw_metric/dist/main.cjs

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .github/composite_actions/log_cw_metric/dist/main.cjs.map

Large diffs are not rendered by default.

1,374 changes: 675 additions & 699 deletions .github/composite_actions/setup_chromedriver/dist/main.cjs

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .github/composite_actions/setup_chromedriver/dist/main.cjs.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/actions.yaml
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@e58aeb62aef51dcc4d0ba8eada7c08092aad5314 # main
with:
sdk: 3.2.0-150.0.dev
sdk: 3.3.0

- name: Setup pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # 2.4.0
Expand All @@ -57,7 +57,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@e58aeb62aef51dcc4d0ba8eada7c08092aad5314 # main
with:
sdk: 3.2.0-150.0.dev
sdk: 3.3.0

- name: Get Packages
working-directory: actions
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # 3.12.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "11"
java-version: "17"

- name: Test
timeout-minutes: 10
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/amplify_canaries.yaml
Expand Up @@ -31,7 +31,7 @@ jobs:
- "any" # latest
include:
- channel: "stable"
flutter-version: "3.10.1"
flutter-version: "3.19.0"
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # 3.6.0
with:
Expand All @@ -43,11 +43,10 @@ jobs:
channel: ${{ matrix.channel }}
flutter-version: ${{ matrix.flutter-version }}

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

- name: Build Canary (iOS)
run: build-support/build_canary.sh ios --no-codesign
Expand Down Expand Up @@ -88,7 +87,7 @@ jobs:
- "any" # latest
include:
- channel: "stable"
flutter-version: "3.10.1"
flutter-version: "3.19.0"
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # 3.6.0
with:
Expand All @@ -101,11 +100,10 @@ jobs:
channel: ${{ matrix.channel }}
flutter-version: ${{ matrix.flutter-version }}

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

# Must be run before `fetch_backends` so that `pubspec.lock` is present.
- name: Pub Upgrade
Expand Down Expand Up @@ -162,7 +160,7 @@ jobs:
- "any" # latest
include:
- channel: "stable"
flutter-version: "3.10.1"
flutter-version: "3.19.0"
ios-version:
- "14.5"
- "16"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dart_dart2js.yaml
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
sdk:
# Minimum supported Dart version
- "3.0.1"
- "3.3.0"
- stable
- beta
browser:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dart_ddc.yaml
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
sdk:
# Minimum supported Dart version
- "3.0.1"
- "3.3.0"
- stable
- beta
browser:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dart_vm.yaml
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
sdk:
# Minimum supported Dart version
- "3.0.1"
- "3.3.0"
- stable
- beta
# Skips 'beta' tests on PRs
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2e_android.yaml
Expand Up @@ -41,7 +41,6 @@ jobs:
persist-credentials: false
submodules: true

# Flutter requires Java 11 to build android apps with Gradle.
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # 3.12.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/flutter_android.yaml
Expand Up @@ -49,6 +49,12 @@ jobs:
cache: true
channel: ${{ matrix.channel }}

- name: Setup Java
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # 3.12.0
with:
distribution: "corretto" # Amazon Corretto Build of OpenJDK
java-version: "17"

- name: Setup aft
run: flutter pub global activate -spath packages/aft

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter_vm.yaml
Expand Up @@ -30,7 +30,7 @@ jobs:
- "any" # latest
include:
- channel: "stable"
flutter-version: "3.10.1"
flutter-version: "3.19.0"
# Skips 'beta' tests on PRs
exclude:
- channel: ${{ (github.event_name == 'pull_request') && 'beta' || 'NONE' }}
Expand Down
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -38,6 +38,10 @@ When Amplify adds a new enumeration entry or sealed class subtype, we will publi
Applications that use a `switch` statement to evaluate all members of an enumerated type can add a `default` clause to prevent
new cases from causing compile warnings or errors.

#### Semantic versioning and dependencies update

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.

## Category / Platform Support

| Category | Android | iOS | Web | Windows | MacOS | Linux |
Expand Down
39 changes: 21 additions & 18 deletions actions/lib/src/node/child_process.dart
Expand Up @@ -18,17 +18,18 @@ external ChildProcess get childProcess;
extension type ChildProcess(JSObject it) {
@JS('spawn')
external NodeChildProcess _spawn(
String command,
JSArray args,
String command,
JSArray args,
_ChildProcessOptions options,
);

@JS('exec')
external NodeChildProcess _exec(
String command,
_ChildProcessOptions options,
[JSFunction callback,] // (error: Error, stdout: string, stderr: string) => void
);
_ChildProcessOptions options, [
JSFunction callback,
] // (error: Error, stdout: string, stderr: string) => void
);

@JS('execSync')
external JSUint8Array? _execSync(
Expand All @@ -48,7 +49,7 @@ extension type ChildProcess(JSObject it) {
final completer = Completer<ProcessResult>();
late NodeChildProcess child;
child = _exec(
<String>[command, ...args].join(' '),
<String>[command, ...args].join(' '),
_ChildProcessOptions(
cwd: workingDirectory,
env: <String, String?>{
Expand Down Expand Up @@ -87,8 +88,8 @@ extension type ChildProcess(JSObject it) {
bool echoOutput = false,
}) {
try {
final stdout = _execSync(
<String>[command, ...args].join(' '),
final stdout = _execSync(
<String>[command, ...args].join(' '),
_ChildProcessOptions(
cwd: workingDirectory,
env: <String, String?>{
Expand All @@ -105,14 +106,14 @@ extension type ChildProcess(JSObject it) {
),
);
return ProcessResult(
-1,
0,
stdout?.toDart ?? Uint8List(0),
-1,
0,
stdout?.toDart ?? Uint8List(0),
Uint8List(0),
);
} on Object catch (e) {
final message = switch (e) {
JSError _ => e.message,
final JSError e => e.message,
_ => e.toString(),
};
throw ProcessException(command, args, message);
Expand All @@ -135,10 +136,11 @@ extension type ChildProcess(JSObject it) {
ProcessStartMode.detachedWithStdio => 'pipe',
ProcessStartMode.inheritStdio => 'inherit',
_ => unreachable,
}.toJS;
}
.toJS;
return _spawn(
command,
args.map((arg) => arg.toJS).toList().toJS,
command,
args.map((arg) => arg.toJS).toList().toJS,
_ChildProcessOptions(
cwd: workingDirectory,
env: {
Expand Down Expand Up @@ -236,10 +238,10 @@ extension type EventEmitter._(JSObject it) implements JSObject {
Future<T> once<T extends JSAny?>(String eventName) {
final completer = Completer<T>();
_once(
eventName,
eventName,
// Callbacks may be called with 0-3 args. This will generate
// stubs for each of the argument counts, mimicking a variadic
// JS function.
// JS function.
//
// We are really only concerned with the first, though.
([JSAny? arg0, JSAny? arg1, JSAny? arg2]) {
Expand All @@ -253,5 +255,6 @@ extension type EventEmitter._(JSObject it) implements JSObject {
@JS()
@anonymous
extension type NodeWriteableStream._(JSObject it) {
external void write(JSUint8Array chunk, [String? encoding, JSFunction flushCallback]);
external void write(JSUint8Array chunk,
[String? encoding, JSFunction flushCallback]);
}
2 changes: 1 addition & 1 deletion actions/pubspec.yaml
Expand Up @@ -4,7 +4,7 @@ version: 1.0.0
publish_to: none

environment:
sdk: ^3.2.0-150.0.dev
sdk: ^3.3.0

dependencies:
aws_common: ^0.6.1
Expand Down
8 changes: 4 additions & 4 deletions actions/test/node/common.dart
Expand Up @@ -18,8 +18,8 @@ void setupNodeTest() {
final childProcess = require('node:child_process');
final os = require('node:os');

globalContext['process'.toJS] = process;
globalContext['fs'.toJS] = fs;
globalContext['childProcess'.toJS] = childProcess;
globalContext['os'.toJS] = os;
globalContext['process'] = process;
globalContext['fs'] = fs;
globalContext['childProcess'] = childProcess;
globalContext['os'] = os;
}
4 changes: 2 additions & 2 deletions build-support/build_canary.sh
Expand Up @@ -24,11 +24,11 @@ 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/ext.kotlin_version = .*/ext.kotlin_version = \"1.9.10\"/" ./android/build.gradle
# TODO(khatruong2009): remove this line after the next stable release (3.22.0 or 4.0)
sed -i '' -e "s/minSdkVersion .*/minSdkVersion 24/" ./android/app/build.gradle
sed -i '' -e "s/minSdk .*/minSdk 24/" ./android/app/build.gradle
sed -i '' -e "s/compileSdkVersion .*/compileSdkVersion 33/" ./android/app/build.gradle
sed -i '' -e "s/compileSdk .*/compileSdk 33/" ./android/app/build.gradle
cat ./android/app/build.gradle
# iOS
sed -i '' -e "s/# platform .*/platform :ios, '13.0'/" ./ios/Podfile
Expand Down
3 changes: 2 additions & 1 deletion canaries/android/app/build.gradle
Expand Up @@ -26,7 +26,8 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
namespace 'com.amazonaws.amplify.amplified_todo'
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand Down
4 changes: 2 additions & 2 deletions canaries/android/build.gradle
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion canaries/android/gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
4 changes: 2 additions & 2 deletions canaries/pubspec.yaml
Expand Up @@ -2,8 +2,8 @@ name: amplified_todo
publish_to: none

environment:
sdk: ^3.0.0
flutter: ">=3.10.0"
sdk: ^3.3.0
flutter: ^3.19.0

dependencies:
amplify_analytics_pinpoint: ^1.0.0
Expand Down
2 changes: 1 addition & 1 deletion infra/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: infra
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
amplify_core: any
Expand Down
2 changes: 1 addition & 1 deletion packages/aft/lib/src/config/package_selector.dart
Expand Up @@ -176,7 +176,7 @@ class _PackageSelector extends PackageSelector {
@override
Object? toJson() => {
'include': _include.toJson(),
if (_exclude != null) 'exclude': _exclude!.toJson(),
if (_exclude != null) 'exclude': _exclude.toJson(),
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/aft/pubspec.yaml
Expand Up @@ -4,7 +4,7 @@ version: 0.1.1
publish_to: none

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
args: ^2.3.0
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/amplify/amplify_flutter/example/android/build.gradle

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 62c51a5

Please sign in to comment.