mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
- **bump template version, update migration code to handle api 21-23 and expand it to cover multiple min api level definitions** - **bump add to app project to minimum api level 24** - **PathUtilsTest converted to using config, removed test code that branched on versions older than 24** - **Update additional build.gradle files to have minsdk 24 and documenation** Related to #170807 G3 cls - espresso https://critique.corp.google.com/cl/776592881 - integration tests cl/778034198 - removal of pre api 23 samples tests cl/777652802 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
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.addPlugin('google_maps_flutter:^2.12.1');
|
|
|
|
await inDirectory(flutterProject.rootPath, () async {
|
|
await flutter(
|
|
'build',
|
|
options: <String>['apk', '--debug', '--target-platform=android-arm64'],
|
|
);
|
|
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 android.view.View getView()',
|
|
'io.flutter.plugins.googlemaps.GoogleMapController void dispose()',
|
|
]);
|
|
});
|
|
});
|
|
return TaskResult.success(null);
|
|
} on TaskResult catch (taskResult) {
|
|
return taskResult;
|
|
} catch (e, stackTrace) {
|
|
print('Task exception stack trace:\n$stackTrace');
|
|
return TaskResult.failure(e.toString());
|
|
}
|
|
});
|
|
}
|