Unverified Commit 1b429bdb authored by Emmanuel Garcia's avatar Emmanuel Garcia Committed by GitHub

Fix type mismatch in Gradle (#39747)

parent cc9b614e
...@@ -273,8 +273,15 @@ class FlutterPlugin implements Plugin<Project> { ...@@ -273,8 +273,15 @@ class FlutterPlugin implements Plugin<Project> {
Closure addEmbeddingCompileOnlyDependency = { buildType -> Closure addEmbeddingCompileOnlyDependency = { buildType ->
String flutterBuildMode = buildModeFor(buildType) String flutterBuildMode = buildModeFor(buildType)
// Add the embedding as a compile only dependency to the plugin. // Add the embedding as a compile only dependency to the plugin.
addFlutterJarCompileOnlyDependency(pluginProject, buildType.name, def dependency;
flutterJar ?: "io.flutter:flutter_embedding_$flutterBuildMode:1.0.0-$engineVersion") if (flutterJar) {
dependency = project.files {
flutterJar
}
} else {
dependency = "io.flutter:flutter_embedding_$flutterBuildMode:1.0.0-$engineVersion"
}
addCompileOnlyDependency(pluginProject, buildType.name, dependency)
} }
pluginProject.afterEvaluate { pluginProject.afterEvaluate {
pluginProject.android.buildTypes { pluginProject.android.buildTypes {
...@@ -445,7 +452,7 @@ class FlutterPlugin implements Plugin<Project> { ...@@ -445,7 +452,7 @@ class FlutterPlugin implements Plugin<Project> {
return System.getProperty('build-plugins-as-aars') == 'true' return System.getProperty('build-plugins-as-aars') == 'true'
} }
private void addFlutterJarCompileOnlyDependency(Project project, String variantName, Object dependency) { private void addCompileOnlyDependency(Project project, String variantName, Object dependency) {
if (project.state.failure) { if (project.state.failure) {
return return
} }
......
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