sarbagyastha

update example to use android v2 embedding

1 -*.iml  
2 -*.class  
3 -.gradle 1 +gradle-wrapper.jar
  2 +/.gradle
  3 +/captures/
  4 +/gradlew
  5 +/gradlew.bat
4 /local.properties 6 /local.properties
5 -/.idea/workspace.xml  
6 -/.idea/libraries  
7 -.DS_Store  
8 -/build  
9 -/captures  
10 GeneratedPluginRegistrant.java 7 GeneratedPluginRegistrant.java
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<projectDescription>  
3 - <name>android</name>  
4 - <comment>Project android created by Buildship.</comment>  
5 - <projects>  
6 - </projects>  
7 - <buildSpec>  
8 - <buildCommand>  
9 - <name>org.eclipse.buildship.core.gradleprojectbuilder</name>  
10 - <arguments>  
11 - </arguments>  
12 - </buildCommand>  
13 - </buildSpec>  
14 - <natures>  
15 - <nature>org.eclipse.buildship.core.gradleprojectnature</nature>  
16 - </natures>  
17 -</projectDescription>  
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<classpath>  
3 - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>  
4 - <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>  
5 - <classpathentry kind="output" path="bin/default"/>  
6 -</classpath>  
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<projectDescription>  
3 - <name>app</name>  
4 - <comment>Project app created by Buildship.</comment>  
5 - <projects>  
6 - </projects>  
7 - <buildSpec>  
8 - <buildCommand>  
9 - <name>org.eclipse.jdt.core.javabuilder</name>  
10 - <arguments>  
11 - </arguments>  
12 - </buildCommand>  
13 - <buildCommand>  
14 - <name>org.eclipse.buildship.core.gradleprojectbuilder</name>  
15 - <arguments>  
16 - </arguments>  
17 - </buildCommand>  
18 - </buildSpec>  
19 - <natures>  
20 - <nature>org.eclipse.jdt.core.javanature</nature>  
21 - <nature>org.eclipse.buildship.core.gradleprojectnature</nature>  
22 - </natures>  
23 -</projectDescription>  
@@ -22,11 +22,16 @@ if (flutterVersionName == null) { @@ -22,11 +22,16 @@ if (flutterVersionName == null) {
22 } 22 }
23 23
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
  25 +apply plugin: 'kotlin-android'
