Materialize Flutter module, Android (#20520)
This commit is contained in:
committed by
GitHub
parent
f17bb519b3
commit
d4e5e1e11e
67
packages/flutter_tools/templates/module/README.md
Normal file
67
packages/flutter_tools/templates/module/README.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Templates for Flutter Module
|
||||
|
||||
## common
|
||||
|
||||
Written to root of Flutter module.
|
||||
|
||||
Adds Dart project files including `pubspec.yaml`.
|
||||
|
||||
## android
|
||||
|
||||
#### library
|
||||
|
||||
Written to the `.android/` hidden folder.
|
||||
|
||||
Contents wraps Flutter/Dart code as a Gradle project that defines an
|
||||
Android library.
|
||||
|
||||
Executing `./gradlew flutter:assembleDebug` in that folder produces
|
||||
a `.aar` archive.
|
||||
|
||||
Android host apps can set up a dependency to this project to consume
|
||||
Flutter views.
|
||||
|
||||
#### gradle
|
||||
|
||||
Written to `.android/` or `android/`.
|
||||
|
||||
Mixin for adding Gradle boilerplate to Android projects. The `build.gradle`
|
||||
file is a template file so that it is created, not copied, on instantiation.
|
||||
That way, its timestamp reflects template instantiation time.
|
||||
|
||||
#### host_app_common
|
||||
|
||||
Written to either `.android/` or `android/`.
|
||||
|
||||
Contents define a single-Activity, single-View Android host app
|
||||
with a dependency on the `.android/Flutter` library.
|
||||
|
||||
Executing `./gradlew app:assembleDebug` in the target folder produces
|
||||
an `.apk` archive.
|
||||
|
||||
Used with either `android_host_ephemeral` or `android_host_materialized`.
|
||||
|
||||
#### host_app_ephemeral
|
||||
|
||||
Written to `.android/` on top of `android_host_common`.
|
||||
|
||||
Combined contents define an *ephemeral* (hidden, auto-generated,
|
||||
under Flutter tooling control) Android host app with a dependency on the
|
||||
`.android/Flutter` library.
|
||||
|
||||
#### host_app_materialized
|
||||
|
||||
Written to `android/` on top of `android_host_common`.
|
||||
|
||||
Combined contents define a *materialized* (visible, one-time generated,
|
||||
under app author control) Android host app with a dependency on the
|
||||
`.android/Flutter` library.
|
||||
|
||||
## ios
|
||||
|
||||
Written to the `.ios/` hidden folder.
|
||||
|
||||
Contents wraps Flutter/Dart code as a CocoaPods pod.
|
||||
|
||||
iOS host apps can set up a dependency to this project to consume
|
||||
Flutter views.
|
||||
@@ -1,6 +0,0 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
@@ -7,7 +7,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.3'
|
||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
FlutterApplication and put your custom class here. -->
|
||||
<application
|
||||
android:name="io.flutter.app.FlutterApplication"
|
||||
android:label="{{projectName}}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 544 B |
@@ -0,0 +1,5 @@
|
||||
// Generated file. Do not edit.
|
||||
include ':app'
|
||||
|
||||
setBinding(new Binding([gradle: this]))
|
||||
evaluate(new File('../.android/include_flutter.groovy'))
|
||||
@@ -0,0 +1,5 @@
|
||||
// Generated file. Do not edit.
|
||||
|
||||
rootProject.name = 'android_generated'
|
||||
setBinding(new Binding([gradle: this]))
|
||||
evaluate(new File('include_flutter.groovy'))
|
||||
Reference in New Issue
Block a user