/native_flutter_lib

Native Android library with dependency of Flutter module

Primary LanguageKotlin

Native Android library (aar) with dependency of Flutter module

Details:

To compile aar follow run the commands below:

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.

Aar is ready to be used 🎉 It is located in library/build/outputs/aar/