25 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 27
27 android { 28 android {
28 compileSdkVersion 28 29 compileSdkVersion 28
29 30
  31 + sourceSets {
  32 + main.java.srcDirs += 'src/main/kotlin'
  33 + }
  34 +
30 lintOptions { 35 lintOptions {
31 disable 'InvalidPackage' 36 disable 'InvalidPackage'
32 } 37 }
@@ -38,7 +43,6 @@ android { @@ -38,7 +43,6 @@ android {
38 targetSdkVersion 28 43 targetSdkVersion 28
39 versionCode flutterVersionCode.toInteger() 44 versionCode flutterVersionCode.toInteger()
40 versionName flutterVersionName 45 versionName flutterVersionName
41 - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"  
42 } 46 }
43 47
44 buildTypes { 48 buildTypes {
@@ -55,7 +59,5 @@ flutter { @@ -55,7 +59,5 @@ flutter {
55 } 59 }
56 60
57 dependencies { 61 dependencies {
58 - testImplementation 'junit:junit:4.12'  
59 - androidTestImplementation 'com.android.support.test:runner:1.0.2'  
60 - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 62 + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
61 } 63 }
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="li.zhuoyuan.example">
  3 + <!-- Flutter needs it to communicate with the running application
  4 + to allow setting breakpoints, to provide hot reload, etc.
  5 + -->
  6 + <uses-permission android:name="android.permission.INTERNET"/>
  7 +</manifest>
1 <manifest xmlns:android="http://schemas.android.com/apk/res/android" 1 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2 package="li.zhuoyuan.example"> 2 package="li.zhuoyuan.example">
3 -  
4 - <!-- The INTERNET permission is required for development. Specifically,  
5 - flutter needs it to communicate with the running application  
6 - to allow setting breakpoints, to provide hot reload, etc.  
7 - -->  
8 - <uses-permission android:name="android.permission.INTERNET"/>  
9 -  
10 <!-- io.flutter.app.FlutterApplication is an android.app.Application that 3 <!-- io.flutter.app.FlutterApplication is an android.app.Application that
11 calls FlutterMain.startInitialization(this); in its onCreate method. 4 calls FlutterMain.startInitialization(this); in its onCreate method.
12 In most cases you can leave this as-is, but you if you want to provide 5 In most cases you can leave this as-is, but you if you want to provide
@@ -20,20 +13,35 @@ @@ -20,20 +13,35 @@
20 android:name=".MainActivity" 13 android:name=".MainActivity"
21 android:launchMode="singleTop" 14 android:launchMode="singleTop"
22 android:theme="@style/LaunchTheme" 15 android:theme="@style/LaunchTheme"
23 - android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" 16 + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
24 android:hardwareAccelerated="true" 17 android:hardwareAccelerated="true"
25 android:windowSoftInputMode="adjustResize"> 18 android:windowSoftInputMode="adjustResize">
26 - <!-- This keeps the window background of the activity showing  
27 - until Flutter renders its first frame. It can be removed if  
28 - there is no splash screen (such as the default splash screen  
29 - defined in @style/LaunchTheme). --> 19 + <!-- Specifies an Android theme to apply to this Activity as soon as
  20 + the Android process has started. This theme is visible to the user
  21 + while the Flutter UI initializes. After that, this theme continues
  22 + to determine the Window background behind the Flutter UI. -->
30 <meta-data 23 <meta-data
31 - android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"  
32 - android:value="true" /> 24 + android:name="io.flutter.embedding.android.NormalTheme"
  25 + android:resource="@style/NormalTheme"
  26 + />
  27 + <!-- Displays an Android View that continues showing the launch screen
  28 + Drawable until Flutter paints its first frame, then this splash
  29 + screen fades out. A splash screen is useful to avoid any visual
  30 + gap between the end of Android's launch screen and the painting of
  31 + Flutter's first frame. -->
  32 + <meta-data
  33 + android:name="io.flutter.embedding.android.SplashScreenDrawable"
  34 + android:resource="@drawable/launch_background"
  35 + />
33 <intent-filter> 36 <intent-filter>
34 <action android:name="android.intent.action.MAIN"/> 37 <action android:name="android.intent.action.MAIN"/>
35 <category android:name="android.intent.category.LAUNCHER"/> 38 <category android:name="android.intent.category.LAUNCHER"/>
36 </intent-filter> 39 </intent-filter>
37 </activity> 40 </activity>
  41 + <!-- Don't delete the meta-data below.
  42 + This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
  43 + <meta-data
  44 + android:name="flutterEmbedding"
  45 + android:value="2" />
38 </application> 46 </application>
39 </manifest> 47 </manifest>
1 -package li.zhuoyuan.example;  
2 -  
3 -import android.os.Bundle;  
4 -import io.flutter.app.FlutterActivity;  
5 -import io.flutter.plugins.GeneratedPluginRegistrant;  
6 -  
7 -public class MainActivity extends FlutterActivity {  
8 - @Override  
9 - protected void onCreate(Bundle savedInstanceState) {  
10 - super.onCreate(savedInstanceState);  
11 - GeneratedPluginRegistrant.registerWith(this);  
12 - }  
13 -}  
  1 +package li.zhuoyuan.example
  2 +
  3 +import io.flutter.embedding.android.FlutterActivity
  4 +
  5 +class MainActivity: FlutterActivity() {
  6 +}
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <resources> 2 <resources>
  3 + <!-- Theme applied to the Android Window while the process is starting -->
3 <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> 4 <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
4 <!-- Show a splash screen on the activity. Automatically removed when 5 <!-- Show a splash screen on the activity. Automatically removed when
5 Flutter draws its first frame --> 6 Flutter draws its first frame -->
6 <item name="android:windowBackground">@drawable/launch_background</item> 7 <item name="android:windowBackground">@drawable/launch_background</item>
7 </style> 8 </style>
  9 + <!-- Theme applied to the Android Window as soon as the process has started.
  10 + This theme determines the color of the Android Window while your
  11 + Flutter UI initializes, as well as behind your Flutter UI while its
  12 + running.
  13 +
  14 + This Theme is only used starting with V2 of Flutter's Android embedding. -->
  15 + <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
  16 + <item name="android:windowBackground">@android:color/white</item>
  17 + </style>
8 </resources> 18 </resources>
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="li.zhuoyuan.example">
  3 + <!-- Flutter needs it to communicate with the running application
  4 + to allow setting breakpoints, to provide hot reload, etc.
  5 + -->
  6 + <uses-permission android:name="android.permission.INTERNET"/>
  7 +</manifest>
1 buildscript { 1 buildscript {
  2 + ext.kotlin_version = '1.3.50'
2 repositories { 3 repositories {
3 google() 4 google()
4 jcenter() 5 jcenter()
5 - maven { url "http://download.flutter.io" }  
6 } 6 }
7 7
8 dependencies { 8 dependencies {
9 - classpath 'com.android.tools.build:gradle:3.1.2' 9 + classpath 'com.android.tools.build:gradle:3.5.0'
  10 + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10 } 11 }
11 } 12 }
12 13
@@ -14,7 +15,6 @@ allprojects { @@ -14,7 +15,6 @@ allprojects {
14 repositories { 15 repositories {
15 google() 16 google()
16 jcenter() 17 jcenter()
17 - maven { url "http://download.flutter.io" }  
18 } 18 }
19 } 19 }
20 20
1 org.gradle.jvmargs=-Xmx1536M 1 org.gradle.jvmargs=-Xmx1536M
2 android.enableR8=true 2 android.enableR8=true
3 android.useAndroidX=true 3 android.useAndroidX=true
4 -android.enableJetifier=true  
  4 +android.enableJetifier=true
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3 distributionPath=wrapper/dists 3 distributionPath=wrapper/dists
4 zipStoreBase=GRADLE_USER_HOME 4 zipStoreBase=GRADLE_USER_HOME
5 zipStorePath=wrapper/dists 5 zipStorePath=wrapper/dists
6 -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 6 +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
1 -#!/usr/bin/env bash  
2 -  
3 -##############################################################################  
4 -##  
5 -## Gradle start up script for UN*X  
6 -##  
7 -##############################################################################  
8 -  
9 -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.  
10 -DEFAULT_JVM_OPTS=""  
11 -  
12 -APP_NAME="Gradle"  
13 -APP_BASE_NAME=`basename "$0"`  
14 -  
15 -# Use the maximum available, or set MAX_FD != -1 to use that value.  
16 -MAX_FD="maximum"  
17 -  
18 -warn ( ) {  
19 - echo "$*"  
20 -}  
21 -  
22 -die ( ) {  
23 - echo  
24 - echo "$*"  
25 - echo  
26 - exit 1  
27 -}  
28 -  
29 -# OS specific support (must be 'true' or 'false').  
30 -cygwin=false  
31 -msys=false  
32 -darwin=false  
33 -case "`uname`" in  
34 - CYGWIN* )  
35 - cygwin=true  
36 - ;;  
37 - Darwin* )  
38 - darwin=true  
39 - ;;  
40 - MINGW* )  
41 - msys=true  
42 - ;;  
43 -esac  
44 -  
45 -# Attempt to set APP_HOME  
46 -# Resolve links: $0 may be a link  
47 -PRG="$0"  
48 -# Need this for relative symlinks.  
49 -while [ -h "$PRG" ] ; do  
50 - ls=`ls -ld "$PRG"`  
51 - link=`expr "$ls" : '.*-> \(.*\)$'`  
52 - if expr "$link" : '/.*' > /dev/null; then  
53 - PRG="$link"  
54 - else  
55 - PRG=`dirname "$PRG"`"/$link"  
56 - fi  
57 -done  
58 -SAVED="`pwd`"  
59 -cd "`dirname \"$PRG\"`/" >/dev/null  
60 -APP_HOME="`pwd -P`"  
61 -cd "$SAVED" >/dev/null  
62 -  
63 -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar  
64 -  
65 -# Determine the Java command to use to start the JVM.  
66 -if [ -n "$JAVA_HOME" ] ; then  
67 - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then  
68 - # IBM's JDK on AIX uses strange locations for the executables  
69 - JAVACMD="$JAVA_HOME/jre/sh/java"  
70 - else  
71 - JAVACMD="$JAVA_HOME/bin/java"  
72 - fi  
73 - if [ ! -x "$JAVACMD" ] ; then  
74 - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME  
75 -  
76 -Please set the JAVA_HOME variable in your environment to match the  
77 -location of your Java installation."  
78 - fi  
79 -else  
80 - JAVACMD="java"  
81 - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.  
82 -  
83 -Please set the JAVA_HOME variable in your environment to match the  
84 -location of your Java installation."  
85 -fi  
86 -  
87 -# Increase the maximum file descriptors if we can.  
88 -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then  
89 - MAX_FD_LIMIT=`ulimit -H -n`  
90 - if [ $? -eq 0 ] ; then  
91 - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then  
92 - MAX_FD="$MAX_FD_LIMIT"  
93 - fi  
94 - ulimit -n $MAX_FD  
95 - if [ $? -ne 0 ] ; then  
96 - warn "Could not set maximum file descriptor limit: $MAX_FD"  
97 - fi  
98 - else  
99 - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"  
100 - fi  
101 -fi  
102 -  
103 -# For Darwin, add options to specify how the application appears in the dock  
104 -if $darwin; then  
105 - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""  
106 -fi  
107 -  
108 -# For Cygwin, switch paths to Windows format before running java  
109 -if $cygwin ; then  
110 - APP_HOME=`cygpath --path --mixed "$APP_HOME"`  
111 - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`  
112 - JAVACMD=`cygpath --unix "$JAVACMD"`  
113 -  
114 - # We build the pattern for arguments to be converted via cygpath  
115 - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`  
116 - SEP=""  
117 - for dir in $ROOTDIRSRAW ; do  
118 - ROOTDIRS="$ROOTDIRS$SEP$dir"  
119 - SEP="|"  
120 - done  
121 - OURCYGPATTERN="(^($ROOTDIRS))"  
122 - # Add a user-defined pattern to the cygpath arguments  
123 - if [ "$GRADLE_CYGPATTERN" != "" ] ; then  
124 - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"  
125 - fi  
126 - # Now convert the arguments - kludge to limit ourselves to /bin/sh  
127 - i=0  
128 - for arg in "$@" ; do  
129 - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`  
130 - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option  
131 -  
132 - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition  
133 - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`  
134 - else  
135 - eval `echo args$i`="\"$arg\""  
136 - fi  
137 - i=$((i+1))  
138 - done  
139 - case $i in  
140 - (0) set -- ;;  
141 - (1) set -- "$args0" ;;  
142 - (2) set -- "$args0" "$args1" ;;  
143 - (3) set -- "$args0" "$args1" "$args2" ;;  
144 - (4) set -- "$args0" "$args1" "$args2" "$args3" ;;  
145 - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;  
146 - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;  
147 - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;  
148 - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;  
149 - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;  
150 - esac  
151 -fi  
152 -  
153 -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules  
154 -function splitJvmOpts() {  
155 - JVM_OPTS=("$@")  
156 -}  
157 -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS  
158 -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"  
159 -  
160 -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"  
1 -@if "%DEBUG%" == "" @echo off  
2 -@rem ##########################################################################  
3 -@rem  
4 -@rem Gradle startup script for Windows  
5 -@rem  
6 -@rem ##########################################################################  
7 -  
8 -@rem Set local scope for the variables with windows NT shell  
9 -if "%OS%"=="Windows_NT" setlocal  
10 -  
11 -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.  
12 -set DEFAULT_JVM_OPTS=  
13 -  
14 -set DIRNAME=%~dp0  
15 -if "%DIRNAME%" == "" set DIRNAME=.  
16 -set APP_BASE_NAME=%~n0  
17 -set APP_HOME=%DIRNAME%  
18 -  
19 -@rem Find java.exe  
20 -if defined JAVA_HOME goto findJavaFromJavaHome  
21 -  
22 -set JAVA_EXE=java.exe  
23 -%JAVA_EXE% -version >NUL 2>&1  
24 -if "%ERRORLEVEL%" == "0" goto init  
25 -  
26 -echo.  
27 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.  
28 -echo.  
29 -echo Please set the JAVA_HOME variable in your environment to match the  
30 -echo location of your Java installation.  
31 -  
32 -goto fail  
33 -  
34 -:findJavaFromJavaHome  
35 -set JAVA_HOME=%JAVA_HOME:"=%  
36 -set JAVA_EXE=%JAVA_HOME%/bin/java.exe  
37 -  
38 -if exist "%JAVA_EXE%" goto init  
39 -  
40 -echo.  
41 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%  
42 -echo.  
43 -echo Please set the JAVA_HOME variable in your environment to match the  
44 -echo location of your Java installation.  
45 -  
46 -goto fail  
47 -  
48 -:init  
49 -@rem Get command-line arguments, handling Windowz variants  
50 -  
51 -if not "%OS%" == "Windows_NT" goto win9xME_args  
52 -if "%@eval[2+2]" == "4" goto 4NT_args  
53 -  
54 -:win9xME_args  
55 -@rem Slurp the command line arguments.  
56 -set CMD_LINE_ARGS=  
57 -set _SKIP=2  
58 -  
59 -:win9xME_args_slurp  
60 -if "x%~1" == "x" goto execute  
61 -  
62 -set CMD_LINE_ARGS=%*  
63 -goto execute  
64 -  
65 -:4NT_args  
66 -@rem Get arguments from the 4NT Shell from JP Software  
67 -set CMD_LINE_ARGS=%$  
68 -  
69 -:execute  
70 -@rem Setup the command line  
71 -  
72 -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar  
73 -  
74 -@rem Execute Gradle  
75 -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%  
76 -  
77 -:end  
78 -@rem End local scope for the variables with windows NT shell  
79 -if "%ERRORLEVEL%"=="0" goto mainEnd  
80 -  
81 -:fail  
82 -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of  
83 -rem the _cmd.exe /c_ return code!  
84 -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1  
85 -exit /b 1  
86 -  
87 -:mainEnd  
88 -if "%OS%"=="Windows_NT" endlocal  
89 -  
90 -:omega  
  1 +// Copyright 2014 The Flutter Authors. All rights reserved.
  2 +// Use of this source code is governed by a BSD-style license that can be
  3 +// found in the LICENSE file.
  4 +
1 include ':app' 5 include ':app'
2 6
3 -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 7 +def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
  8 +def properties = new Properties()
4 9
5 -def plugins = new Properties()  
6 -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')  
7 -if (pluginsFile.exists()) {  
8 - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }  
9 -} 10 +assert localPropertiesFile.exists()
  11 +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
10 12
11 -plugins.each { name, path ->  
12 - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()  
13 - include ":$name"  
14 - project(":$name").projectDir = pluginDirectory  
15 -} 13 +def flutterSdkPath = properties.getProperty("flutter.sdk")
  14 +assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
  15 +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"