diff --git a/packages/flutter_tools/gradle/flutter.gradle b/packages/flutter_tools/gradle/flutter.gradle index 7d58d8e158..a2799c0c58 100644 --- a/packages/flutter_tools/gradle/flutter.gradle +++ b/packages/flutter_tools/gradle/flutter.gradle @@ -191,6 +191,13 @@ class FlutterPlugin implements Plugin { 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 { } 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) } } diff --git a/packages/flutter_tools/templates/application/android/host_app_common/app.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/application/android/host_app_common/app.tmpl/build.gradle.tmpl index 3eb860c4cd..4346c046a0 100644 --- a/packages/flutter_tools/templates/application/android/host_app_common/app.tmpl/build.gradle.tmpl +++ b/packages/flutter_tools/templates/application/android/host_app_common/app.tmpl/build.gradle.tmpl @@ -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.