title: implement a java local library to flutter plugin template
body: <p>i'm trying to add a local library to a flutter plugin project.
  the library is created directly in the root folder of the flutter project (not in the android folder)
  So here is the structure:
  MyFlutterProject:</p>
  
  <pre><code>_ lib
     __ flutterPlugin.dart
  _ MyLibrary   
     __ build.gradle
     __ setting.gradle
     __ src
     __ ...
  _ Android
     __ build.gradle
     __ ...
  [...]
  </code></pre>
  
  <p>This is my [android] build.gradle file:</p>
  
  <pre><code>group 'org.example.myproject'
  version '1.0'
  
  buildscript {
      repositories {
          google()
          jcenter()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:3.5.0'
      }
  }
  
  rootProject.allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 28
  
      defaultConfig {
          minSdkVersion 16
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
      lintOptions {
          disable 'InvalidPackage'
      }
  }
  
  dependencies {
      implementation project(':myviewer')
  }
  </code></pre>
  
  <p>And this is my [android] setting.gradle file:</p>
  
  <pre><code>rootProject.name = 'Mywidget'
  include ':myviewer'
  project(':myviewer').projectDir = new File('../myviewer')
  </code></pre>
  
  <p>When i try flutter run, here is the error:</p>
  
  <blockquote>
    <p>flutter run   Launching lib/main.dart on Aquaris U2 in debug mode...
                                                                             FAILURE: Build failed with an exception.                              </p>
    
    <ul>
    <li><p>Where:                                                                 Build file
    '/user/path/dev/FlutterPlugin/myproject/android/build.gradle' line: 37</p></li>
    <li><p>What went wrong:                                                       A problem occurred evaluating project ':mywidget'.                    </p></li>
    </ul>
    
    <p>Project with path ':myviewer' could not be found in project ':mywidget'.</p>
    
    <ul>
    <li><p>Try:                                                                   Run with --stacktrace option to get the stack trace. Run with --info
    or --debug option to get more log output. Run with --scan to get full
    insights.</p></li>
    <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a><br>
                                                                         BUILD FAILED in 908ms<br>
    Running Gradle task 'assembleDebug'...<br>
    Running Gradle task 'assembleDebug'... Done<br>
    2,1s Gradle task assembleDebug failed with exit code 1</p></li>
    </ul>
  </blockquote>
  
  <p>Any idea on how to make it work?</p>
  
  <p>Thank you</p>