Skip to content

Instantly share code, notes, and snippets.

@raikel
Created June 17, 2020 03:38
Show Gist options
  • Select an option

  • Save raikel/521657d29fd1f91c3df6dba806ae45cd to your computer and use it in GitHub Desktop.

Select an option

Save raikel/521657d29fd1f91c3df6dba806ae45cd to your computer and use it in GitHub Desktop.

Plugins

How to add an Android library to a plugin

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>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment