Skip to content

Commit cc2d65e

Browse files
committed
Update colorist
1 parent aaa7cb7 commit cc2d65e

111 files changed

Lines changed: 2189 additions & 1879 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"object" : {
3+
"artifacts" : [
4+
5+
],
6+
"dependencies" : [
7+
{
8+
"basedOn" : null,
9+
"packageRef" : {
10+
"identity" : "flutterframework",
11+
"kind" : "fileSystem",
12+
"location" : "/Users/brett/Documents/GitHub/codelabs/colorist/colorist/ios/Flutter/ephemeral/Packages/.packages/FlutterFramework",
13+
"name" : "FlutterFramework"
14+
},
15+
"state" : {
16+
"name" : "fileSystem",
17+
"path" : "/Users/brett/Documents/GitHub/codelabs/colorist/colorist/ios/Flutter/ephemeral/Packages/.packages/FlutterFramework"
18+
},
19+
"subpath" : "flutterframework"
20+
}
21+
],
22+
"prebuilts" : [
23+
24+
]
25+
},
26+
"version" : 7
27+
}

colorist/codelab_rebuild.yaml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ steps:
104104
- name: Upgrade deps
105105
path: colorist
106106
flutter: pub upgrade --major-versions
107+
- name: flutter clean
108+
path: colorist
109+
flutter: clean
107110
- name: Build iOS simulator bundle
108111
platforms: [macos]
109112
path: colorist
@@ -327,25 +330,15 @@ steps:
327330
+ <true/>
328331
</dict>
329332
</plist>
330-
- name: Patch ios/Podfile
331-
path: colorist/ios/Podfile
332-
patch-u: |
333-
--- a/colorist/step_02/ios/Podfile
334-
+++ b/colorist/step_02/ios/Podfile
335-
@@ -1,5 +1,5 @@
336-
-# Uncomment this line to define a global platform for your project
337-
-# platform :ios, '13.0'
338-
+# Firebase requires at least iOS 15.0
339-
+platform :ios, '15.0'
340-
341-
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
342-
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
343333
- name: Patch ios/Runner.xcodeproj/project.pbxproj
344334
xcode-project-path: colorist/ios/Runner.xcodeproj
345335
iphoneos-deployment-target: "15.0"
346336
- name: Upgrade deps
347337
path: colorist
348338
flutter: pub upgrade --major-versions
339+
- name: flutter clean
340+
path: colorist
341+
flutter: clean
349342
- name: Build iOS simulator bundle
350343
platforms: [macos]
351344
path: colorist
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
3+
# This builtInKotlin flag was added automatically by Flutter migrator
4+
android.builtInKotlin=false
5+
# This newDsl flag was added automatically by Flutter migrator
6+
android.newDsl=false

colorist/step_01/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1313
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
1414
7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */; };
15+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
1516
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1617
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1718
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -49,6 +50,7 @@
4950
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
5051
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5152
7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
53+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
5254
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
5355
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
5456
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
@@ -64,6 +66,7 @@
6466
isa = PBXFrameworksBuildPhase;
6567
buildActionMask = 2147483647;
6668
files = (
69+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
6770
);
6871
runOnlyForDeploymentPostprocessing = 0;
6972
};
@@ -81,6 +84,7 @@
8184
9740EEB11CF90186004384FC /* Flutter */ = {
8285
isa = PBXGroup;
8386
children = (
87+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
8488
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
8589
9740EEB21CF90195004384FC /* Debug.xcconfig */,
8690
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -160,6 +164,9 @@
160164
dependencies = (
161165
);
162166
name = Runner;
167+
packageProductDependencies = (
168+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
169+
);
163170
productName = Runner;
164171
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
165172
productType = "com.apple.product-type.application";
@@ -193,6 +200,9 @@
193200
Base,
194201
);
195202
mainGroup = 97C146E51CF9000F007C117D;
203+
packageReferences = (
204+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
205+
);
196206
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
197207
projectDirPath = "";
198208
projectRoot = "";
@@ -615,6 +625,20 @@
615625
defaultConfigurationName = Release;
616626
};
617627
/* End XCConfigurationList section */
628+
629+
/* Begin XCLocalSwiftPackageReference section */
630+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
631+
isa = XCLocalSwiftPackageReference;
632+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
633+
};
634+
/* End XCLocalSwiftPackageReference section */
635+
636+
/* Begin XCSwiftPackageProductDependency section */
637+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
638+
isa = XCSwiftPackageProductDependency;
639+
productName = FlutterGeneratedPluginSwiftPackage;
640+
};
641+
/* End XCSwiftPackageProductDependency section */
618642
};
619643
rootObject = 97C146E61CF9000F007C117D /* Project object */;
620644
}

