Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Emmanuel Garcia
committed
Sep 17, 2019
1 parent
df4bf45
commit 8a1bf5b
Showing
19 changed files
with
673 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright 2019 The Chromium 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 script is used to warm the Gradle cache by downloading the Flutter dependencies | ||
// used during the build. This script is invoked when `flutter precache` is run. | ||
// | ||
// Command: | ||
// gradle -b <flutter-sdk>packages/flutter_tools/gradle/resolve_dependencies.gradle | ||
// resolveDependencies | ||
// | ||
// This way, Gradle can run with the `--offline` flag later on to eliminate any | ||
// network request during the build process. | ||
// | ||
// This includes: | ||
// 1. The embedding | ||
// 2. libflutter.so | ||
|
||
import java.nio.file.Paths | ||
|
||
repositories { | ||
google() | ||
jcenter() | ||
maven { | ||
url "http://download.flutter.io" | ||
} | ||
} | ||
|
||
File flutterRoot = projectDir.parentFile.parentFile.parentFile | ||
|
||
assert flutterRoot.isDirectory() | ||
String engineVersion = Paths.get(flutterRoot.absolutePath, "bin", "internal", "engine.version") | ||
.toFile().text.trim() | ||
|
||
configurations { | ||
flutterRelease.extendsFrom releaseImplementation | ||
flutterDebug.extendsFrom debugImplementation | ||
flutterProfile.extendsFrom debugImplementation | ||
} | ||
|
||
dependencies { | ||
flutterRelease "io.flutter:flutter_embedding_release:1.0.0-$engineVersion" | ||
flutterRelease "io.flutter:armeabi_v7a_release:1.0.0-$engineVersion" | ||
flutterRelease "io.flutter:arm64_v8a_release:1.0.0-$engineVersion" | ||
|
||
flutterProfile "io.flutter:flutter_embedding_profile:1.0.0-$engineVersion" | ||
flutterProfile "io.flutter:armeabi_v7a_profile:1.0.0-$engineVersion" | ||
flutterProfile "io.flutter:arm64_v8a_profile:1.0.0-$engineVersion" | ||
|
||
flutterDebug "io.flutter:flutter_embedding_debug:1.0.0-$engineVersion" | ||
flutterDebug "io.flutter:armeabi_v7a_debug:1.0.0-$engineVersion" | ||
flutterDebug "io.flutter:arm64_v8a_debug:1.0.0-$engineVersion" | ||
flutterDebug "io.flutter:x86_debug:1.0.0-$engineVersion" | ||
flutterDebug "io.flutter:x86_64_debug:1.0.0-$engineVersion" | ||
} | ||
|
||
task resolveDependencies { | ||
configurations.each { configuration -> | ||
if (configuration.name.startsWith("flutter")) { | ||
configuration.resolve() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.