Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8bd2e658
Unverified
Commit
8bd2e658
authored
Jul 11, 2020
by
xster
Committed by
GitHub
Jul 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove v1 Android create templates (#61203)
parent
eac17471
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
20 additions
and
729 deletions
+20
-729
module_host_with_custom_build_test.dart
...vicelab/bin/tasks/module_host_with_custom_build_test.dart
+1
-3
module_test.dart
dev/devicelab/bin/tasks/module_test.dart
+1
-3
README.md
dev/integration_tests/android_host_app/README.md
+0
-8
build.gradle
dev/integration_tests/android_host_app/app/build.gradle
+0
-27
AndroidManifest.xml
...n_tests/android_host_app/app/src/main/AndroidManifest.xml
+0
-13
MainActivity.java
...pp/app/src/main/java/io/flutter/add2app/MainActivity.java
+0
-18
build.gradle
dev/integration_tests/android_host_app/build.gradle
+0
-24
gradle.properties
dev/integration_tests/android_host_app/gradle.properties
+0
-3
gradle-wrapper.properties
...android_host_app/gradle/wrapper/gradle-wrapper.properties
+0
-6
settings.gradle
dev/integration_tests/android_host_app/settings.gradle
+0
-7
README.md
...integration_tests/module_host_with_custom_build/README.md
+0
-8
build.gradle
...tion_tests/module_host_with_custom_build/app/build.gradle
+0
-46
AndroidManifest.xml
...e_host_with_custom_build/app/src/main/AndroidManifest.xml
+0
-13
MainActivity.java
...d/app/src/main/java/io/flutter/addtoapp/MainActivity.java
+0
-18
build.gradle
...egration_tests/module_host_with_custom_build/build.gradle
+0
-24
gradle.properties
...ion_tests/module_host_with_custom_build/gradle.properties
+0
-3
gradle-wrapper.properties
...ith_custom_build/gradle/wrapper/gradle-wrapper.properties
+0
-6
settings.gradle
...ation_tests/module_host_with_custom_build/settings.gradle
+0
-7
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+0
-1
features.dart
packages/flutter_tools/lib/src/features.dart
+0
-27
plugins.dart
packages/flutter_tools/lib/src/plugins.dart
+6
-0
project.dart
packages/flutter_tools/lib/src/project.dart
+1
-2
MainActivity.java.tmpl
...pp/src/main/java/androidIdentifier/MainActivity.java.tmpl
+0
-15
MainActivity.kt.tmpl
...pp/src/main/kotlin/androidIdentifier/MainActivity.kt.tmpl
+0
-14
AndroidManifest.xml.tmpl
...es/app/android.tmpl/app/src/main/AndroidManifest.xml.tmpl
+0
-13
AndroidManifest.xml.tmpl
...ost_app_common/app.tmpl/src/main/AndroidManifest.xml.tmpl
+0
-2
MainActivity.java.tmpl
...c/main/java/androidIdentifier/host/MainActivity.java.tmpl
+0
-15
build.gradle.tmpl
...tes/module/android/library/Flutter.tmpl/build.gradle.tmpl
+0
-49
flutter.iml.copy.tmpl
...module/android/library/Flutter.tmpl/flutter.iml.copy.tmpl
+0
-26
AndroidManifest.xml.tmpl
...id/library/Flutter.tmpl/src/main/AndroidManifest.xml.tmpl
+0
-11
Flutter.java.tmpl
...er.tmpl/src/main/java/io/flutter/facade/Flutter.java.tmpl
+0
-130
FlutterFragment.java.tmpl
...src/main/java/io/flutter/facade/FlutterFragment.java.tmpl
+0
-41
include_flutter.groovy.copy.tmpl
...s/module/android/library/include_flutter.groovy.copy.tmpl
+0
-16
settings.gradle.copy.tmpl
...emplates/module/android/library/settings.gradle.copy.tmpl
+0
-5
pluginClass.java.tmpl
...mpl/src/main/java/androidIdentifier/pluginClass.java.tmpl
+0
-41
pluginClass.kt.tmpl
...mpl/src/main/kotlin/androidIdentifier/pluginClass.kt.tmpl
+0
-44
packages_test.dart
...er_tools/test/commands.shard/permeable/packages_test.dart
+9
-3
features_test.dart
packages/flutter_tools/test/general.shard/features_test.dart
+0
-30
plugins_test.dart
packages/flutter_tools/test/general.shard/plugins_test.dart
+2
-1
testbed.dart
packages/flutter_tools/test/src/testbed.dart
+0
-6
No files found.
dev/devicelab/bin/tasks/module_host_with_custom_build_test.dart
View file @
8bd2e658
...
...
@@ -13,8 +13,6 @@ import 'package:path/path.dart' as path;
final
String
gradlew
=
Platform
.
isWindows
?
'gradlew.bat'
:
'gradlew'
;
final
String
gradlewExecutable
=
Platform
.
isWindows
?
'.
\\
$gradlew
'
:
'./
$gradlew
'
;
final
bool
useAndroidEmbeddingV2
=
Platform
.
environment
[
'ENABLE_ANDROID_EMBEDDING_V2'
]
==
'true'
;
/// Tests that the Android app containing a Flutter module can be built when
/// it has custom build types and flavors.
Future
<
void
>
main
()
async
{
...
...
@@ -60,7 +58,7 @@ Future<void> main() async {
flutterDirectory
.
path
,
'dev'
,
'integration_tests'
,
useAndroidEmbeddingV2
?
'module_host_with_custom_build_v2_embedding'
:
'module_host_with_custom_build
'
,
'module_host_with_custom_build_v2_embedding
'
,
),
),
hostAppDir
,
...
...
dev/devicelab/bin/tasks/module_test.dart
View file @
8bd2e658
...
...
@@ -14,8 +14,6 @@ final String gradlew = Platform.isWindows ? 'gradlew.bat' : 'gradlew';
final
String
gradlewExecutable
=
Platform
.
isWindows
?
'.
\\
$gradlew
'
:
'./
$gradlew
'
;
final
String
fileReadWriteMode
=
Platform
.
isWindows
?
'rw-rw-rw-'
:
'rw-r--r--'
;
final
bool
useAndroidEmbeddingV2
=
Platform
.
environment
[
'ENABLE_ANDROID_EMBEDDING_V2'
]
==
'true'
;
/// Tests that the Flutter module project template works and supports
/// adding Flutter to an existing Android app.
Future
<
void
>
main
()
async
{
...
...
@@ -177,7 +175,7 @@ Future<void> main() async {
flutterDirectory
.
path
,
'dev'
,
'integration_tests'
,
useAndroidEmbeddingV2
?
'android_host_app_v2_embedding'
:
'android_host_app
'
,
'android_host_app_v2_embedding
'
,
),
),
hostApp
,
...
...
dev/integration_tests/android_host_app/README.md
deleted
100644 → 0
View file @
eac17471
# Android host app
Android host app for a Flutter module created using
```
$ flutter create -t module hello
```
and placed in a sibling folder to (a clone of) the host app.
Used by the
`module_test.dart`
device lab test.
dev/integration_tests/android_host_app/app/build.gradle
deleted
100644 → 0
View file @
eac17471
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
apply
plugin:
'com.android.application'
android
{
compileSdkVersion
28
compileOptions
{
sourceCompatibility
1.8
targetCompatibility
1.8
}
defaultConfig
{
applicationId
"io.flutter.add2app"
minSdkVersion
16
targetSdkVersion
28
versionCode
1
versionName
"1.0"
}
}
dependencies
{
implementation
project
(
':flutter'
)
implementation
'androidx.appcompat:appcompat:1.1.0'
}
dev/integration_tests/android_host_app/app/src/main/AndroidManifest.xml
deleted
100644 → 0
View file @
eac17471
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"io.flutter.add2app"
>
<application
android:allowBackup=
"false"
tools:ignore=
"GoogleAppIndexingWarning,MissingApplicationIcon"
>
<activity
android:name=
".MainActivity"
/>
</application>
</manifest>
dev/integration_tests/android_host_app/app/src/main/java/io/flutter/add2app/MainActivity.java
deleted
100644 → 0
View file @
eac17471
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package
io
.
flutter
.
add2app
;
import
android.os.Bundle
;
import
androidx.appcompat.app.AppCompatActivity
;
import
io.flutter.facade.Flutter
;
public
class
MainActivity
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
Flutter
.
createView
(
this
,
getLifecycle
(),
"route1"
));
}
}
dev/integration_tests/android_host_app/build.gradle
deleted
100644 → 0
View file @
eac17471
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
buildscript
{
repositories
{
google
()
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.5.0'
}
}
allprojects
{
repositories
{
google
()
jcenter
()
}
}
task
clean
(
type:
Delete
)
{
delete
rootProject
.
buildDir
}
dev/integration_tests/android_host_app/gradle.properties
deleted
100644 → 0
View file @
eac17471
org.gradle.jvmargs
=
-Xmx1536m
android.useAndroidX
=
true
android.enableJetifier
=
true
dev/integration_tests/android_host_app/gradle/wrapper/gradle-wrapper.properties
deleted
100644 → 0
View file @
eac17471
#Mon Jun 25 14:13:36 CEST 2018
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-5.6.2-all.zip
dev/integration_tests/android_host_app/settings.gradle
deleted
100644 → 0
View file @
eac17471
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
include
':app'
setBinding
(
new
Binding
([
gradle:
this
]))
evaluate
(
new
File
(
settingsDir
.
parentFile
,
'hello/.android/include_flutter.groovy'
))
dev/integration_tests/module_host_with_custom_build/README.md
deleted
100644 → 0
View file @
eac17471
# Android host app
Android host app for a Flutter module created using
```
$ flutter create -t module hello
```
and placed in a sibling folder to (a clone of) the host app.
Used by the
`module_host_with_custom_build_test.dart`
device lab test.
dev/integration_tests/module_host_with_custom_build/app/build.gradle
deleted
100644 → 0
View file @
eac17471
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
apply
plugin:
'com.android.application'
android
{
compileSdkVersion
28
compileOptions
{
sourceCompatibility
1.8
targetCompatibility
1.8
}
defaultConfig
{
applicationId
"io.flutter.addtoapp"
minSdkVersion
16
targetSdkVersion
28
versionCode
1
versionName
"1.0"
}
// Test build types.
buildTypes
{
staging
{
initWith
debug
// This is required because the `:flutter` project doesn't define this custom build type.
// Without the fallback, the Android plugin will make Gradle exit with the following error:
// `Unable to find a matching variant of project :flutter`
matchingFallbacks
=
[
'debug'
]
}
prod
{
initWith
release
matchingFallbacks
=
[
'release'
]
}
}
// Test flavors.
flavorDimensions
"version"
productFlavors
{
demo
{
dimension
"version"
}
}
}
dependencies
{
implementation
project
(
':flutter'
)
implementation
'androidx.appcompat:appcompat:1.1.0'
}
dev/integration_tests/module_host_with_custom_build/app/src/main/AndroidManifest.xml
deleted
100644 → 0
View file @
eac17471
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"io.flutter.addtoapp"
>
<application
android:allowBackup=
"false"
tools:ignore=
"GoogleAppIndexingWarning,MissingApplicationIcon"
>
<activity
android:name=
".MainActivity"
/>
</application>
</manifest>
dev/integration_tests/module_host_with_custom_build/app/src/main/java/io/flutter/addtoapp/MainActivity.java
deleted
100644 → 0
View file @
eac17471
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package
io
.
flutter
.
addtoapp
;
import
android.os.Bundle
;
import
androidx.appcompat.app.AppCompatActivity
;
import
io.flutter.facade.Flutter
;
public
class
MainActivity
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
Flutter
.
createView
(
this
,
getLifecycle
(),
"route1"
));
}
}
dev/integration_tests/module_host_with_custom_build/build.gradle
deleted
100644 → 0
View file @
eac17471
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
buildscript
{
repositories
{
google
()
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.2.1'
}
}
allprojects
{
repositories
{
google
()
jcenter
()
}
}
task
clean
(
type:
Delete
)
{
delete
rootProject
.
buildDir
}
dev/integration_tests/module_host_with_custom_build/gradle.properties
deleted
100644 → 0
View file @
eac17471
org.gradle.jvmargs
=
-Xmx1536m
android.useAndroidX
=
true
android.enableJetifier
=
true
dev/integration_tests/module_host_with_custom_build/gradle/wrapper/gradle-wrapper.properties
deleted
100644 → 0
View file @
eac17471
#Mon Jun 25 14:13:36 CEST 2018
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-5.6.2-all.zip
dev/integration_tests/module_host_with_custom_build/settings.gradle
deleted
100644 → 0
View file @
eac17471
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
include
':app'
setBinding
(
new
Binding
([
gradle:
this
]))
evaluate
(
new
File
(
settingsDir
.
parentFile
,
'hello/.android/include_flutter.groovy'
))
packages/flutter_tools/lib/src/commands/create.dart
View file @
8bd2e658
...
...
@@ -748,7 +748,6 @@ https://flutter.dev/docs/development/packages-and-plugins/developing-packages#pl
'macosIdentifier'
:
appleIdentifier
,
'description'
:
projectDescription
,
'dartSdk'
:
'
$flutterRoot
/bin/cache/dart-sdk'
,
'useAndroidEmbeddingV2'
:
featureFlags
.
isAndroidEmbeddingV2Enabled
,
'androidMinApiLevel'
:
android_common
.
minApiLevel
,
'androidSdkVersion'
:
android_sdk
.
minimumAndroidSdkVersion
,
'withDriverTest'
:
renderDriverTest
,
...
...
packages/flutter_tools/lib/src/features.dart
View file @
8bd2e658
...
...
@@ -34,9 +34,6 @@ class FeatureFlags {
/// Whether flutter desktop for Windows is enabled.
bool
get
isWindowsEnabled
=>
isEnabled
(
flutterWindowsDesktopFeature
);
/// Whether the Android embedding V2 is enabled.
bool
get
isAndroidEmbeddingV2Enabled
=>
isEnabled
(
flutterAndroidEmbeddingV2Feature
);
/// Whether a particular feature is enabled for the current channel.
///
/// Prefer using one of the specific getters above instead of this API.
...
...
@@ -68,7 +65,6 @@ const List<Feature> allFeatures = <Feature>[
flutterLinuxDesktopFeature
,
flutterMacOSDesktopFeature
,
flutterWindowsDesktopFeature
,
flutterAndroidEmbeddingV2Feature
,
];
/// The [Feature] for flutter web.
...
...
@@ -131,29 +127,6 @@ const Feature flutterWindowsDesktopFeature = Feature(
),
);
/// The [Feature] for generating projects using the new Android embedding.
const
Feature
flutterAndroidEmbeddingV2Feature
=
Feature
(
name:
'flutter create generates projects using the Android embedding V2'
,
environmentOverride:
'ENABLE_ANDROID_EMBEDDING_V2'
,
configSetting:
'enable-android-embedding-v2'
,
beta:
FeatureChannelSetting
(
available:
true
,
enabledByDefault:
true
,
),
dev:
FeatureChannelSetting
(
available:
true
,
enabledByDefault:
true
,
),
master:
FeatureChannelSetting
(
available:
true
,
enabledByDefault:
true
,
),
stable:
FeatureChannelSetting
(
available:
true
,
enabledByDefault:
true
,
),
);
/// A [Feature] is a process for conditionally enabling tool features.
///
/// All settings are optional, and if not provided will generally default to
...
...
packages/flutter_tools/lib/src/plugins.dart
View file @
8bd2e658
...
...
@@ -644,6 +644,12 @@ Future<void> _writeAndroidPluginRegistrant(FlutterProject project, List<Plugin>
break
;
case
AndroidEmbeddingVersion
.
v1
:
default
:
globals
.
printStatus
(
'Your Flutter application is created using an older version of the '
"Android embedding. It's being deprecated in favor of Android embedding "
'v2. Follow the steps on https://flutter.dev/go/android-project-migration '
'to migrate your project.'
);
for
(
final
Map
<
String
,
dynamic
>
plugin
in
androidPlugins
)
{
if
(!(
plugin
[
'supportsEmbeddingV1'
]
as
bool
)
&&
plugin
[
'supportsEmbeddingV2'
]
as
bool
)
{
throwToolExit
(
...
...
packages/flutter_tools/lib/src/project.dart
View file @
8bd2e658
...
...
@@ -805,7 +805,7 @@ class AndroidProject extends FlutterProjectPlatform {
await
_overwriteFromTemplate
(
globals
.
fs
.
path
.
join
(
'module'
,
'android'
,
featureFlags
.
isAndroidEmbeddingV2Enabled
?
'library_new_embedding'
:
'library
'
,
'library_new_embedding
'
,
),
ephemeralDirectory
);
await
_overwriteFromTemplate
(
globals
.
fs
.
path
.
join
(
'module'
,
'android'
,
'gradle'
),
ephemeralDirectory
);
gradle
.
gradleUtils
.
injectGradleWrapperIfNeeded
(
ephemeralDirectory
);
...
...
@@ -820,7 +820,6 @@ class AndroidProject extends FlutterProjectPlatform {
'projectName'
:
parent
.
manifest
.
appName
,
'androidIdentifier'
:
parent
.
manifest
.
androidPackage
,
'androidX'
:
usesAndroidX
,
'useAndroidEmbeddingV2'
:
featureFlags
.
isAndroidEmbeddingV2Enabled
,
},
printStatusWhenWriting:
false
,
overwriteExisting:
true
,
...
...
packages/flutter_tools/templates/app/android-java.tmpl/app/src/main/java/androidIdentifier/MainActivity.java.tmpl
View file @
8bd2e658
package
{{
androidIdentifier
}};
{{#
useAndroidEmbeddingV2
}}
import
io
.
flutter
.
embedding
.
android
.
FlutterActivity
;
public
class
MainActivity
extends
FlutterActivity
{
}
{{/
useAndroidEmbeddingV2
}}
{{^
useAndroidEmbeddingV2
}}
import
android
.
os
.
Bundle
;
import
io
.
flutter
.
app
.
FlutterActivity
;
import
io
.
flutter
.
plugins
.
GeneratedPluginRegistrant
;
public
class
MainActivity
extends
FlutterActivity
{
@
Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
GeneratedPluginRegistrant
.
registerWith
(
this
);
}
}
{{/
useAndroidEmbeddingV2
}}
packages/flutter_tools/templates/app/android-kotlin.tmpl/app/src/main/kotlin/androidIdentifier/MainActivity.kt.tmpl
View file @
8bd2e658
package
{{
androidIdentifier
}}
{{#
useAndroidEmbeddingV2
}}
import
io
.
flutter
.
embedding
.
android
.
FlutterActivity
class
MainActivity
:
FlutterActivity
()
{
}
{{/
useAndroidEmbeddingV2
}}
{{^
useAndroidEmbeddingV2
}}
import
android
.
os
.
Bundle
import
io
.
flutter
.
app
.
FlutterActivity
import
io
.
flutter
.
plugins
.
GeneratedPluginRegistrant
class
MainActivity
:
FlutterActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
GeneratedPluginRegistrant
.
registerWith
(
this
)
}
}
{{/
useAndroidEmbeddingV2
}}
packages/flutter_tools/templates/app/android.tmpl/app/src/main/AndroidManifest.xml.tmpl
View file @
8bd2e658
...
...
@@ -16,16 +16,6 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
{{^useAndroidEmbeddingV2}}
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
{{/useAndroidEmbeddingV2}}
{{#useAndroidEmbeddingV2}}
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
...
...
@@ -43,18 +33,15 @@
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
{{/useAndroidEmbeddingV2}}
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
{{#useAndroidEmbeddingV2}}
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
{{/useAndroidEmbeddingV2}}
</application>
</manifest>
packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/src/main/AndroidManifest.xml.tmpl
View file @
8bd2e658
...
...
@@ -36,12 +36,10 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
{{#useAndroidEmbeddingV2}}
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name=
"flutterEmbedding"
android:value=
"2"
/>
{{/useAndroidEmbeddingV2}}
</application>
</manifest>
packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/src/main/java/androidIdentifier/host/MainActivity.java.tmpl
View file @
8bd2e658
package
{{
androidIdentifier
}}.
host
;
import
android
.
os
.
Bundle
;
{{#
useAndroidEmbeddingV2
}}
import
io
.
flutter
.
embedding
.
android
.
FlutterActivity
;
public
class
MainActivity
extends
FlutterActivity
{
}
{{/
useAndroidEmbeddingV2
}}
{{^
useAndroidEmbeddingV2
}}
import
io
.
flutter
.
app
.
FlutterActivity
;
import
io
.
flutter
.
plugins
.
GeneratedPluginRegistrant
;
public
class
MainActivity
extends
FlutterActivity
{
@
Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
GeneratedPluginRegistrant
.
registerWith
(
this
);
}
}
{{/
useAndroidEmbeddingV2
}}
packages/flutter_tools/templates/module/android/library/Flutter.tmpl/build.gradle.tmpl
deleted
100644 → 0
View file @
eac17471
// Generated file. Do not edit.
def localProperties = new Properties()
def localPropertiesFile = new File(buildscript.sourceFile.parentFile.parentFile, 'local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.library'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
group '{{androidIdentifier}}'
version '1.0'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
}
flutter {
source '../..'
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
}
packages/flutter_tools/templates/module/android/library/Flutter.tmpl/flutter.iml.copy.tmpl
deleted
100644 → 0
View file @
eac17471
<?xml version="1.0" encoding="UTF-8"?>
<module
external.linked.project.id=
":flutter"
external.linked.project.path=
"$MODULE_DIR$"
external.root.project.path=
"$MODULE_DIR$/../../.."
external.system.id=
"GRADLE"
type=
"JAVA_MODULE"
version=
"4"
>
<component
name=
"FacetManager"
>
<facet
type=
"android-gradle"
name=
"Android-Gradle"
>
<configuration>
<option
name=
"GRADLE_PROJECT_PATH"
value=
":flutter"
/>
</configuration>
</facet>
<facet
type=
"android"
name=
"Android"
>
<configuration>
<option
name=
"ALLOW_USER_CONFIGURATION"
value=
"false"
/>
<option
name=
"MANIFEST_FILE_RELATIVE_PATH"
value=
"/src/main/AndroidManifest.xml"
/>
</configuration>
</facet>
</component>
<component
name=
"NewModuleRootManager"
LANGUAGE_LEVEL=
"JDK_1_8"
>
<output
url=
"file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes"
/>
<output-test
url=
"file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes"
/>
<exclude-output
/>
<content
url=
"file://$MODULE_DIR$"
>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/java"
isTestSource=
"false"
/>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 28 Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
\ No newline at end of file
packages/flutter_tools/templates/module/android/library/Flutter.tmpl/src/main/AndroidManifest.xml.tmpl
deleted
100644 → 0
View file @
eac17471
<!-- Generated file. Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{androidIdentifier}}"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<application tools:node="merge">
<meta-data
android:name="flutterProjectType"
android:value="module" />
</application>
</manifest>
packages/flutter_tools/templates/module/android/library/Flutter.tmpl/src/main/java/io/flutter/facade/Flutter.java.tmpl
deleted
100644 → 0
View file @
eac17471
package
io
.
flutter
.
facade
;
import
android
.
app
.
Activity
;
import
android
.
content
.
Context
;
import
android
.
os
.
Bundle
;
import
androidx
.
annotation
.
NonNull
;
import
androidx
.
lifecycle
.
Lifecycle
;
import
androidx
.
lifecycle
.
LifecycleObserver
;
import
androidx
.
lifecycle
.
OnLifecycleEvent
;
import
io
.
flutter
.
plugin
.
common
.
BasicMessageChannel
;
import
io
.
flutter
.
plugin
.
common
.
StringCodec
;
import
io
.
flutter
.
plugins
.
GeneratedPluginRegistrant
;
import
io
.
flutter
.
view
.
FlutterMain
;
import
io
.
flutter
.
view
.
FlutterNativeView
;
import
io
.
flutter
.
view
.
FlutterRunArguments
;
import
io
.
flutter
.
view
.
FlutterView
;
/**
*
Main
entry
point
for
using
Flutter
in
Android
applications
.
*
*
<
p
><
strong
>
Warning
:</
strong
>
This
file
is
auto
-
generated
by
Flutter
tooling
.
*
DO
NOT
EDIT
.</
p
>
*/
public
final
class
Flutter
{
private
Flutter
()
{
//
to
prevent
instantiation
}
/**
*
Initiates
the
Dart
VM
.
Calling
this
method
at
an
early
point
may
help
decreasing
time
to
first
*
frame
for
a
subsequently
created
{@
link
FlutterView
}.
*
*
@
param
applicationContext
the
application
's {@link Context}
*/
public static void startInitialization(@NonNull Context applicationContext) {
FlutterMain.startInitialization(applicationContext);
}
/**
* Creates a {@link FlutterFragment} managing a {@link FlutterView}. The optional
* initial route string will be made available to the Dart code
* (via {@code window.defaultRouteName}) and may be used to determine which widget
* should be displayed in the view. The default initialRoute is "/".
*
* @param initialRoute an initial route {@link String}, or null
* @return a {@link FlutterFragment}
*/
@NonNull
public static FlutterFragment createFragment(String initialRoute) {
final FlutterFragment fragment = new FlutterFragment();
final Bundle args = new Bundle();
args.putString(FlutterFragment.ARG_ROUTE, initialRoute);
fragment.setArguments(args);
return fragment;
}
/**
* Creates a {@link FlutterView} linked to the specified {@link Activity} and {@link Lifecycle}.
* The optional initial route string will be made available to the Dart code (via
* {@code window.defaultRouteName}) and may be used to determine which widget should be displayed
* in the view. The default initialRoute is "/".
*
* @param activity an {@link Activity}
* @param lifecycle a {@link Lifecycle}
* @param initialRoute an initial route {@link String}, or null
* @return a {@link FlutterView}
*/
@NonNull
public static FlutterView createView(@NonNull final Activity activity, @NonNull final Lifecycle lifecycle, final String initialRoute) {
FlutterMain.startInitialization(activity.getApplicationContext());
FlutterMain.ensureInitializationComplete(activity.getApplicationContext(), null);
final FlutterNativeView nativeView = new FlutterNativeView(activity);
final FlutterView flutterView = new FlutterView(activity, null, nativeView) {
private final BasicMessageChannel<String> lifecycleMessages = new BasicMessageChannel<>(this, "flutter/lifecycle", StringCodec.INSTANCE);
@Override
public void onFirstFrame() {
super.onFirstFrame();
setAlpha(1.0f);
}
@Override
public void onPostResume() {
// Overriding default behavior to avoid dictating system UI via PlatformPlugin.
lifecycleMessages.send("AppLifecycleState.resumed");
}
};
if (initialRoute != null) {
flutterView.setInitialRoute(initialRoute);
}
lifecycle.addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
public void onCreate() {
final FlutterRunArguments arguments = new FlutterRunArguments();
arguments.bundlePath = FlutterMain.findAppBundlePath(activity.getApplicationContext());
arguments.entrypoint = "main";
flutterView.runFromBundle(arguments);
GeneratedPluginRegistrant.registerWith(flutterView.getPluginRegistry());
}
@OnLifecycleEvent(Lifecycle.Event.ON_START)
public void onStart() {
flutterView.onStart();
}
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
public void onResume() {
flutterView.onPostResume();
}
@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
public void onPause() {
flutterView.onPause();
}
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
public void onStop() {
flutterView.onStop();
}
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroy() {
flutterView.destroy();
}
});
flutterView.setAlpha(0.0f);
return flutterView;
}
}
packages/flutter_tools/templates/module/android/library/Flutter.tmpl/src/main/java/io/flutter/facade/FlutterFragment.java.tmpl
deleted
100644 → 0
View file @
eac17471
package
io
.
flutter
.
facade
;
import
android
.
content
.
Context
;
import
android
.
os
.
Bundle
;
import
android
.
util
.
AttributeSet
;
import
android
.
view
.
LayoutInflater
;
import
android
.
view
.
ViewGroup
;
import
androidx
.
annotation
.
NonNull
;
import
androidx
.
fragment
.
app
.
Fragment
;
import
io
.
flutter
.
view
.
FlutterView
;
/**
*
A
{@
link
Fragment
}
managing
a
{@
link
FlutterView
}.
*
*
<
p
><
strong
>
Warning
:</
strong
>
This
file
is
auto
-
generated
by
Flutter
tooling
.
*
DO
NOT
EDIT
.</
p
>
*/
public
class
FlutterFragment
extends
Fragment
{
public
static
final
String
ARG_ROUTE
=
"route"
;
private
String
mRoute
=
"/"
;
@
Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
getArguments
()
!= null) {
mRoute
=
getArguments
().
getString
(
ARG_ROUTE
);
}
}
@
Override
public
void
onInflate
(
Context
context
,
AttributeSet
attrs
,
Bundle
savedInstanceState
)
{
super
.
onInflate
(
context
,
attrs
,
savedInstanceState
);
}
@
Override
public
FlutterView
onCreateView
(@
NonNull
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
return
Flutter
.
createView
(
getActivity
(),
getLifecycle
(),
mRoute
);
}
}
packages/flutter_tools/templates/module/android/library/include_flutter.groovy.copy.tmpl
deleted
100644 → 0
View file @
eac17471
def scriptFile = getClass().protectionDomain.codeSource.location.toURI()
def flutterProjectRoot = new File(scriptFile).parentFile.parentFile
gradle.include ":flutter"
gradle.project(":flutter").projectDir = new File(flutterProjectRoot, ".android/Flutter")
def localPropertiesFile = new File(flutterProjectRoot, ".android/local.properties")
def properties = new Properties()
assert localPropertiesFile.exists(), "❗️The Flutter module doesn't have a `$localPropertiesFile` file." +
"\nYou must run `flutter pub get` in `$flutterProjectRoot`."
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
gradle.apply from: "$flutterSdkPath/packages/flutter_tools/gradle/module_plugin_loader.gradle"
packages/flutter_tools/templates/module/android/library/settings.gradle.copy.tmpl
deleted
100644 → 0
View file @
eac17471
// Generated file. Do not edit.
rootProject.name = 'android_generated'
setBinding(new Binding([gradle: this]))
evaluate(new File(settingsDir, 'include_flutter.groovy'))
packages/flutter_tools/templates/plugin/android-java.tmpl/src/main/java/androidIdentifier/pluginClass.java.tmpl
View file @
8bd2e658
package
{{
androidIdentifier
}};
{{#
useAndroidEmbeddingV2
}}
import
androidx
.
annotation
.
NonNull
;
import
io
.
flutter
.
embedding
.
engine
.
plugins
.
FlutterPlugin
;
...
...
@@ -24,20 +23,6 @@ public class {{pluginClass}} implements FlutterPlugin, MethodCallHandler {
channel
.
setMethodCallHandler
(
this
);
}
//
This
static
function
is
optional
and
equivalent
to
onAttachedToEngine
.
It
supports
the
old
//
pre
-
Flutter
-
1.12
Android
projects
.
You
are
encouraged
to
continue
supporting
//
plugin
registration
via
this
function
while
apps
migrate
to
use
the
new
Android
APIs
//
post
-
flutter
-
1.12
via
https
://
flutter
.
dev
/
go
/
android
-
project
-
migration
.
//
//
It
is
encouraged
to
share
logic
between
onAttachedToEngine
and
registerWith
to
keep
//
them
functionally
equivalent
.
Only
one
of
onAttachedToEngine
or
registerWith
will
be
called
//
depending
on
the
user
's project. onAttachedToEngine or registerWith must both be defined
// in the same class.
public static void registerWith(Registrar registrar) {
final MethodChannel channel = new MethodChannel(registrar.messenger(), "{{projectName}}");
channel.setMethodCallHandler(new {{pluginClass}}());
}
@
Override
public
void
onMethodCall
(@
NonNull
MethodCall
call
,
@
NonNull
Result
result
)
{
if
(
call
.
method
.
equals
(
"getPlatformVersion"
))
{
...
...
@@ -52,29 +37,3 @@ public class {{pluginClass}} implements FlutterPlugin, MethodCallHandler {
channel
.
setMethodCallHandler
(
null
);
}
}
{{/useAndroidEmbeddingV2}}
{{^useAndroidEmbeddingV2}}
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.PluginRegistry.Registrar;
/** {{pluginClass}} */
public class {{pluginClass}} implements MethodCallHandler {
/** Plugin registration. */
public static void registerWith(Registrar registrar) {
final MethodChannel channel = new MethodChannel(registrar.messenger(), "{{projectName}}");
channel.setMethodCallHandler(new {{pluginClass}}());
}
@Override
public void onMethodCall(MethodCall call, Result result) {
if (call.method.equals("getPlatformVersion")) {
result.success("Android " + android.os.Build.VERSION.RELEASE);
} else {
result.notImplemented();
}
}
}
{{/useAndroidEmbeddingV2}}
packages/flutter_tools/templates/plugin/android-kotlin.tmpl/src/main/kotlin/androidIdentifier/pluginClass.kt.tmpl
View file @
8bd2e658
package
{{
androidIdentifier
}}
{{#
useAndroidEmbeddingV2
}}
import
androidx
.
annotation
.
NonNull
;
import
io
.
flutter
.
embedding
.
engine
.
plugins
.
FlutterPlugin
...
...
@@ -23,23 +22,6 @@ public class {{pluginClass}}: FlutterPlugin, MethodCallHandler {
channel
.
setMethodCallHandler
(
this
);
}
//
This
static
function
is
optional
and
equivalent
to
onAttachedToEngine
.
It
supports
the
old
//
pre
-
Flutter
-
1.12
Android
projects
.
You
are
encouraged
to
continue
supporting
//
plugin
registration
via
this
function
while
apps
migrate
to
use
the
new
Android
APIs
//
post
-
flutter
-
1.12
via
https
://
flutter
.
dev
/
go
/
android
-
project
-
migration
.
//
//
It
is
encouraged
to
share
logic
between
onAttachedToEngine
and
registerWith
to
keep
//
them
functionally
equivalent
.
Only
one
of
onAttachedToEngine
or
registerWith
will
be
called
//
depending
on
the
user
's project. onAttachedToEngine or registerWith must both be defined
// in the same class.
companion object {
@JvmStatic
fun registerWith(registrar: Registrar) {
val channel = MethodChannel(registrar.messenger(), "{{projectName}}")
channel.setMethodCallHandler({{pluginClass}}())
}
}
override
fun
onMethodCall
(@
NonNull
call
:
MethodCall
,
@
NonNull
result
:
Result
)
{
if
(
call
.
method
==
"getPlatformVersion"
)
{
result
.
success
(
"Android ${android.os.Build.VERSION.RELEASE}"
)
...
...
@@ -52,29 +34,3 @@ public class {{pluginClass}}: FlutterPlugin, MethodCallHandler {
channel
.
setMethodCallHandler
(
null
)
}
}
{{/useAndroidEmbeddingV2}}
{{^useAndroidEmbeddingV2}}
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar
class {{pluginClass}}: MethodCallHandler {
companion object {
@JvmStatic
fun registerWith(registrar: Registrar) {
val channel = MethodChannel(registrar.messenger(), "{{projectName}}")
channel.setMethodCallHandler({{pluginClass}}())
}
}
override fun onMethodCall(call: MethodCall, result: Result) {
if (call.method == "getPlatformVersion") {
result.success("Android ${android.os.Build.VERSION.RELEASE}")
} else {
result.notImplemented()
}
}
}
{{/useAndroidEmbeddingV2}}
packages/flutter_tools/test/commands.shard/permeable/packages_test.dart
View file @
8bd2e658
...
...
@@ -11,7 +11,6 @@ import 'package:flutter_tools/src/base/io.dart';
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/commands/packages.dart'
;
import
'package:flutter_tools/src/dart/pub.dart'
;
import
'package:flutter_tools/src/features.dart'
;
import
'package:flutter_tools/src/reporting/reporting.dart'
;
import
'package:process/process.dart'
;
import
'package:flutter_tools/src/globals.dart'
as
globals
;
...
...
@@ -293,13 +292,21 @@ void main() {
arguments:
<
String
>[
'--no-pub'
]);
removeGeneratedFiles
(
projectPath
);
final
File
androidManifest
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
projectPath
,
'android/app/src/main/AndroidManifest.xml'
,
));
final
String
updatedAndroidManifestString
=
androidManifest
.
readAsStringSync
().
replaceAll
(
'android:value="2"'
,
'android:value="1"'
);
androidManifest
.
writeAsStringSync
(
updatedAndroidManifestString
);
final
PackagesCommand
command
=
await
runCommandIn
(
projectPath
,
'get'
);
final
PackagesGetCommand
getCommand
=
command
.
subcommands
[
'get'
]
as
PackagesGetCommand
;
expect
(
await
getCommand
.
usageValues
,
containsPair
(
CustomDimensions
.
commandPackagesAndroidEmbeddingVersion
,
'v1'
));
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isAndroidEmbeddingV2Enabled:
false
),
Pub:
()
=>
Pub
(
fileSystem:
globals
.
fs
,
logger:
globals
.
logger
,
...
...
@@ -321,7 +328,6 @@ void main() {
expect
(
await
getCommand
.
usageValues
,
containsPair
(
CustomDimensions
.
commandPackagesAndroidEmbeddingVersion
,
'v2'
));
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isAndroidEmbeddingV2Enabled:
true
),
Pub:
()
=>
Pub
(
fileSystem:
globals
.
fs
,
logger:
globals
.
logger
,
...
...
packages/flutter_tools/test/general.shard/features_test.dart
View file @
8bd2e658
...
...
@@ -440,36 +440,6 @@ void main() {
expect
(
featureFlags
.
isWindowsEnabled
,
false
);
}));
group
(
'isAndroidEmbeddingV2Enabled'
,
()
{
test
(
'is enabled on beta'
,
()
=>
testbed
.
run
(()
{
when
(
mockFlutterVerion
.
channel
).
thenReturn
(
'beta'
);
when
<
bool
>(
mockFlutterConfig
.
getValue
(
'enable-android-embedding-v2'
)
as
bool
).
thenReturn
(
true
);
expect
(
featureFlags
.
isAndroidEmbeddingV2Enabled
,
true
);
}));
test
(
'is enabled on dev'
,
()
=>
testbed
.
run
(()
{
when
(
mockFlutterVerion
.
channel
).
thenReturn
(
'dev'
);
when
<
bool
>(
mockFlutterConfig
.
getValue
(
'enable-android-embedding-v2'
)
as
bool
).
thenReturn
(
true
);
expect
(
featureFlags
.
isAndroidEmbeddingV2Enabled
,
true
);
}));
test
(
'is enabled on master'
,
()
=>
testbed
.
run
(()
{
when
(
mockFlutterVerion
.
channel
).
thenReturn
(
'master'
);
when
<
bool
>(
mockFlutterConfig
.
getValue
(
'enable-android-embedding-v2'
)
as
bool
).
thenReturn
(
true
);
expect
(
featureFlags
.
isAndroidEmbeddingV2Enabled
,
true
);
}));
test
(
'is enabled on stable'
,
()
=>
testbed
.
run
(()
{
when
(
mockFlutterVerion
.
channel
).
thenReturn
(
'stable'
);
when
<
bool
>(
mockFlutterConfig
.
getValue
(
'enable-android-embedding-v2'
)
as
bool
).
thenReturn
(
true
);
expect
(
featureFlags
.
isAndroidEmbeddingV2Enabled
,
true
);
}));
});
});
}
...
...
packages/flutter_tools/test/general.shard/plugins_test.dart
View file @
8bd2e658
...
...
@@ -638,7 +638,7 @@ dependencies:
XcodeProjectInterpreter:
()
=>
xcodeProjectInterpreter
,
});
testUsingContext
(
'old embedding app uses a plugin that supports v1 and v2 embedding'
,
()
async
{
testUsingContext
(
'old embedding app uses a plugin that supports v1 and v2 embedding
works but shows a deprecation warning
'
,
()
async
{
when
(
flutterProject
.
isModule
).
thenReturn
(
false
);
when
(
androidProject
.
getEmbeddingVersion
()).
thenReturn
(
AndroidEmbeddingVersion
.
v1
);
...
...
@@ -655,6 +655,7 @@ dependencies:
expect
(
registrant
.
readAsStringSync
(),
contains
(
'class GeneratedPluginRegistrant'
));
expect
(
registrant
.
readAsStringSync
(),
contains
(
'UseBothEmbedding.registerWith(registry.registrarFor("plugin4.UseBothEmbedding"));'
));
expect
(
testLogger
.
statusText
,
contains
(
'Follow the steps on https://flutter.dev/go/android-project-migration'
));
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fs
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
...
...
packages/flutter_tools/test/src/testbed.dart
View file @
8bd2e658
...
...
@@ -724,7 +724,6 @@ class TestFeatureFlags implements FeatureFlags {
this
.
isMacOSEnabled
=
false
,
this
.
isWebEnabled
=
false
,
this
.
isWindowsEnabled
=
false
,
this
.
isAndroidEmbeddingV2Enabled
=
false
,
});
@override
...
...
@@ -739,9 +738,6 @@ class TestFeatureFlags implements FeatureFlags {
@override
final
bool
isWindowsEnabled
;
@override
final
bool
isAndroidEmbeddingV2Enabled
;
@override
bool
isEnabled
(
Feature
feature
)
{
switch
(
feature
)
{
...
...
@@ -753,8 +749,6 @@ class TestFeatureFlags implements FeatureFlags {
return
isMacOSEnabled
;
case
flutterWindowsDesktopFeature:
return
isWindowsEnabled
;
case
flutterAndroidEmbeddingV2Feature:
return
isAndroidEmbeddingV2Enabled
;
}
return
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment