Skip to content

Commit c689ca3

Browse files
committed
fix(genui): remove duplicate 'component' in required list in prompt
- Use a `Set` to avoid duplicate entries when generating the `required` list for components in the catalog schema. - Update golden files to reflect the fix. - Add mock asset handler to `travel_app` tests to fix failing test. Follow-up for #873.
1 parent f9f9e21 commit c689ca3

30 files changed

Lines changed: 278 additions & 10 deletions
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package io.flutter.plugins;
2+
3+
import androidx.annotation.Keep;
4+
import androidx.annotation.NonNull;
5+
import io.flutter.Log;
6+
7+
import io.flutter.embedding.engine.FlutterEngine;
8+
9+
/**
10+
* Generated file. Do not edit.
11+
* This file is generated by the Flutter tool based on the
12+
* plugins that support the Android platform.
13+
*/
14+
@Keep
15+
public final class GeneratedPluginRegistrant {
16+
private static final String TAG = "GeneratedPluginRegistrant";
17+
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
18+
try {
19+
flutterEngine.getPlugins().add(new xyz.luan.audioplayers.AudioplayersPlugin());
20+
} catch (Exception e) {
21+
Log.e(TAG, "Error registering plugin audioplayers_android, xyz.luan.audioplayers.AudioplayersPlugin", e);
22+
}
23+
try {
24+
flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.appcheck.FlutterFirebaseAppCheckPlugin());
25+
} catch (Exception e) {
26+
Log.e(TAG, "Error registering plugin firebase_app_check, io.flutter.plugins.firebase.appcheck.FlutterFirebaseAppCheckPlugin", e);
27+
}
28+
try {
29+
flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin());
30+
} catch (Exception e) {
31+
Log.e(TAG, "Error registering plugin firebase_core, io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin", e);
32+
}
33+
try {
34+
flutterEngine.getPlugins().add(new dev.flutter.plugins.integration_test.IntegrationTestPlugin());
35+
} catch (Exception e) {
36+
Log.e(TAG, "Error registering plugin integration_test, dev.flutter.plugins.integration_test.IntegrationTestPlugin", e);
37+
}
38+
try {
39+
flutterEngine.getPlugins().add(new com.github.dart_lang.jni.JniPlugin());
40+
} catch (Exception e) {
41+
Log.e(TAG, "Error registering plugin jni, com.github.dart_lang.jni.JniPlugin", e);
42+
}
43+
try {
44+
flutterEngine.getPlugins().add(new com.github.dart_lang.jni_flutter.JniFlutterPlugin());
45+
} catch (Exception e) {
46+
Log.e(TAG, "Error registering plugin jni_flutter, com.github.dart_lang.jni_flutter.JniFlutterPlugin", e);
47+
}
48+
try {
49+
flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin());
50+
} catch (Exception e) {
51+
Log.e(TAG, "Error registering plugin url_launcher_android, io.flutter.plugins.urllauncher.UrlLauncherPlugin", e);
52+
}
53+
try {
54+
flutterEngine.getPlugins().add(new io.flutter.plugins.videoplayer.VideoPlayerPlugin());
55+
} catch (Exception e) {
56+
Log.e(TAG, "Error registering plugin video_player_android, io.flutter.plugins.videoplayer.VideoPlayerPlugin", e);
57+
}
58+
}
59+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sdk.dir=/Users/gspencer/Library/Android/sdk
2+
flutter.sdk=/Users/gspencer/code/flutter.stable
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This is a generated file; do not edit or check into version control.
2+
FLUTTER_ROOT=/Users/gspencer/code/flutter.stable
3+
FLUTTER_APPLICATION_PATH=/Users/gspencer/code/genui/examples/travel_app
4+
COCOAPODS_PARALLEL_CODE_SIGN=true
5+
FLUTTER_TARGET=lib/main.dart
6+
FLUTTER_BUILD_DIR=build
7+
FLUTTER_BUILD_NAME=0.1.0
8+
FLUTTER_BUILD_NUMBER=0.1.0
9+
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
10+
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
11+
DART_OBFUSCATION=false
12+
TRACK_WIDGET_CREATION=true
13+
TREE_SHAKE_ICONS=false
14+
PACKAGE_CONFIG=.dart_tool/package_config.json
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Generated file, do not edit.
3+
#
4+
5+
import lldb
6+
7+
def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
8+
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
9+
base = frame.register["x0"].GetValueAsAddress()
10+
page_len = frame.register["x1"].GetValueAsUnsigned()
11+
12+
# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
13+
# first page to see if handled it correctly. This makes diagnosing
14+
# misconfiguration (e.g. missing breakpoint) easier.
15+
data = bytearray(page_len)
16+
data[0:8] = b'IHELPED!'
17+
18+
error = lldb.SBError()
19+
frame.GetThread().GetProcess().WriteMemory(base, data, error)
20+
if not error.Success():
21+
print(f'Failed to write into {base}[+{page_len}]', error)
22+
return
23+
24+
def __lldb_init_module(debugger: lldb.SBDebugger, _):
25+
target = debugger.GetDummyTarget()
26+
# Caveat: must use BreakpointCreateByRegEx here and not
27+
# BreakpointCreateByName. For some reasons callback function does not
28+
# get carried over from dummy target for the later.
29+
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
30+
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
31+
bp.SetAutoContinue(True)
32+
print("-- LLDB integration loaded --")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# Generated file, do not edit.
3+
#
4+
5+
command script import --relative-to-command-file flutter_lldb_helper.py
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
# This is a generated file; do not edit or check into version control.
3+
export "FLUTTER_ROOT=/Users/gspencer/code/flutter.stable"
4+
export "FLUTTER_APPLICATION_PATH=/Users/gspencer/code/genui/examples/travel_app"
5+
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
6+
export "FLUTTER_TARGET=lib/main.dart"
7+
export "FLUTTER_BUILD_DIR=build"
8+
export "FLUTTER_BUILD_NAME=0.1.0"
9+
export "FLUTTER_BUILD_NUMBER=0.1.0"
10+
export "DART_OBFUSCATION=false"
11+
export "TRACK_WIDGET_CREATION=true"
12+
export "TREE_SHAKE_ICONS=false"
13+
export "PACKAGE_CONFIG=.dart_tool/package_config.json"

