Details:
- English (WIP) - https://medium.com/@askarsyzdykov/android-lib-with-flutter-module-a124ffcd758
- Russian - https://medium.com/@askarsyzdykov/build-native-android-library-with-a-flutter-dependency-a124ffcd758
Clone this project:
$ git clone https://github.com/askarsyzdykov/native_flutter_lib.git
Go to flutter_library folder:
$ cd flutter_library/
Get dependencies and compile Flutter module:
$ flutter pub get
$ flutter clean && flutter build aar
Make sure that library/build.gradle has uncommented line:
embed project(path: ":flutter", configuration: "default")
and this line commented:
// implementation project(path: ":flutter")
Note: If you want to run sample app from this project you must invert
implementation project(path: ":flutter")
// embed project(path: ":flutter", configuration: "default")
Compile native module:
$ cd ..
$ ./gradlew clean assemble
Done.