blob: f722ea8b5cacf6035b726a6fbaca8121d836228a [file] [log] [blame]
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file is included from `<app>/android/settings.gradle`,
// so it can be versioned with the Flutter SDK.
import groovy.json.JsonSlurper
def flutterProjectRoot = rootProject.projectDir.parentFile
// Note: if this logic is changed, also change the logic in module_plugin_loader.gradle.
def pluginsFile = new File(flutterProjectRoot, '.flutter-plugins-dependencies')
if (!pluginsFile.exists()) {
def object = new JsonSlurper().parseText(pluginsFile.text)
assert object instanceof Map
assert object.plugins instanceof Map
assert instanceof List
// Includes the Flutter plugins that support the Android platform. { androidPlugin ->
assert instanceof String
assert androidPlugin.path instanceof String
def pluginDirectory = new File(androidPlugin.path, 'android')
assert pluginDirectory.exists()
include ":${}"
project(":${}").projectDir = pluginDirectory