blob: 35e02b888aa352fc67039e1304701c23d59b3b62 [file] [log] [blame] [edit]
// 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.
import groovy.json.JsonSlurper
// Configures the embedding dependencies.
ext.configureDependencies = { engineRootDir, add ->
def filesJson = new File(engineRootDir, 'tools/androidx/files.json')
if (!filesJson.exists()) {
throw new Exception("${filesJson.absolutePath} not found. Did you provide the wrong engine root directory to configureDependencies?")
}
def dependencies = new JsonSlurper().parseText(filesJson.text)
assert dependencies instanceof List
dependencies.each { dependency ->
assert dependency.maven_dependency instanceof String
add(dependency.maven_dependency)
}
}