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
4049889d
Unverified
Commit
4049889d
authored
Mar 11, 2020
by
Emmanuel Garcia
Committed by
GitHub
Mar 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make --androidx flag a noop in flutter create (#52340)
parent
5bb55227
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
24 additions
and
119 deletions
+24
-119
gradle_jetifier_test.dart
dev/devicelab/bin/tasks/gradle_jetifier_test.dart
+0
-1
gradle_plugin_dependencies_test.dart
dev/devicelab/bin/tasks/gradle_plugin_dependencies_test.dart
+0
-1
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+4
-6
plugins.dart
packages/flutter_tools/lib/src/plugins.dart
+1
-6
gradle.properties.tmpl
...r_tools/templates/app/android.tmpl/gradle.properties.tmpl
+0
-2
gradle.properties.tmpl
...ls/templates/module/android/gradle/gradle.properties.tmpl
+0
-2
build.gradle.tmpl
...module/android/host_app_common/app.tmpl/build.gradle.tmpl
+0
-7
build.gradle.tmpl
...tes/module/android/library/Flutter.tmpl/build.gradle.tmpl
+0
-6
Flutter.java.tmpl
...er.tmpl/src/main/java/io/flutter/facade/Flutter.java.tmpl
+1
-8
FlutterFragment.java.tmpl
...src/main/java/io/flutter/facade/FlutterFragment.java.tmpl
+1
-6
pubspec.yaml.tmpl
...s/flutter_tools/templates/module/common/pubspec.yaml.tmpl
+1
-1
pluginClass.java.tmpl
...mpl/src/main/java/androidIdentifier/pluginClass.java.tmpl
+1
-5
pluginClass.kt.tmpl
...mpl/src/main/kotlin/androidIdentifier/pluginClass.kt.tmpl
+1
-5
gradle.properties.tmpl
...ools/templates/plugin/android.tmpl/gradle.properties.tmpl
+0
-2
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+0
-59
build_apk_test.dart
...ter_tools/test/general.shard/commands/build_apk_test.dart
+7
-1
build_appbundle_test.dart
...ols/test/general.shard/commands/build_appbundle_test.dart
+7
-1
No files found.
dev/devicelab/bin/tasks/gradle_jetifier_test.dart
View file @
4049889d
...
@@ -34,7 +34,6 @@ Future<void> main() async {
...
@@ -34,7 +34,6 @@ Future<void> main() async {
'create'
,
'create'
,
options:
<
String
>[
options:
<
String
>[
'--org'
,
'io.flutter.devicelab'
,
'--org'
,
'io.flutter.devicelab'
,
'--androidx'
,
'hello'
,
'hello'
,
],
],
);
);
...
...
dev/devicelab/bin/tasks/gradle_plugin_dependencies_test.dart
View file @
4049889d
...
@@ -35,7 +35,6 @@ Future<void> main() async {
...
@@ -35,7 +35,6 @@ Future<void> main() async {
'create'
,
'create'
,
options:
<
String
>[
options:
<
String
>[
'--org'
,
'io.flutter.devicelab'
,
'--org'
,
'io.flutter.devicelab'
,
'--androidx'
,
'hello'
,
'hello'
,
],
],
);
);
...
...
packages/flutter_tools/lib/src/commands/create.dart
View file @
4049889d
...
@@ -139,11 +139,12 @@ class CreateCommand extends FlutterCommand {
...
@@ -139,11 +139,12 @@ class CreateCommand extends FlutterCommand {
defaultsTo:
'kotlin'
,
defaultsTo:
'kotlin'
,
allowed:
<
String
>[
'java'
,
'kotlin'
],
allowed:
<
String
>[
'java'
,
'kotlin'
],
);
);
// TODO(egarciad): Remove this flag. https://github.com/flutter/flutter/issues/52363
argParser
.
addFlag
(
argParser
.
addFlag
(
'androidx'
,
'androidx'
,
hide:
true
,
negatable:
true
,
negatable:
true
,
defaultsTo:
true
,
help:
'Deprecated. Setting this flag has no effect.'
,
help:
'Generate a project using the AndroidX support libraries'
,
);
);
}
}
...
@@ -401,7 +402,6 @@ class CreateCommand extends FlutterCommand {
...
@@ -401,7 +402,6 @@ class CreateCommand extends FlutterCommand {
flutterRoot:
flutterRoot
,
flutterRoot:
flutterRoot
,
renderDriverTest:
boolArg
(
'with-driver-test'
),
renderDriverTest:
boolArg
(
'with-driver-test'
),
withPluginHook:
generatePlugin
,
withPluginHook:
generatePlugin
,
androidX:
boolArg
(
'androidx'
),
androidLanguage:
stringArg
(
'android-language'
),
androidLanguage:
stringArg
(
'android-language'
),
iosLanguage:
stringArg
(
'ios-language'
),
iosLanguage:
stringArg
(
'ios-language'
),
web:
featureFlags
.
isWebEnabled
,
web:
featureFlags
.
isWebEnabled
,
...
@@ -411,7 +411,7 @@ class CreateCommand extends FlutterCommand {
...
@@ -411,7 +411,7 @@ class CreateCommand extends FlutterCommand {
final
String
relativeDirPath
=
globals
.
fs
.
path
.
relative
(
projectDirPath
);
final
String
relativeDirPath
=
globals
.
fs
.
path
.
relative
(
projectDirPath
);
if
(!
projectDir
.
existsSync
()
||
projectDir
.
listSync
().
isEmpty
)
{
if
(!
projectDir
.
existsSync
()
||
projectDir
.
listSync
().
isEmpty
)
{
globals
.
printStatus
(
'Creating project
$relativeDirPath
...
androidx:
${boolArg('androidx')}
'
);
globals
.
printStatus
(
'Creating project
$relativeDirPath
...'
);
}
else
{
}
else
{
if
(
sampleCode
!=
null
&&
!
overwrite
)
{
if
(
sampleCode
!=
null
&&
!
overwrite
)
{
throwToolExit
(
'Will not overwrite existing project in
$relativeDirPath
: '
throwToolExit
(
'Will not overwrite existing project in
$relativeDirPath
: '
...
@@ -619,7 +619,6 @@ To edit platform code in an IDE see https://flutter.dev/developing-packages/#edi
...
@@ -619,7 +619,6 @@ To edit platform code in an IDE see https://flutter.dev/developing-packages/#edi
String
projectName
,
String
projectName
,
String
projectDescription
,
String
projectDescription
,
String
androidLanguage
,
String
androidLanguage
,
bool
androidX
,
String
iosLanguage
,
String
iosLanguage
,
String
flutterRoot
,
String
flutterRoot
,
bool
renderDriverTest
=
false
,
bool
renderDriverTest
=
false
,
...
@@ -644,7 +643,6 @@ To edit platform code in an IDE see https://flutter.dev/developing-packages/#edi
...
@@ -644,7 +643,6 @@ To edit platform code in an IDE see https://flutter.dev/developing-packages/#edi
'macosIdentifier'
:
appleIdentifier
,
'macosIdentifier'
:
appleIdentifier
,
'description'
:
projectDescription
,
'description'
:
projectDescription
,
'dartSdk'
:
'
$flutterRoot
/bin/cache/dart-sdk'
,
'dartSdk'
:
'
$flutterRoot
/bin/cache/dart-sdk'
,
'androidX'
:
androidX
,
'useAndroidEmbeddingV2'
:
featureFlags
.
isAndroidEmbeddingV2Enabled
,
'useAndroidEmbeddingV2'
:
featureFlags
.
isAndroidEmbeddingV2Enabled
,
'androidMinApiLevel'
:
android
.
minApiLevel
,
'androidMinApiLevel'
:
android
.
minApiLevel
,
'androidSdkVersion'
:
android_sdk
.
minimumAndroidSdkVersion
,
'androidSdkVersion'
:
android_sdk
.
minimumAndroidSdkVersion
,
...
...
packages/flutter_tools/lib/src/plugins.dart
View file @
4049889d
...
@@ -527,14 +527,9 @@ public final class GeneratedPluginRegistrant {
...
@@ -527,14 +527,9 @@ public final class GeneratedPluginRegistrant {
const
String
_androidPluginRegistryTemplateNewEmbedding
=
'''
const
String
_androidPluginRegistryTemplateNewEmbedding
=
'''
package io.flutter.plugins;
package io.flutter.plugins;
{{#androidX}}
import androidx.annotation.Keep;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.NonNull;
{{/androidX}}
{{^androidX}}
import android.support.annotation.Keep;
import android.support.annotation.NonNull;
{{/androidX}}
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.embedding.engine.FlutterEngine;
{{#needsShim}}
{{#needsShim}}
import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry;
import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry;
...
...
packages/flutter_tools/templates/app/android.tmpl/gradle.properties.tmpl
View file @
4049889d
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.enableR8=true
{{#androidX}}
android.useAndroidX=true
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
{{/androidX}}
packages/flutter_tools/templates/module/android/gradle/gradle.properties.tmpl
View file @
4049889d
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.enableR8=true
{{#androidX}}
android.useAndroidX=true
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
{{/androidX}}
packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/build.gradle.tmpl
View file @
4049889d
...
@@ -34,13 +34,6 @@ buildDir = new File(rootProject.projectDir, "../build/host")
...
@@ -34,13 +34,6 @@ buildDir = new File(rootProject.projectDir, "../build/host")
dependencies {
dependencies {
implementation project(':flutter')
implementation project(':flutter')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])
{{#androidX}}
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
{{/androidX}}
{{^androidX}}
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:28.0.0'
{{/androidX}}
}
}
packages/flutter_tools/templates/module/android/library/Flutter.tmpl/build.gradle.tmpl
View file @
4049889d
...
@@ -45,11 +45,5 @@ flutter {
...
@@ -45,11 +45,5 @@ flutter {
}
}
dependencies {
dependencies {
{{#androidX}}
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.0.2'
{{/androidX}}
{{^androidX}}
implementation 'com.android.support:support-v13:27.1.1'
implementation 'com.android.support:support-annotations:27.1.1'
{{/androidX}}
}
}
packages/flutter_tools/templates/module/android/library/Flutter.tmpl/src/main/java/io/flutter/facade/Flutter.java.tmpl
View file @
4049889d
...
@@ -4,18 +4,11 @@ import android.app.Activity;
...
@@ -4,18 +4,11 @@ import android.app.Activity;
import
android
.
content
.
Context
;
import
android
.
content
.
Context
;
import
android
.
os
.
Bundle
;
import
android
.
os
.
Bundle
;
{{#
androidX
}}
import
androidx
.
annotation
.
NonNull
;
import
androidx
.
annotation
.
NonNull
;
import
androidx
.
lifecycle
.
Lifecycle
;
import
androidx
.
lifecycle
.
Lifecycle
;
import
androidx
.
lifecycle
.
LifecycleObserver
;
import
androidx
.
lifecycle
.
LifecycleObserver
;
import
androidx
.
lifecycle
.
OnLifecycleEvent
;
import
androidx
.
lifecycle
.
OnLifecycleEvent
;
{{/
androidX
}}
{{^
androidX
}}
import
android
.
arch
.
lifecycle
.
Lifecycle
;
import
android
.
arch
.
lifecycle
.
LifecycleObserver
;
import
android
.
arch
.
lifecycle
.
OnLifecycleEvent
;
import
android
.
support
.
annotation
.
NonNull
;
{{/
androidX
}}
import
io
.
flutter
.
plugin
.
common
.
BasicMessageChannel
;
import
io
.
flutter
.
plugin
.
common
.
BasicMessageChannel
;
import
io
.
flutter
.
plugin
.
common
.
StringCodec
;
import
io
.
flutter
.
plugin
.
common
.
StringCodec
;
import
io
.
flutter
.
plugins
.
GeneratedPluginRegistrant
;
import
io
.
flutter
.
plugins
.
GeneratedPluginRegistrant
;
...
...
packages/flutter_tools/templates/module/android/library/Flutter.tmpl/src/main/java/io/flutter/facade/FlutterFragment.java.tmpl
View file @
4049889d
...
@@ -6,14 +6,9 @@ import android.util.AttributeSet;
...
@@ -6,14 +6,9 @@ import android.util.AttributeSet;
import
android
.
view
.
LayoutInflater
;
import
android
.
view
.
LayoutInflater
;
import
android
.
view
.
ViewGroup
;
import
android
.
view
.
ViewGroup
;
{{#
androidX
}}
import
androidx
.
annotation
.
NonNull
;
import
androidx
.
annotation
.
NonNull
;
import
androidx
.
fragment
.
app
.
Fragment
;
import
androidx
.
fragment
.
app
.
Fragment
;
{{/
androidX
}}
{{^
androidX
}}
import
android
.
support
.
annotation
.
NonNull
;
import
android
.
support
.
v4
.
app
.
Fragment
;
{{/
androidX
}}
import
io
.
flutter
.
view
.
FlutterView
;
import
io
.
flutter
.
view
.
FlutterView
;
/**
/**
...
...
packages/flutter_tools/templates/module/common/pubspec.yaml.tmpl
View file @
4049889d
...
@@ -85,6 +85,6 @@ flutter:
...
@@ -85,6 +85,6 @@ flutter:
# They also do not have any bearing on your native host application's
# They also do not have any bearing on your native host application's
# identifiers, which may be completely independent or the same as these.
# identifiers, which may be completely independent or the same as these.
module:
module:
androidX:
{{androidX}}
androidX:
true
androidPackage: {{androidIdentifier}}
androidPackage: {{androidIdentifier}}
iosBundleIdentifier: {{iosIdentifier}}
iosBundleIdentifier: {{iosIdentifier}}
packages/flutter_tools/templates/plugin/android-java.tmpl/src/main/java/androidIdentifier/pluginClass.java.tmpl
View file @
4049889d
package
{{
androidIdentifier
}};
package
{{
androidIdentifier
}};
{{#
useAndroidEmbeddingV2
}}
{{#
useAndroidEmbeddingV2
}}
{{#
androidX
}}
import
androidx
.
annotation
.
NonNull
;
import
androidx
.
annotation
.
NonNull
;
{{/
androidX
}}
{{^
androidX
}}
import
android
.
support
.
annotation
.
NonNull
;
{{/
androidX
}}
import
io
.
flutter
.
embedding
.
engine
.
plugins
.
FlutterPlugin
;
import
io
.
flutter
.
embedding
.
engine
.
plugins
.
FlutterPlugin
;
import
io
.
flutter
.
plugin
.
common
.
MethodCall
;
import
io
.
flutter
.
plugin
.
common
.
MethodCall
;
import
io
.
flutter
.
plugin
.
common
.
MethodChannel
;
import
io
.
flutter
.
plugin
.
common
.
MethodChannel
;
...
...
packages/flutter_tools/templates/plugin/android-kotlin.tmpl/src/main/kotlin/androidIdentifier/pluginClass.kt.tmpl
View file @
4049889d
package
{{
androidIdentifier
}}
package
{{
androidIdentifier
}}
{{#
useAndroidEmbeddingV2
}}
{{#
useAndroidEmbeddingV2
}}
{{#
androidX
}}
import
androidx
.
annotation
.
NonNull
;
import
androidx
.
annotation
.
NonNull
;
{{/
androidX
}}
{{^
androidX
}}
import
android
.
support
.
annotation
.
NonNull
;
{{/
androidX
}}
import
io
.
flutter
.
embedding
.
engine
.
plugins
.
FlutterPlugin
import
io
.
flutter
.
embedding
.
engine
.
plugins
.
FlutterPlugin
import
io
.
flutter
.
plugin
.
common
.
MethodCall
import
io
.
flutter
.
plugin
.
common
.
MethodCall
import
io
.
flutter
.
plugin
.
common
.
MethodChannel
import
io
.
flutter
.
plugin
.
common
.
MethodChannel
...
...
packages/flutter_tools/templates/plugin/android.tmpl/gradle.properties.tmpl
View file @
4049889d
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.enableR8=true
{{#androidX}}
android.useAndroidX=true
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
{{/androidX}}
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
4049889d
...
@@ -488,27 +488,6 @@ void main() {
...
@@ -488,27 +488,6 @@ void main() {
expect
(
actualContents
.
contains
(
'useAndroidX'
),
true
);
expect
(
actualContents
.
contains
(
'useAndroidX'
),
true
);
});
});
testUsingContext
(
'non androidx app project'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
when
(
mockFlutterVersion
.
channel
).
thenReturn
(
frameworkChannel
);
final
CreateCommand
command
=
CreateCommand
();
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
command
);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
'--no-androidx'
,
projectDir
.
path
]);
void
expectExists
(
String
relPath
)
{
expect
(
globals
.
fs
.
isFileSync
(
'
${projectDir.path}
/
$relPath
'
),
true
);
}
expectExists
(
'android/gradle.properties'
);
final
String
actualContents
=
await
globals
.
fs
.
file
(
projectDir
.
path
+
'/android/gradle.properties'
).
readAsString
();
expect
(
actualContents
.
contains
(
'useAndroidX'
),
false
);
});
testUsingContext
(
'androidx is used by default in a module project'
,
()
async
{
testUsingContext
(
'androidx is used by default in a module project'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
Cache
.
flutterRoot
=
'../..'
;
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
...
@@ -526,23 +505,6 @@ void main() {
...
@@ -526,23 +505,6 @@ void main() {
);
);
});
});
testUsingContext
(
'non androidx module'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
when
(
mockFlutterVersion
.
channel
).
thenReturn
(
frameworkChannel
);
final
CreateCommand
command
=
CreateCommand
();
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
command
);
await
runner
.
run
(<
String
>[
'create'
,
'--template=module'
,
'--no-pub'
,
'--no-androidx'
,
projectDir
.
path
]);
final
FlutterProject
project
=
FlutterProject
.
fromDirectory
(
projectDir
);
expect
(
project
.
usesAndroidX
,
false
,
);
});
testUsingContext
(
'androidx is used by default in a plugin project'
,
()
async
{
testUsingContext
(
'androidx is used by default in a plugin project'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
Cache
.
flutterRoot
=
'../..'
;
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
...
@@ -564,27 +526,6 @@ void main() {
...
@@ -564,27 +526,6 @@ void main() {
expect
(
actualContents
.
contains
(
'useAndroidX'
),
true
);
expect
(
actualContents
.
contains
(
'useAndroidX'
),
true
);
});
});
testUsingContext
(
'non androidx plugin project'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
when
(
mockFlutterVersion
.
channel
).
thenReturn
(
frameworkChannel
);
final
CreateCommand
command
=
CreateCommand
();
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
command
);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
'--template=plugin'
,
'--no-androidx'
,
projectDir
.
path
]);
void
expectExists
(
String
relPath
)
{
expect
(
globals
.
fs
.
isFileSync
(
'
${projectDir.path}
/
$relPath
'
),
true
);
}
expectExists
(
'android/gradle.properties'
);
final
String
actualContents
=
await
globals
.
fs
.
file
(
projectDir
.
path
+
'/android/gradle.properties'
).
readAsString
();
expect
(
actualContents
.
contains
(
'useAndroidX'
),
false
);
});
testUsingContext
(
'app supports Linux if requested'
,
()
async
{
testUsingContext
(
'app supports Linux if requested'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
Cache
.
flutterRoot
=
'../..'
;
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
...
...
packages/flutter_tools/test/general.shard/commands/build_apk_test.dart
View file @
4049889d
...
@@ -366,7 +366,13 @@ void main() {
...
@@ -366,7 +366,13 @@ void main() {
testUsingContext
(
"reports when the app isn't using AndroidX"
,
()
async
{
testUsingContext
(
"reports when the app isn't using AndroidX"
,
()
async
{
final
String
projectPath
=
await
createProject
(
tempDir
,
final
String
projectPath
=
await
createProject
(
tempDir
,
arguments:
<
String
>[
'--no-pub'
,
'--no-androidx'
,
'--template=app'
]);
arguments:
<
String
>[
'--no-pub'
,
'--template=app'
]);
// Simulate a non-androidx project.
tempDir
.
childDirectory
(
'flutter_project'
)
.
childDirectory
(
'android'
)
.
childFile
(
'gradle.properties'
)
.
writeAsStringSync
(
'android.useAndroidX=false'
);
when
(
mockProcessManager
.
start
(
when
(
mockProcessManager
.
start
(
<
String
>[
<
String
>[
...
...
packages/flutter_tools/test/general.shard/commands/build_appbundle_test.dart
View file @
4049889d
...
@@ -324,7 +324,13 @@ void main() {
...
@@ -324,7 +324,13 @@ void main() {
testUsingContext
(
"reports when the app isn't using AndroidX"
,
()
async
{
testUsingContext
(
"reports when the app isn't using AndroidX"
,
()
async
{
final
String
projectPath
=
await
createProject
(
tempDir
,
final
String
projectPath
=
await
createProject
(
tempDir
,
arguments:
<
String
>[
'--no-pub'
,
'--no-androidx'
,
'--template=app'
]);
arguments:
<
String
>[
'--no-pub'
,
'--template=app'
]);
// Simulate a non-androidx project.
tempDir
.
childDirectory
(
'flutter_project'
)
.
childDirectory
(
'android'
)
.
childFile
(
'gradle.properties'
)
.
writeAsStringSync
(
'android.useAndroidX=false'
);
when
(
mockProcessManager
.
start
(
when
(
mockProcessManager
.
start
(
<
String
>[
<
String
>[
...
...
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