examples/travel_app/ios/Podfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Uncomment this line to define a global platform for your project
2+
# platform :ios, '13.0'
3+
4+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15+
unless File.exist?(generated_xcode_build_settings_path)
16+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17+
end
18+
19+
File.foreach(generated_xcode_build_settings_path) do |line|
20+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
21+
return matches[1].strip if matches
22+
end
23+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24+
end
25+
26+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
28+
flutter_ios_podfile_setup
29+
30+
target 'Runner' do
31+
use_frameworks!
32+
33+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
34+
target 'RunnerTests' do
35+
inherit! :search_paths
36+
end
37+
end
38+
39+
post_install do |installer|
40+
installer.pods_project.targets.each do |target|
41+
flutter_additional_ios_build_settings(target)
42+
end
43+
end
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
// clang-format off
6+
7+
#ifndef GeneratedPluginRegistrant_h
8+
#define GeneratedPluginRegistrant_h
9+
10+
#import <Flutter/Flutter.h>
11+
12+
NS_ASSUME_NONNULL_BEGIN
13+
14+
@interface GeneratedPluginRegistrant : NSObject
15+
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
16+
@end
17+
18+
NS_ASSUME_NONNULL_END
19+
#endif /* GeneratedPluginRegistrant_h */
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
// clang-format off
6+
7+
#import "GeneratedPluginRegistrant.h"
8+
9+
#if __has_include(<audioplayers_darwin/AudioplayersDarwinPlugin.h>)
10+
#import <audioplayers_darwin/AudioplayersDarwinPlugin.h>
11+
#else
12+
@import audioplayers_darwin;
13+
#endif
14+
15+
#if __has_include(<firebase_app_check/FLTFirebaseAppCheckPlugin.h>)
16+
#import <firebase_app_check/FLTFirebaseAppCheckPlugin.h>
17+
#else
18+
@import firebase_app_check;
19+
#endif
20+
21+
#if __has_include(<firebase_core/FLTFirebaseCorePlugin.h>)
22+
#import <firebase_core/FLTFirebaseCorePlugin.h>
23+
#else
24+
@import firebase_core;
25+
#endif
26+
27+
#if __has_include(<integration_test/IntegrationTestPlugin.h>)
28+
#import <integration_test/IntegrationTestPlugin.h>
29+
#else
30+
@import integration_test;
31+
#endif
32+
33+
#if __has_include(<url_launcher_ios/URLLauncherPlugin.h>)
34+
#import <url_launcher_ios/URLLauncherPlugin.h>
35+
#else
36+
@import url_launcher_ios;
37+
#endif
38+
39+
#if __has_include(<video_player_avfoundation/FVPVideoPlayerPlugin.h>)
40+
#import <video_player_avfoundation/FVPVideoPlayerPlugin.h>
41+
#else
42+
@import video_player_avfoundation;
43+
#endif
44+
45+
@implementation GeneratedPluginRegistrant
46+
47+
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
48+
[AudioplayersDarwinPlugin registerWithRegistrar:[registry registrarForPlugin:@"AudioplayersDarwinPlugin"]];
49+
[FLTFirebaseAppCheckPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAppCheckPlugin"]];
50+
[FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]];
51+
[IntegrationTestPlugin registerWithRegistrar:[registry registrarForPlugin:@"IntegrationTestPlugin"]];
52+
[URLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"URLLauncherPlugin"]];
53+
[FVPVideoPlayerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FVPVideoPlayerPlugin"]];
54+
}
55+
56+
@end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/gspencer/.pub-cache/hosted/pub.dev/audioplayers_linux-4.2.1/

0 commit comments

Comments
 (0)