-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[camera] Manual roll and skip failing tests #7891
Changes from all commits
257d8e5
f7ee717
6fa495e
ed35216
f675957
5437d92
1506f12
c701327
8e2cc76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6790525ce673734ef3a913e301a7001e2f500703 | ||
4faa4a415ec9e96f933393e7b829a1c9768e1a66 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,7 +217,13 @@ class CreateAllPackagesAppCommand extends PackageCommand { | |
final File gradleFile = app | ||
.platformDirectory(FlutterPlatform.android) | ||
.childDirectory('app') | ||
.childFile('build.gradle'); | ||
.listSync() | ||
.whereType<File>() | ||
.firstWhere( | ||
(File file) => file.basename.startsWith('build.gradle'), | ||
); | ||
|
||
final bool gradleFileIsKotlin = gradleFile.basename.endsWith('kts'); | ||
|
||
// Ensure that there is a dependencies section, so the dependencies addition | ||
// below will work. | ||
|
@@ -229,18 +235,28 @@ dependencies {} | |
'''); | ||
} | ||
|
||
const String lifecycleDependency = | ||
" implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0-rc01'"; | ||
final String lifecycleDependency = gradleFileIsKotlin | ||
? ' implementation("androidx.lifecycle:lifecycle-runtime:2.2.0-rc01")' | ||
: " implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0-rc01'"; | ||
|
||
_adjustFile( | ||
gradleFile, | ||
replacements: <String, List<String>>{ | ||
// minSdkVersion 21 is required by camera_android. | ||
'minSdkVersion': <String>['minSdkVersion 21'], | ||
'compileSdkVersion': <String>['compileSdk 34'], | ||
if (gradleFileIsKotlin) | ||
'compileSdk': <String>['compileSdk = 34'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not part of this pr but this should probably be 35. |
||
else ...<String, List<String>>{ | ||
// minSdkVersion 21 is required by camera_android. | ||
'minSdkVersion': <String>['minSdkVersion 21'], | ||
'compileSdkVersion': <String>['compileSdk 34'], | ||
} | ||
}, | ||
additions: <String, List<String>>{ | ||
'defaultConfig {': <String>[' multiDexEnabled true'], | ||
'defaultConfig {': <String>[ | ||
if (gradleFileIsKotlin) | ||
' multiDexEnabled = true' | ||
else | ||
' multiDexEnabled true' | ||
], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can remove this due to the |
||
}, | ||
regexReplacements: <RegExp, List<String>>{ | ||
// Tests for https://github.com/flutter/flutter/issues/43383 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting nit can you include {} around this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collection conditionals can't use braces, unfortunately.