Unverified Commit 52e5a9a7 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Add a profile build type to the Android app template (with plugin support) (#22884)

This is required in order to support "flutter run --profile"
parent a02f9d50
......@@ -191,6 +191,13 @@ class FlutterPlugin implements Plugin<Project> {
compile pluginProject
}
}
pluginProject.afterEvaluate {
pluginProject.android.buildTypes {
profile {
initWith debug
}
}
}
pluginProject.afterEvaluate this.&addFlutterJarCompileOnlyDependency
} else {
project.logger.error("Plugin project :$name not found. Please update settings.gradle.")
......@@ -212,9 +219,11 @@ class FlutterPlugin implements Plugin<Project> {
} else {
if (project.getConfigurations().findByName("debugCompileOnly")) {
debugCompileOnly project.files(debugFlutterJar)
profileCompileOnly project.files(profileFlutterJar)
releaseCompileOnly project.files(releaseFlutterJar)
} else {
debugProvided project.files(debugFlutterJar)
profileProvided project.files(profileFlutterJar)
releaseProvided project.files(releaseFlutterJar)
}
}
......
......@@ -14,6 +14,9 @@ android {
}
buildTypes {
profile {
initWith debug
}
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment