mirror of
https://github.com/flutter/flutter
synced 2024-08-25 11:07:06 +00:00
![Siva](/assets/img/avatar_default.png)
* Roll Flutter Engine from 67254d6e4b03 to 8d83b98c55b3 * Roll Dart SDK from 35a9facce191 to e517487c5679 (Dart 3.0) (#38105) * Bump SDK versions. * Bump Dart SDK version constraints * Update shrine package to 2.0.1 (null safe version) * Fix more tests. * Include patches from Jason for min android sdk version * Fix analyzer warning
46 lines
1.7 KiB
Dart
46 lines
1.7 KiB
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'dart:io';
|
|
|
|
import 'package:flutter_devicelab/framework/apk_utils.dart';
|
|
import 'package:flutter_devicelab/framework/framework.dart';
|
|
import 'package:flutter_devicelab/framework/task_result.dart';
|
|
import 'package:flutter_devicelab/framework/utils.dart';
|
|
|
|
|
|
Future<void> main() async {
|
|
await task(() async {
|
|
try {
|
|
await runProjectTest((FlutterProject flutterProject) async {
|
|
section('APK contains plugin classes');
|
|
await flutterProject.setMinSdkVersion(20);
|
|
flutterProject.addPlugin('google_maps_flutter', value: '^2.2.1');
|
|
|
|
await inDirectory(flutterProject.rootPath, () async {
|
|
await flutter('build', options: <String>[
|
|
'apk',
|
|
'--debug',
|
|
'--target-platform=android-arm',
|
|
]);
|
|
final File apk = File('${flutterProject.rootPath}/build/app/outputs/flutter-apk/app-debug.apk');
|
|
if (!apk.existsSync()) {
|
|
throw TaskResult.failure("Expected ${apk.path} to exist, but it doesn't");
|
|
}
|
|
// https://github.com/flutter/flutter/issues/72185
|
|
await checkApkContainsMethods(apk, <String>[
|
|
'io.flutter.plugins.googlemaps.GoogleMapController void onFlutterViewAttached(android.view.View)',
|
|
'io.flutter.plugins.googlemaps.GoogleMapController void onFlutterViewDetached()',
|
|
]);
|
|
});
|
|
});
|
|
return TaskResult.success(null);
|
|
} on TaskResult catch (taskResult) {
|
|
return taskResult;
|
|
} catch (e) {
|
|
return TaskResult.failure(e.toString());
|
|
}
|
|
});
|
|
}
|