Skip to content

Commit 1999528

Browse files
committed
fix android plugin not found
1 parent fbc7269 commit 1999528

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

dargon2_flutter/dargon2_flutter/example/android/settings.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,17 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
99
def flutterSdkPath = properties.getProperty("flutter.sdk")
1010
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
1111
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12+
13+
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
14+
15+
def plugins = new Properties()
16+
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
17+
if (pluginsFile.exists()) {
18+
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
19+
}
20+
21+
plugins.each { name, path ->
22+
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
23+
include ":$name"
24+
project(":$name").projectDir = pluginDirectory
25+
}

0 commit comments

Comments
 (0)