Skip to content

Instantly share code, notes, and snippets.

@frantovar
Created March 21, 2022 11:59
Show Gist options
  • Save frantovar/bbd7e52ffc5093e30de9b0d6fe9b0717 to your computer and use it in GitHub Desktop.
Save frantovar/bbd7e52ffc5093e30de9b0d6fe9b0717 to your computer and use it in GitHub Desktop.
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment