Put the library files in a directory <plugin_root>/android/<lib_name>. Next, edit the file <plugin_root>/android/build.gradle:
dependencies {
...
implementation project(':<lib_name>')
....
}
On the flutter app that uses the project, edit the file <flutter_app_root>/android/settings.gradle
include ':<lib_name>'
project(':<lib_name>').projectDir = new File('<absolute_or_relative_path_to_lib_name>')