mirror of
https://github.com/flutter/flutter
synced 2024-08-25 11:07:06 +00:00
![Daco Harkes](/assets/img/avatar_default.png)
Support for FFI calls with `@Native external` functions through Native assets on Android. This enables bundling native code without any build-system boilerplate code. For more info see: * https://github.com/flutter/flutter/issues/129757 ### Implementation details for Android. Mainly follows the design of the previous PRs. For Android, we detect the compilers inside the NDK inside SDK. And bundling of the assets is done by the flutter.groovy file. The `minSdkVersion` is propagated from the flutter.groovy file as well. The NDK is not part of `flutter doctor`, and users can omit it if no native assets have to be build. However, if any native assets must be built, flutter throws a tool exit if the NDK is not installed. Add 2 app is not part of this PR yet, instead `flutter build aar` will tool exit if there are any native assets.
15 lines
510 B
Dart
15 lines
510 B
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 'package:flutter_devicelab/framework/devices.dart';
|
|
import 'package:flutter_devicelab/framework/framework.dart';
|
|
import 'package:flutter_devicelab/tasks/native_assets_test.dart';
|
|
|
|
Future<void> main() async {
|
|
await task(() async {
|
|
deviceOperatingSystem = DeviceOperatingSystem.android;
|
|
return createNativeAssetsTest()();
|
|
});
|
|
}
|