colorist/step_01/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<PreActions>
9+
<ExecutionAction
10+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
11+
<ActionContent
12+
title = "Run Prepare Flutter Framework Script"
13+
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18+
BuildableName = "Runner.app"
19+
BlueprintName = "Runner"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</EnvironmentBuildable>
23+
</ActionContent>
24+
</ExecutionAction>
25+
</PreActions>
826
<BuildActionEntries>
927
<BuildActionEntry
1028
buildForTesting = "YES"

colorist/step_01/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
2828
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
2929
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
30+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
3031
/* End PBXBuildFile section */
3132

3233
/* Begin PBXContainerItemProxy section */
@@ -76,6 +77,7 @@
7677
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
7778
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
7879
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
80+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
7981
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
8082
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
8183
/* End PBXFileReference section */
@@ -92,6 +94,7 @@
9294
isa = PBXFrameworksBuildPhase;
9395
buildActionMask = 2147483647;
9496
files = (
97+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
9598
);
9699
runOnlyForDeploymentPostprocessing = 0;
97100
};
@@ -151,6 +154,7 @@
151154
33CEB47122A05771004F2AC0 /* Flutter */ = {
152155
isa = PBXGroup;
153156
children = (
157+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
154158
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
155159
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
156160
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
@@ -216,6 +220,9 @@
216220
33CC11202044C79F0003C045 /* PBXTargetDependency */,
217221
);
218222
name = Runner;
223+
packageProductDependencies = (
224+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
225+
);
219226
productName = Runner;
220227
productReference = 33CC10ED2044A3C60003C045 /* colorist.app */;
221228
productType = "com.apple.product-type.application";
@@ -260,6 +267,9 @@
260267
Base,
261268
);
262269
mainGroup = 33CC10E42044A3C60003C045;
270+
packageReferences = (
271+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
272+
);
263273
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
264274
projectDirPath = "";
265275
projectRoot = "";
@@ -700,6 +710,20 @@
700710
defaultConfigurationName = Release;
701711
};
702712
/* End XCConfigurationList section */
713+
714+
/* Begin XCLocalSwiftPackageReference section */
715+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
716+
isa = XCLocalSwiftPackageReference;
717+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
718+
};
719+
/* End XCLocalSwiftPackageReference section */
720+
721+
/* Begin XCSwiftPackageProductDependency section */
722+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
723+
isa = XCSwiftPackageProductDependency;
724+
productName = FlutterGeneratedPluginSwiftPackage;
725+
};
726+
/* End XCSwiftPackageProductDependency section */
703727
};
704728
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
705729
}

colorist/step_01/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<PreActions>
9+
<ExecutionAction
10+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
11+
<ActionContent
12+
title = "Run Prepare Flutter Framework Script"
13+
scriptText = "&quot;$FLUTTER_ROOT&quot;/packages/flutter_tools/bin/macos_assemble.sh prepare&#10;">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
18+
BuildableName = "colorist.app"
19+
BlueprintName = "Runner"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</EnvironmentBuildable>
23+
</ActionContent>
24+
</ExecutionAction>
25+
</PreActions>
826
<BuildActionEntries>
927
<BuildActionEntry
1028
buildForTesting = "YES"

colorist/step_01/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ publish_to: 'none'
44
version: 0.1.0+1
55

66
environment:
7-
sdk: ^3.11.4
7+
sdk: ^3.12.0-0
88

99
dependencies:
1010
colorist_ui: ^0.4.0

colorist/step_01/windows/runner/utils.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) {
4545
if (utf16_string == nullptr) {
4646
return std::string();
4747
}
48-
unsigned int target_length = ::WideCharToMultiByte(
48+
// First, find the length of the string with a safe upper bound (CWE-126).
49+
// UNICODE_STRING_MAX_CHARS (32767) is the maximum length of a UNICODE_STRING.
50+
int input_length = static_cast<int>(wcsnlen(utf16_string, UNICODE_STRING_MAX_CHARS));
51+
// Now use that bounded length to determine the required buffer size.
52+
// When an explicit length is passed, WideCharToMultiByte does not include
53+
// the null terminator in its returned size.
54+
int target_length = ::WideCharToMultiByte(
4955
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50-
-1, nullptr, 0, nullptr, nullptr)
51-
-1; // remove the trailing null character
52-
int input_length = (int)wcslen(utf16_string);
56+
input_length, nullptr, 0, nullptr, nullptr);
5357
std::string utf8_string;
54-
if (target_length == 0 || target_length > utf8_string.max_size()) {
58+
if (target_length == 0 || static_cast<size_t>(target_length) > utf8_string.max_size()) {
5559
return utf8_string;
5660
}
5761
utf8_string.resize(target_length);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
3+
# This builtInKotlin flag was added automatically by Flutter migrator
4+
android.builtInKotlin=false
5+
# This newDsl flag was added automatically by Flutter migrator
6+
android.newDsl=false

0 commit comments

Comments
 (0)