[flutter_tools] Fix bundle file not found when flavor contains upperc… (#92660)

This commit is contained in:
Michael Tamm
2022-02-04 20:55:20 +01:00
committed by GitHub
parent 4b82d47b01
commit 1fcb076eb7
3 changed files with 45 additions and 1 deletions

View File

@@ -305,6 +305,34 @@ void main() {
expect(bundle.path, '/build/app/outputs/bundle/foo_barDebug/app-foo_bar-debug.aab');
});
testWithoutContext(
'Finds app bundle when flavor contains underscores and uppercase letters in release mode - Gradle 4.1', () {
final FlutterProject project = generateFakeAppBundle('foo_BarRelease', 'app-foo_Bar-release.aab', fileSystem);
final File bundle = findBundleFile(
project,
const BuildInfo(BuildMode.release, 'Foo_Bar', treeShakeIcons: false),
BufferLogger.test(),
TestUsage(),
);
expect(bundle, isNotNull);
expect(bundle.path, '/build/app/outputs/bundle/foo_BarRelease/app-foo_Bar-release.aab');
});
testWithoutContext(
'Finds app bundle when flavor contains underscores and uppercase letters in debug mode - Gradle 4.1', () {
final FlutterProject project = generateFakeAppBundle('foo_BarDebug', 'app-foo_Bar-debug.aab', fileSystem);
final File bundle = findBundleFile(
project,
const BuildInfo(BuildMode.debug, 'Foo_Bar', treeShakeIcons: false),
BufferLogger.test(),
TestUsage(),
);
expect(bundle, isNotNull);
expect(bundle.path, '/build/app/outputs/bundle/foo_BarDebug/app-foo_Bar-debug.aab');
});
testWithoutContext('AAB not found', () {
final FlutterProject project = FlutterProject.fromDirectoryTest(fileSystem.currentDirectory);
final TestUsage testUsage = TestUsage();