From 9102cb465359d1e2c1c30243bbf527890f8201f8 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 5 Jan 2022 12:35:50 +1100 Subject: [PATCH] Update `federated_plugin` runners (#972) --- .../federated_plugin/.gitignore | 28 +++- .../federated_plugin/.metadata | 4 +- .../federated_plugin/android/build.gradle | 21 ++- .../android/gradle.properties | 4 - .../gradle/wrapper/gradle-wrapper.properties | 5 - .../federated_plugin/example/.gitignore | 6 +- .../federated_plugin/example/.metadata | 4 +- .../example/analysis_option.yaml | 19 --- .../example/analysis_options.yaml | 1 + .../example/android/.gitignore | 2 + .../example/android/app/build.gradle | 19 ++- .../android/app/src/main/AndroidManifest.xml | 19 +-- .../dev/flutter/example/MainActivity.kt | 6 + .../res/drawable-v21/launch_background.xml | 12 ++ .../app/src/main/res/values-night/styles.xml | 18 +++ .../app/src/main/res/values/styles.xml | 10 +- .../example/android/build.gradle | 6 +- .../example/android/gradle.properties | 1 - .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../federated_plugin/example/ios/.gitignore | 2 + .../ios/Flutter/AppFrameworkInfo.plist | 4 +- .../example/ios/Flutter/Debug.xcconfig | 2 +- .../example/ios/Flutter/Release.xcconfig | 2 +- .../federated_plugin/example/ios/Podfile.lock | 6 +- .../ios/Runner.xcodeproj/project.pbxproj | 109 ++++++--------- .../xcshareddata/xcschemes/Runner.xcscheme | 10 +- .../example/ios/Runner/Info.plist | 4 +- .../federated_plugin/example/lib/main.dart | 3 +- .../federated_plugin/example/macos/.gitignore | 1 + .../macos/Flutter/Flutter-Debug.xcconfig | 2 +- .../macos/Flutter/Flutter-Release.xcconfig | 2 +- .../federated_plugin/example/macos/Podfile | 76 +++------- .../example/macos/Podfile.lock | 20 +-- .../macos/Runner.xcodeproj/project.pbxproj | 74 +++++----- .../xcshareddata/xcschemes/Runner.xcscheme | 22 +-- .../macos/Runner/Configs/AppInfo.xcconfig | 2 +- .../federated_plugin/example/pubspec.lock | 4 +- .../federated_plugin/example/pubspec.yaml | 4 +- .../example/web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes .../example/web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes .../federated_plugin/example/web/index.html | 77 +++++++++- .../example/web/manifest.json | 12 ++ .../example/windows/CMakeLists.txt | 2 +- .../example/windows/flutter/.template_version | 1 - .../example/windows/flutter/CMakeLists.txt | 8 +- .../example/windows/runner/CMakeLists.txt | 5 +- .../example/windows/runner/Runner.rc | 51 +++++++ .../example/windows/runner/flutter_window.cpp | 43 ++++-- .../example/windows/runner/flutter_window.h | 22 ++- .../example/windows/runner/main.cpp | 24 ++-- .../example/windows/runner/run_loop.cpp | 70 ---------- .../example/windows/runner/run_loop.h | 40 ------ .../example/windows/runner/utils.cpp | 42 ++++++ .../example/windows/runner/utils.h | 17 ++- .../example/windows/runner/win32_window.cpp | 27 ++-- .../example/windows/runner/win32_window.h | 12 +- .../windows/runner/window_configuration.cpp | 7 - .../windows/runner/window_configuration.h | 18 --- .../federated_plugin/ios/.gitignore | 1 + .../ios/federated_plugin.podspec | 8 +- .../macos/federated_plugin.podspec | 22 --- .../federated_plugin/pubspec.lock | 4 +- .../federated_plugin/pubspec.yaml | 6 +- .../federated_plugin_macos/.gitignore | 28 +++- .../federated_plugin_macos/.metadata | 4 +- .../Classes/FederatedPluginMacosPlugin.swift | 24 ++-- .../macos/federated_plugin_macos.podspec | 2 +- .../federated_plugin_macos/pubspec.lock | 4 +- .../federated_plugin_macos/pubspec.yaml | 6 +- .../.gitignore | 50 +------ .../.metadata | 4 +- .../pubspec.lock | 2 +- .../pubspec.yaml | 5 +- .../federated_plugin_windows/.gitignore | 28 +++- .../federated_plugin_windows/.metadata | 4 +- .../federated_plugin_windows/pubspec.lock | 4 +- .../federated_plugin_windows/pubspec.yaml | 5 +- .../windows/CMakeLists.txt | 8 +- .../federated_plugin_windows_plugin.cpp | 132 +++++++++--------- 79 files changed, 678 insertions(+), 687 deletions(-) delete mode 100644 experimental/federated_plugin/federated_plugin/android/gradle.properties delete mode 100644 experimental/federated_plugin/federated_plugin/android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 experimental/federated_plugin/federated_plugin/example/analysis_option.yaml create mode 100644 experimental/federated_plugin/federated_plugin/example/analysis_options.yaml create mode 100644 experimental/federated_plugin/federated_plugin/example/android/app/src/main/kotlin/dev/flutter/example/MainActivity.kt create mode 100644 experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/values-night/styles.xml create mode 100644 experimental/federated_plugin/federated_plugin/example/web/icons/Icon-maskable-192.png create mode 100644 experimental/federated_plugin/federated_plugin/example/web/icons/Icon-maskable-512.png delete mode 100644 experimental/federated_plugin/federated_plugin/example/windows/flutter/.template_version delete mode 100644 experimental/federated_plugin/federated_plugin/example/windows/runner/run_loop.cpp delete mode 100644 experimental/federated_plugin/federated_plugin/example/windows/runner/run_loop.h delete mode 100644 experimental/federated_plugin/federated_plugin/example/windows/runner/window_configuration.cpp delete mode 100644 experimental/federated_plugin/federated_plugin/example/windows/runner/window_configuration.h delete mode 100644 experimental/federated_plugin/federated_plugin/macos/federated_plugin.podspec diff --git a/experimental/federated_plugin/federated_plugin/.gitignore b/experimental/federated_plugin/federated_plugin/.gitignore index e9dc58d3d..9be145fde 100644 --- a/experimental/federated_plugin/federated_plugin/.gitignore +++ b/experimental/federated_plugin/federated_plugin/.gitignore @@ -1,7 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp .DS_Store -.dart_tool/ +.atom/ +.buildlog/ +.history +.svn/ -.packages -.pub/ +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages build/ diff --git a/experimental/federated_plugin/federated_plugin/.metadata b/experimental/federated_plugin/federated_plugin/.metadata index 9b7fcfd8e..8c15ad72b 100644 --- a/experimental/federated_plugin/federated_plugin/.metadata +++ b/experimental/federated_plugin/federated_plugin/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: 8bd2e6585b0eda5ccdc10c1e1d35105e11f84424 - channel: master + revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b + channel: stable project_type: plugin diff --git a/experimental/federated_plugin/federated_plugin/android/build.gradle b/experimental/federated_plugin/federated_plugin/android/build.gradle index 8c6bee886..4e6d92440 100644 --- a/experimental/federated_plugin/federated_plugin/android/build.gradle +++ b/experimental/federated_plugin/federated_plugin/android/build.gradle @@ -5,11 +5,11 @@ buildscript { ext.kotlin_version = '1.3.50' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -17,7 +17,7 @@ buildscript { rootProject.allprojects { repositories { google() - jcenter() + mavenCentral() } } @@ -25,17 +25,24 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 29 + compileSdkVersion 30 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } sourceSets { main.java.srcDirs += 'src/main/kotlin' } + defaultConfig { minSdkVersion 16 } - lintOptions { - disable 'InvalidPackage' - } } dependencies { diff --git a/experimental/federated_plugin/federated_plugin/android/gradle.properties b/experimental/federated_plugin/federated_plugin/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/experimental/federated_plugin/federated_plugin/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/experimental/federated_plugin/federated_plugin/android/gradle/wrapper/gradle-wrapper.properties b/experimental/federated_plugin/federated_plugin/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 01a286e96..000000000 --- a/experimental/federated_plugin/federated_plugin/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/experimental/federated_plugin/federated_plugin/example/.gitignore b/experimental/federated_plugin/federated_plugin/example/.gitignore index f3c205341..0fa6b675c 100644 --- a/experimental/federated_plugin/federated_plugin/example/.gitignore +++ b/experimental/federated_plugin/federated_plugin/example/.gitignore @@ -40,5 +40,7 @@ app.*.symbols # Obfuscation related app.*.map.json -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/experimental/federated_plugin/federated_plugin/example/.metadata b/experimental/federated_plugin/federated_plugin/example/.metadata index 89abcc96b..fd70cabc0 100644 --- a/experimental/federated_plugin/federated_plugin/example/.metadata +++ b/experimental/federated_plugin/federated_plugin/example/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: 8bd2e6585b0eda5ccdc10c1e1d35105e11f84424 - channel: master + revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b + channel: stable project_type: app diff --git a/experimental/federated_plugin/federated_plugin/example/analysis_option.yaml b/experimental/federated_plugin/federated_plugin/example/analysis_option.yaml deleted file mode 100644 index 85f6fbe91..000000000 --- a/experimental/federated_plugin/federated_plugin/example/analysis_option.yaml +++ /dev/null @@ -1,19 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -analyzer: - strong-mode: - implicit-casts: false - implicit-dynamic: false - -linter: - rules: - avoid_types_on_closure_parameters: true - avoid_void_async: true - cancel_subscriptions: true - close_sinks: true - directives_ordering: true - package_api_docs: true - package_prefixed_library_names: true - test_types_in_equals: true - throw_in_finally: true - unnecessary_statements: true diff --git a/experimental/federated_plugin/federated_plugin/example/analysis_options.yaml b/experimental/federated_plugin/federated_plugin/example/analysis_options.yaml new file mode 100644 index 000000000..ec0637968 --- /dev/null +++ b/experimental/federated_plugin/federated_plugin/example/analysis_options.yaml @@ -0,0 +1 @@ +include: ../../../../analysis_options.yaml diff --git a/experimental/federated_plugin/federated_plugin/example/android/.gitignore b/experimental/federated_plugin/federated_plugin/example/android/.gitignore index 0a741cb43..6f568019d 100644 --- a/experimental/federated_plugin/federated_plugin/example/android/.gitignore +++ b/experimental/federated_plugin/federated_plugin/example/android/.gitignore @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties +**/*.keystore +**/*.jks diff --git a/experimental/federated_plugin/federated_plugin/example/android/app/build.gradle b/experimental/federated_plugin/federated_plugin/example/android/app/build.gradle index ed208941b..48b36eca4 100644 --- a/experimental/federated_plugin/federated_plugin/example/android/app/build.gradle +++ b/experimental/federated_plugin/federated_plugin/example/android/app/build.gradle @@ -26,21 +26,26 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 29 + compileSdkVersion flutter.compileSdkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' } - lintOptions { - disable 'InvalidPackage' + sourceSets { + main.java.srcDirs += 'src/main/kotlin' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "dev.flutter.federated_plugin_example" - minSdkVersion 16 - targetSdkVersion 29 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/experimental/federated_plugin/federated_plugin/example/android/app/src/main/AndroidManifest.xml b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/AndroidManifest.xml index 593e5a3d8..887b665d6 100644 --- a/experimental/federated_plugin/federated_plugin/example/android/app/src/main/AndroidManifest.xml +++ b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/AndroidManifest.xml @@ -1,16 +1,12 @@ - - - - diff --git a/experimental/federated_plugin/federated_plugin/example/android/app/src/main/kotlin/dev/flutter/example/MainActivity.kt b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/kotlin/dev/flutter/example/MainActivity.kt new file mode 100644 index 000000000..d37e09f4e --- /dev/null +++ b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/kotlin/dev/flutter/example/MainActivity.kt @@ -0,0 +1,6 @@ +package dev.flutter.example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/drawable-v21/launch_background.xml b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/values-night/styles.xml b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..3db14bb53 --- /dev/null +++ b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/values/styles.xml b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/values/styles.xml index 1f83a33fd..d460d1e92 100644 --- a/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/values/styles.xml +++ b/experimental/federated_plugin/federated_plugin/example/android/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ - - diff --git a/experimental/federated_plugin/federated_plugin/example/android/build.gradle b/experimental/federated_plugin/federated_plugin/example/android/build.gradle index 3100ad2d5..24047dce5 100644 --- a/experimental/federated_plugin/federated_plugin/example/android/build.gradle +++ b/experimental/federated_plugin/federated_plugin/example/android/build.gradle @@ -2,11 +2,11 @@ buildscript { ext.kotlin_version = '1.3.50' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -14,7 +14,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/experimental/federated_plugin/federated_plugin/example/android/gradle.properties b/experimental/federated_plugin/federated_plugin/example/android/gradle.properties index 38c8d4544..94adc3a3f 100644 --- a/experimental/federated_plugin/federated_plugin/example/android/gradle.properties +++ b/experimental/federated_plugin/federated_plugin/example/android/gradle.properties @@ -1,4 +1,3 @@ org.gradle.jvmargs=-Xmx1536M -android.enableR8=true android.useAndroidX=true android.enableJetifier=true diff --git a/experimental/federated_plugin/federated_plugin/example/android/gradle/wrapper/gradle-wrapper.properties b/experimental/federated_plugin/federated_plugin/example/android/gradle/wrapper/gradle-wrapper.properties index 296b146b7..bc6a58afd 100644 --- a/experimental/federated_plugin/federated_plugin/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/experimental/federated_plugin/federated_plugin/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/experimental/federated_plugin/federated_plugin/example/ios/.gitignore b/experimental/federated_plugin/federated_plugin/example/ios/.gitignore index e96ef602b..7a7f9873a 100644 --- a/experimental/federated_plugin/federated_plugin/example/ios/.gitignore +++ b/experimental/federated_plugin/federated_plugin/example/ios/.gitignore @@ -1,3 +1,4 @@ +**/dgph *.mode1v3 *.mode2v3 *.moved-aside @@ -18,6 +19,7 @@ Flutter/App.framework Flutter/Flutter.framework Flutter/Flutter.podspec Flutter/Generated.xcconfig +Flutter/ephemeral/ Flutter/app.flx Flutter/app.zip Flutter/flutter_assets/ diff --git a/experimental/federated_plugin/federated_plugin/example/ios/Flutter/AppFrameworkInfo.plist b/experimental/federated_plugin/federated_plugin/example/ios/Flutter/AppFrameworkInfo.plist index 6b4c0f78a..8d4492f97 100644 --- a/experimental/federated_plugin/federated_plugin/example/ios/Flutter/AppFrameworkInfo.plist +++ b/experimental/federated_plugin/federated_plugin/example/ios/Flutter/AppFrameworkInfo.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) + en CFBundleExecutable App CFBundleIdentifier @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 9.0 diff --git a/experimental/federated_plugin/federated_plugin/example/ios/Flutter/Debug.xcconfig b/experimental/federated_plugin/federated_plugin/example/ios/Flutter/Debug.xcconfig index e8efba114..ec97fc6f3 100644 --- a/experimental/federated_plugin/federated_plugin/example/ios/Flutter/Debug.xcconfig +++ b/experimental/federated_plugin/federated_plugin/example/ios/Flutter/Debug.xcconfig @@ -1,2 +1,2 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/experimental/federated_plugin/federated_plugin/example/ios/Flutter/Release.xcconfig b/experimental/federated_plugin/federated_plugin/example/ios/Flutter/Release.xcconfig index 399e9340e..c4855bfe2 100644 --- a/experimental/federated_plugin/federated_plugin/example/ios/Flutter/Release.xcconfig +++ b/experimental/federated_plugin/federated_plugin/example/ios/Flutter/Release.xcconfig @@ -1,2 +1,2 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/experimental/federated_plugin/federated_plugin/example/ios/Podfile.lock b/experimental/federated_plugin/federated_plugin/example/ios/Podfile.lock index c532d8f71..22effeb50 100644 --- a/experimental/federated_plugin/federated_plugin/example/ios/Podfile.lock +++ b/experimental/federated_plugin/federated_plugin/example/ios/Podfile.lock @@ -14,9 +14,9 @@ EXTERNAL SOURCES: :path: Flutter SPEC CHECKSUMS: - federated_plugin: 12a8f1fe5aa96bc5b2b269d9235c451f9c95f81c - Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c + federated_plugin: fc73b9de221f57591994d50fb41640ad2eb12913 + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.2 diff --git a/experimental/federated_plugin/federated_plugin/example/ios/Runner.xcodeproj/project.pbxproj b/experimental/federated_plugin/federated_plugin/example/ios/Runner.xcodeproj/project.pbxproj index a9ac86222..8bae94179 100644 --- a/experimental/federated_plugin/federated_plugin/example/ios/Runner.xcodeproj/project.pbxproj +++ b/experimental/federated_plugin/federated_plugin/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,17 +3,17 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ + 05F5AA9A8918E7054FF69BBB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30D3D9621395C516E82FBA97 /* Pods_Runner.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - A47C000D7072F6A7A499FB29 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7536F8257D235276CE3A527 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -32,9 +32,10 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 217DA540860353FA4C0E151D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 30D3D9621395C516E82FBA97 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 42D98D474675B14C809D6443 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 447027611B96046137396C04 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 66FD4F9678EE12C6021DDC4C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -45,8 +46,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DFD15D4294C1785E0EC49B0B /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - F7536F8257D235276CE3A527 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AE02D38AA281AD19B3FBAE7B /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -54,20 +54,29 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A47C000D7072F6A7A499FB29 /* Pods_Runner.framework in Frameworks */, + 05F5AA9A8918E7054FF69BBB /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 80E1B6714824F06E7D871E4E /* Pods */ = { + 0F9960076300DD52FCCDCAC1 /* Frameworks */ = { isa = PBXGroup; children = ( - 217DA540860353FA4C0E151D /* Pods-Runner.debug.xcconfig */, - 42D98D474675B14C809D6443 /* Pods-Runner.release.xcconfig */, - DFD15D4294C1785E0EC49B0B /* Pods-Runner.profile.xcconfig */, + 30D3D9621395C516E82FBA97 /* Pods_Runner.framework */, ); + name = Frameworks; + sourceTree = ""; + }; + 44C3AAFD416E2CBFA5D43075 /* Pods */ = { + isa = PBXGroup; + children = ( + 447027611B96046137396C04 /* Pods-Runner.debug.xcconfig */, + 66FD4F9678EE12C6021DDC4C /* Pods-Runner.release.xcconfig */, + AE02D38AA281AD19B3FBAE7B /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; path = Pods; sourceTree = ""; }; @@ -88,8 +97,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 80E1B6714824F06E7D871E4E /* Pods */, - D78AD41449B0497CBE3328BB /* Frameworks */, + 44C3AAFD416E2CBFA5D43075 /* Pods */, + 0F9960076300DD52FCCDCAC1 /* Frameworks */, ); sourceTree = ""; }; @@ -116,14 +125,6 @@ path = Runner; sourceTree = ""; }; - D78AD41449B0497CBE3328BB /* Frameworks */ = { - isa = PBXGroup; - children = ( - F7536F8257D235276CE3A527 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -131,14 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 65BDD915934CEA518C93E8F8 /* [CP] Check Pods Manifest.lock */, + C01D951D1D8DEFCA6C06A108 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - A882175445FCE3E7393432B3 /* [CP] Embed Pods Frameworks */, + F9CBF189CFE3019A377CBAB3 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -155,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -211,43 +212,43 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 65BDD915934CEA518C93E8F8 /* [CP] Check Pods Manifest.lock */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( ); + name = "Run Script"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + C01D951D1D8DEFCA6C06A108 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "Run Script"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - A882175445FCE3E7393432B3 /* [CP] Embed Pods Frameworks */ = { + F9CBF189CFE3019A377CBAB3 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -339,7 +340,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -356,19 +357,11 @@ CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.federatedPluginExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -424,7 +417,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -473,7 +466,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -492,19 +485,11 @@ CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.federatedPluginExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -522,19 +507,11 @@ CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.federatedPluginExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/experimental/federated_plugin/federated_plugin/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/experimental/federated_plugin/federated_plugin/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a28140cfd..c87d15a33 100644 --- a/experimental/federated_plugin/federated_plugin/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/experimental/federated_plugin/federated_plugin/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Federated Plugin CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -40,6 +42,6 @@ UIInterfaceOrientationLandscapeRight UIViewControllerBasedStatusBarAppearance - + diff --git a/experimental/federated_plugin/federated_plugin/example/lib/main.dart b/experimental/federated_plugin/federated_plugin/example/lib/main.dart index 79c2706aa..cbf41b3d0 100644 --- a/experimental/federated_plugin/federated_plugin/example/lib/main.dart +++ b/experimental/federated_plugin/federated_plugin/example/lib/main.dart @@ -4,7 +4,6 @@ import 'package:federated_plugin/federated_plugin.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; void main() { runApp(const MyApp()); @@ -62,7 +61,7 @@ class _HomePageState extends State { SnackBar( backgroundColor: Theme.of(context).primaryColor, content: Text( - (error as PlatformException).message as String, + (error as dynamic).message as String, ), ), ); diff --git a/experimental/federated_plugin/federated_plugin/example/macos/.gitignore b/experimental/federated_plugin/federated_plugin/example/macos/.gitignore index d2fd37723..746adbb6b 100644 --- a/experimental/federated_plugin/federated_plugin/example/macos/.gitignore +++ b/experimental/federated_plugin/federated_plugin/example/macos/.gitignore @@ -3,4 +3,5 @@ **/Pods/ # Xcode-related +**/dgph **/xcuserdata/ diff --git a/experimental/federated_plugin/federated_plugin/example/macos/Flutter/Flutter-Debug.xcconfig b/experimental/federated_plugin/federated_plugin/example/macos/Flutter/Flutter-Debug.xcconfig index 785633d3a..4b81f9b2d 100644 --- a/experimental/federated_plugin/federated_plugin/example/macos/Flutter/Flutter-Debug.xcconfig +++ b/experimental/federated_plugin/federated_plugin/example/macos/Flutter/Flutter-Debug.xcconfig @@ -1,2 +1,2 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/experimental/federated_plugin/federated_plugin/example/macos/Flutter/Flutter-Release.xcconfig b/experimental/federated_plugin/federated_plugin/example/macos/Flutter/Flutter-Release.xcconfig index 5fba960c3..5caa9d157 100644 --- a/experimental/federated_plugin/federated_plugin/example/macos/Flutter/Flutter-Release.xcconfig +++ b/experimental/federated_plugin/federated_plugin/example/macos/Flutter/Flutter-Release.xcconfig @@ -1,2 +1,2 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/experimental/federated_plugin/federated_plugin/example/macos/Podfile b/experimental/federated_plugin/federated_plugin/example/macos/Podfile index d60ec7102..dade8dfad 100644 --- a/experimental/federated_plugin/federated_plugin/example/macos/Podfile +++ b/experimental/federated_plugin/federated_plugin/example/macos/Podfile @@ -9,74 +9,32 @@ project 'Runner', { 'Release' => :release, } -def parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" end - pods_ary = [] - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) { |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - pods_ary.push({:name => podname, :path => podpath}); - else - puts "Invalid plugin specification: #{line}" - end - } - return pods_ary -end -def pubspec_supports_macos(file) - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return false; + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches end - File.foreach(file_abs_path) { |line| - return true if line =~ /^\s*macos:/ - } - return false + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" end +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + target 'Runner' do use_frameworks! use_modular_headers! - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - ephemeral_dir = File.join('Flutter', 'ephemeral') - symlink_dir = File.join(ephemeral_dir, '.symlinks') - symlink_plugins_dir = File.join(symlink_dir, 'plugins') - system("rm -rf #{symlink_dir}") - system("mkdir -p #{symlink_plugins_dir}") + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) +end - # Flutter Pods - generated_xcconfig = parse_KV_file(File.join(ephemeral_dir, 'Flutter-Generated.xcconfig')) - if generated_xcconfig.empty? - puts "Flutter-Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) end - generated_xcconfig.map { |p| - if p[:name] == 'FLUTTER_FRAMEWORK_DIR' - symlink = File.join(symlink_dir, 'flutter') - File.symlink(File.dirname(p[:path]), symlink) - pod 'FlutterMacOS', :path => File.join(symlink, File.basename(p[:path])) - end - } - - # Plugin Pods - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.map { |p| - symlink = File.join(symlink_plugins_dir, p[:name]) - File.symlink(p[:path], symlink) - if pubspec_supports_macos(File.join(symlink, 'pubspec.yaml')) - pod p[:name], :path => File.join(symlink, 'macos') - end - } end - -# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. -install! 'cocoapods', :disable_input_output_paths => true diff --git a/experimental/federated_plugin/federated_plugin/example/macos/Podfile.lock b/experimental/federated_plugin/federated_plugin/example/macos/Podfile.lock index 8da565b55..e496ef7bf 100644 --- a/experimental/federated_plugin/federated_plugin/example/macos/Podfile.lock +++ b/experimental/federated_plugin/federated_plugin/example/macos/Podfile.lock @@ -1,28 +1,22 @@ PODS: - - federated_plugin (0.0.1) - federated_plugin_macos (0.0.1): - FlutterMacOS - - FlutterMacOS (1.22.4) + - FlutterMacOS (1.0.0) DEPENDENCIES: - - federated_plugin (from `Flutter/ephemeral/.symlinks/plugins/federated_plugin/macos`) - federated_plugin_macos (from `Flutter/ephemeral/.symlinks/plugins/federated_plugin_macos/macos`) - -SPEC REPOS: - trunk: - - FlutterMacOS + - FlutterMacOS (from `Flutter/ephemeral`) EXTERNAL SOURCES: - federated_plugin: - :path: Flutter/ephemeral/.symlinks/plugins/federated_plugin/macos federated_plugin_macos: :path: Flutter/ephemeral/.symlinks/plugins/federated_plugin_macos/macos + FlutterMacOS: + :path: Flutter/ephemeral SPEC CHECKSUMS: - federated_plugin: ddb135b88798bdd6a14f08e47513e2f53d8a071f federated_plugin_macos: 17ae257684352ae643c3cec850b1299c3b6c5856 - FlutterMacOS: ac210ef71944b3f04789076d70d4c72c7ec0c619 + FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424 -PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7 +PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.2 diff --git a/experimental/federated_plugin/federated_plugin/example/macos/Runner.xcodeproj/project.pbxproj b/experimental/federated_plugin/federated_plugin/example/macos/Runner.xcodeproj/project.pbxproj index 725e4aa91..659aec35e 100644 --- a/experimental/federated_plugin/federated_plugin/example/macos/Runner.xcodeproj/project.pbxproj +++ b/experimental/federated_plugin/federated_plugin/example/macos/Runner.xcodeproj/project.pbxproj @@ -26,7 +26,7 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 47796B1C617BAF38A683577D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37322EA86C018604F821EB67 /* Pods_Runner.framework */; }; + C58C13458B8C1F1C0B003A42 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B52B3AE71320C78F7034ECA8 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -53,6 +53,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 1671D9D3B0356EFB54861951 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -67,12 +68,11 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 37322EA86C018604F821EB67 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 75866A6802D64013BD50C0C3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 45FDBBDD4581EECA19893003 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 95D776C260DC27380B0B7FF5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 8FC351F79983970A66307AC9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - F94C86E819C6C98647AEE1BB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + B52B3AE71320C78F7034ECA8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -80,19 +80,19 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 47796B1C617BAF38A683577D /* Pods_Runner.framework in Frameworks */, + C58C13458B8C1F1C0B003A42 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 25E8CE61079956DF835028F5 /* Pods */ = { + 2B77B711C096CBDA06689A67 /* Pods */ = { isa = PBXGroup; children = ( - 95D776C260DC27380B0B7FF5 /* Pods-Runner.debug.xcconfig */, - F94C86E819C6C98647AEE1BB /* Pods-Runner.release.xcconfig */, - 75866A6802D64013BD50C0C3 /* Pods-Runner.profile.xcconfig */, + 45FDBBDD4581EECA19893003 /* Pods-Runner.debug.xcconfig */, + 8FC351F79983970A66307AC9 /* Pods-Runner.release.xcconfig */, + 1671D9D3B0356EFB54861951 /* Pods-Runner.profile.xcconfig */, ); name = Pods; path = Pods; @@ -116,7 +116,7 @@ 33CEB47122A05771004F2AC0 /* Flutter */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, - 25E8CE61079956DF835028F5 /* Pods */, + 2B77B711C096CBDA06689A67 /* Pods */, ); sourceTree = ""; }; @@ -166,7 +166,7 @@ D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( - 37322EA86C018604F821EB67 /* Pods_Runner.framework */, + B52B3AE71320C78F7034ECA8 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -178,13 +178,13 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 421A3650E9F8E9FBF024663E /* [CP] Check Pods Manifest.lock */, + C6FC087C0C366A8D70EA0FE7 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, - ACBE3F9E00F074B1CF0269B9 /* [CP] Embed Pods Frameworks */, + 50A44A481605D096E0AB4045 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -203,8 +203,8 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = "The Flutter Authors"; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { CreatedOnToolsVersion = 9.2; @@ -223,7 +223,7 @@ }; }; buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 8.0"; + compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -291,41 +291,43 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - 421A3650E9F8E9FBF024663E /* [CP] Check Pods Manifest.lock */ = { + 50A44A481605D096E0AB4045 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - ACBE3F9E00F074B1CF0269B9 /* [CP] Embed Pods Frameworks */ = { + C6FC087C0C366A8D70EA0FE7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -419,10 +421,6 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter/ephemeral", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -549,10 +547,6 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter/ephemeral", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -573,10 +567,6 @@ CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter/ephemeral", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/experimental/federated_plugin/federated_plugin/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/experimental/federated_plugin/federated_plugin/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index df12c333e..fb7259e17 100644 --- a/experimental/federated_plugin/federated_plugin/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/experimental/federated_plugin/federated_plugin/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - + + - - =2.14.0 <3.0.0" - flutter: ">=1.20.0" + dart: ">=2.15.1 <3.0.0" + flutter: ">=2.5.0" diff --git a/experimental/federated_plugin/federated_plugin/example/pubspec.yaml b/experimental/federated_plugin/federated_plugin/example/pubspec.yaml index efc056523..44f7caeab 100644 --- a/experimental/federated_plugin/federated_plugin/example/pubspec.yaml +++ b/experimental/federated_plugin/federated_plugin/example/pubspec.yaml @@ -1,10 +1,10 @@ name: federated_plugin_example description: Demonstrates how to use the federated_plugin plugin. -publish_to: "none" # Remove this line if you wish to publish to pub.dev +publish_to: 'none' # Remove this line if you wish to publish to pub.dev environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.15.1 <3.0.0" dependencies: flutter: diff --git a/experimental/federated_plugin/federated_plugin/example/web/icons/Icon-maskable-192.png b/experimental/federated_plugin/federated_plugin/example/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9b4d76e525556d5d89141648c724331630325d GIT binary patch literal 5594 zcmdT|`#%%j|KDb2V@0DPm$^(Lx5}lO%Yv(=e*7hl@QqKS50#~#^IQPxBmuh|i9sXnt4ch@VT0F7% zMtrs@KWIOo+QV@lSs66A>2pz6-`9Jk=0vv&u?)^F@HZ)-6HT=B7LF;rdj zskUyBfbojcX#CS>WrIWo9D=DIwcXM8=I5D{SGf$~=gh-$LwY?*)cD%38%sCc?5OsX z-XfkyL-1`VavZ?>(pI-x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7u64;KmFJ#POzdG#np~F&H ze-BUh@g54)dsS%nkBb}+GuUEKU~pHcYIg4vSo$J(J|U36bs0Use+3A&IMcR%6@jv$ z=+QI+@wW@?iu}Hpyzlvj-EYeop{f65GX0O%>w#0t|V z1-svWk`hU~m`|O$kw5?Yn5UhI%9P-<45A(v0ld1n+%Ziq&TVpBcV9n}L9Tus-TI)f zd_(g+nYCDR@+wYNQm1GwxhUN4tGMLCzDzPqY$~`l<47{+l<{FZ$L6(>J)|}!bi<)| zE35dl{a2)&leQ@LlDxLQOfUDS`;+ZQ4ozrleQwaR-K|@9T{#hB5Z^t#8 zC-d_G;B4;F#8A2EBL58s$zF-=SCr`P#z zNCTnHF&|X@q>SkAoYu>&s9v@zCpv9lLSH-UZzfhJh`EZA{X#%nqw@@aW^vPcfQrlPs(qQxmC|4tp^&sHy!H!2FH5eC{M@g;ElWNzlb-+ zxpfc0m4<}L){4|RZ>KReag2j%Ot_UKkgpJN!7Y_y3;Ssz{9 z!K3isRtaFtQII5^6}cm9RZd5nTp9psk&u1C(BY`(_tolBwzV_@0F*m%3G%Y?2utyS zY`xM0iDRT)yTyYukFeGQ&W@ReM+ADG1xu@ruq&^GK35`+2r}b^V!m1(VgH|QhIPDE X>c!)3PgKfL&lX^$Z>Cpu&6)6jvi^Z! literal 0 HcmV?d00001 diff --git a/experimental/federated_plugin/federated_plugin/example/web/icons/Icon-maskable-512.png b/experimental/federated_plugin/federated_plugin/example/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000000000000000000000000000000000..d69c56691fbdb0b7efa65097c7cc1edac12a6d3e GIT binary patch literal 20998 zcmeFZ_gj-)&^4Nb2tlbLMU<{!p(#yjqEe+=0IA_oih%ScH9@5#MNp&}Y#;;(h=A0@ zh7{>lT2MkSQ344eAvrhici!td|HJuyvJm#Y_w1Q9Yu3!26dNlO-oxUDK_C#XnW^Co z5C{VN6#{~B0)K2j7}*1Xq(Nqemv23A-6&=ZpEijkVnSwVGqLv40?n0=p;k3-U5e5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ed(3(3kS|IZ)CM? zJdnW&%t8MveBuK21uiYj)_a{Fnw0OErMzMN?d$QoPwkhOwcP&p+t>P)4tHlYw-pPN z^oJ=uc$Sl>pv@fZH~ZqxSvdhF@F1s=oZawpr^-#l{IIOGG=T%QXjtwPhIg-F@k@uIlr?J->Ia zpEUQ*=4g|XYn4Gez&aHr*;t$u3oODPmc2Ku)2Og|xjc%w;q!Zz+zY)*3{7V8bK4;& zYV82FZ+8?v)`J|G1w4I0fWdKg|2b#iaazCv;|?(W-q}$o&Y}Q5d@BRk^jL7#{kbCK zSgkyu;=DV+or2)AxCBgq-nj5=@n^`%T#V+xBGEkW4lCqrE)LMv#f;AvD__cQ@Eg3`~x| zW+h9mofSXCq5|M)9|ez(#X?-sxB%Go8};sJ?2abp(Y!lyi>k)|{M*Z$c{e1-K4ky` MPgg&ebxsLQ025IeI{*Lx literal 0 HcmV?d00001 diff --git a/experimental/federated_plugin/federated_plugin/example/web/index.html b/experimental/federated_plugin/federated_plugin/example/web/index.html index 9b7a438f8..b6b9dd234 100644 --- a/experimental/federated_plugin/federated_plugin/example/web/index.html +++ b/experimental/federated_plugin/federated_plugin/example/web/index.html @@ -1,6 +1,21 @@ + + + @@ -12,7 +27,7 @@ - + example @@ -22,12 +37,68 @@ application. For more information, see: https://developers.google.com/web/fundamentals/primers/service-workers --> - diff --git a/experimental/federated_plugin/federated_plugin/example/web/manifest.json b/experimental/federated_plugin/federated_plugin/example/web/manifest.json index 8c012917d..096edf8fe 100644 --- a/experimental/federated_plugin/federated_plugin/example/web/manifest.json +++ b/experimental/federated_plugin/federated_plugin/example/web/manifest.json @@ -18,6 +18,18 @@ "src": "icons/Icon-512.png", "sizes": "512x512", "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" } ] } diff --git a/experimental/federated_plugin/federated_plugin/example/windows/CMakeLists.txt b/experimental/federated_plugin/federated_plugin/example/windows/CMakeLists.txt index abf90408e..1633297a0 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/CMakeLists.txt +++ b/experimental/federated_plugin/federated_plugin/example/windows/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.14) project(example LANGUAGES CXX) set(BINARY_NAME "example") diff --git a/experimental/federated_plugin/federated_plugin/example/windows/flutter/.template_version b/experimental/federated_plugin/federated_plugin/example/windows/flutter/.template_version deleted file mode 100644 index 7ed6ff82d..000000000 --- a/experimental/federated_plugin/federated_plugin/example/windows/flutter/.template_version +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/experimental/federated_plugin/federated_plugin/example/windows/flutter/CMakeLists.txt b/experimental/federated_plugin/federated_plugin/example/windows/flutter/CMakeLists.txt index ff47d3274..b2e4bd8d6 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/flutter/CMakeLists.txt +++ b/experimental/federated_plugin/federated_plugin/example/windows/flutter/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.14) set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") @@ -23,6 +23,7 @@ list(APPEND FLUTTER_LIBRARY_HEADERS "flutter_windows.h" "flutter_messenger.h" "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" ) list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") add_library(flutter INTERFACE) @@ -34,8 +35,8 @@ add_dependencies(flutter flutter_assemble) # === Wrapper === list(APPEND CPP_WRAPPER_SOURCES_CORE - "engine_method_result.cc" - "standard_codec.cc" + "core_implementations.cc" + "standard_codec.cc" ) list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") list(APPEND CPP_WRAPPER_SOURCES_PLUGIN @@ -91,6 +92,7 @@ add_custom_command( ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" windows-x64 $ + VERBATIM ) add_custom_target(flutter_assemble DEPENDS "${FLUTTER_LIBRARY}" diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/CMakeLists.txt b/experimental/federated_plugin/federated_plugin/example/windows/runner/CMakeLists.txt index 83e5acaac..de2d8916b 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/CMakeLists.txt +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/CMakeLists.txt @@ -1,18 +1,17 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.14) project(runner LANGUAGES CXX) add_executable(${BINARY_NAME} WIN32 "flutter_window.cpp" "main.cpp" - "run_loop.cpp" "utils.cpp" "win32_window.cpp" - "window_configuration.cpp" "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" "Runner.rc" "runner.exe.manifest" ) apply_standard_settings(${BINARY_NAME}) +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/Runner.rc b/experimental/federated_plugin/federated_plugin/example/windows/runner/Runner.rc index 5b41a82a4..52ef87bfa 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/Runner.rc +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/Runner.rc @@ -54,6 +54,57 @@ END // remains consistent on all systems. IDI_APP_ICON ICON "resources\\app_icon.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#ifdef FLUTTER_BUILD_NUMBER +#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER +#else +#define VERSION_AS_NUMBER 1,0,0 +#endif + +#ifdef FLUTTER_BUILD_NAME +#define VERSION_AS_STRING #FLUTTER_BUILD_NAME +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "dev.flutter" "\0" + VALUE "FileDescription", "A new Flutter project." "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "example" "\0" + VALUE "LegalCopyright", "Copyright (C) 2022 dev.flutter. All rights reserved." "\0" + VALUE "OriginalFilename", "example.exe" "\0" + VALUE "ProductName", "example" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/flutter_window.cpp b/experimental/federated_plugin/federated_plugin/example/windows/runner/flutter_window.cpp index f3661dc7a..b43b9095e 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/flutter_window.cpp +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/flutter_window.cpp @@ -1,10 +1,11 @@ #include "flutter_window.h" +#include + #include "flutter/generated_plugin_registrant.h" -FlutterWindow::FlutterWindow(RunLoop* run_loop, - const flutter::DartProject& project) - : run_loop_(run_loop), project_(project) {} +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} FlutterWindow::~FlutterWindow() {} @@ -13,24 +14,48 @@ bool FlutterWindow::OnCreate() { return false; } - // The size here is arbitrary since SetChildContent will resize it. - flutter_controller_ = - std::make_unique(100, 100, project_); + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); // Ensure that basic setup of the controller was successful. if (!flutter_controller_->engine() || !flutter_controller_->view()) { return false; } - RegisterPlugins(flutter_controller_.get()); - run_loop_->RegisterFlutterInstance(flutter_controller_.get()); + RegisterPlugins(flutter_controller_->engine()); SetChildContent(flutter_controller_->view()->GetNativeWindow()); return true; } void FlutterWindow::OnDestroy() { if (flutter_controller_) { - run_loop_->UnregisterFlutterInstance(flutter_controller_.get()); flutter_controller_ = nullptr; } Win32Window::OnDestroy(); } + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/flutter_window.h b/experimental/federated_plugin/federated_plugin/example/windows/runner/flutter_window.h index 7f3162fee..6da0652f0 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/flutter_window.h +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/flutter_window.h @@ -1,32 +1,28 @@ -#ifndef FLUTTER_WINDOW_H_ -#define FLUTTER_WINDOW_H_ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ #include #include -#include "run_loop.h" -#include "win32_window.h" - #include +#include "win32_window.h" + // A window that does nothing but host a Flutter view. class FlutterWindow : public Win32Window { public: - // Creates a new FlutterWindow driven by the |run_loop|, hosting a - // Flutter view running |project|. - explicit FlutterWindow(RunLoop* run_loop, - const flutter::DartProject& project); + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); virtual ~FlutterWindow(); protected: // Win32Window: bool OnCreate() override; void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; private: - // The run loop driving events for this window. - RunLoop* run_loop_; - // The project to run. flutter::DartProject project_; @@ -34,4 +30,4 @@ class FlutterWindow : public Win32Window { std::unique_ptr flutter_controller_; }; -#endif // FLUTTER_WINDOW_H_ +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/main.cpp b/experimental/federated_plugin/federated_plugin/example/windows/runner/main.cpp index 11b48e957..bcb57b0e2 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/main.cpp +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/main.cpp @@ -3,9 +3,7 @@ #include #include "flutter_window.h" -#include "run_loop.h" #include "utils.h" -#include "window_configuration.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { @@ -19,18 +17,26 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, // plugins. ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - RunLoop run_loop; - flutter::DartProject project(L"data"); - FlutterWindow window(&run_loop, project); - Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY); - Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight); - if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) { + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.CreateAndShow(L"example", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); - run_loop.Run(); + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } ::CoUninitialize(); return EXIT_SUCCESS; diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/run_loop.cpp b/experimental/federated_plugin/federated_plugin/example/windows/runner/run_loop.cpp deleted file mode 100644 index f91d6d4cb..000000000 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/run_loop.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "run_loop.h" - -#include -// Don't stomp std::min/std::max -#undef max -#undef min - -#include - -RunLoop::RunLoop() {} - -RunLoop::~RunLoop() {} - -void RunLoop::Run() { - bool keep_running = true; - TimePoint next_flutter_event_time = TimePoint::clock::now(); - while (keep_running) { - std::chrono::nanoseconds wait_duration = - std::max(std::chrono::nanoseconds(0), - next_flutter_event_time - TimePoint::clock::now()); - ::MsgWaitForMultipleObjects( - 0, nullptr, FALSE, static_cast(wait_duration.count() / 1000), - QS_ALLINPUT); - bool processed_events = false; - MSG message; - // All pending Windows messages must be processed; MsgWaitForMultipleObjects - // won't return again for items left in the queue after PeekMessage. - while (::PeekMessage(&message, nullptr, 0, 0, PM_REMOVE)) { - processed_events = true; - if (message.message == WM_QUIT) { - keep_running = false; - break; - } - ::TranslateMessage(&message); - ::DispatchMessage(&message); - // Allow Flutter to process messages each time a Windows message is - // processed, to prevent starvation. - next_flutter_event_time = - std::min(next_flutter_event_time, ProcessFlutterMessages()); - } - // If the PeekMessage loop didn't run, process Flutter messages. - if (!processed_events) { - next_flutter_event_time = - std::min(next_flutter_event_time, ProcessFlutterMessages()); - } - } -} - -void RunLoop::RegisterFlutterInstance( - flutter::FlutterViewController* flutter_instance) { - flutter_instances_.insert(flutter_instance); -} - -void RunLoop::UnregisterFlutterInstance( - flutter::FlutterViewController* flutter_instance) { - flutter_instances_.erase(flutter_instance); -} - -RunLoop::TimePoint RunLoop::ProcessFlutterMessages() { - TimePoint next_event_time = TimePoint::max(); - for (auto flutter_controller : flutter_instances_) { - std::chrono::nanoseconds wait_duration = - flutter_controller->ProcessMessages(); - if (wait_duration != std::chrono::nanoseconds::max()) { - next_event_time = - std::min(next_event_time, TimePoint::clock::now() + wait_duration); - } - } - return next_event_time; -} diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/run_loop.h b/experimental/federated_plugin/federated_plugin/example/windows/runner/run_loop.h deleted file mode 100644 index 442a58e56..000000000 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/run_loop.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef RUN_LOOP_H_ -#define RUN_LOOP_H_ - -#include - -#include -#include - -// A runloop that will service events for Flutter instances as well -// as native messages. -class RunLoop { - public: - RunLoop(); - ~RunLoop(); - - // Prevent copying - RunLoop(RunLoop const&) = delete; - RunLoop& operator=(RunLoop const&) = delete; - - // Runs the run loop until the application quits. - void Run(); - - // Registers the given Flutter instance for event servicing. - void RegisterFlutterInstance( - flutter::FlutterViewController* flutter_instance); - - // Unregisters the given Flutter instance from event servicing. - void UnregisterFlutterInstance( - flutter::FlutterViewController* flutter_instance); - - private: - using TimePoint = std::chrono::steady_clock::time_point; - - // Processes all currently pending messages for registered Flutter instances. - TimePoint ProcessFlutterMessages(); - - std::set flutter_instances_; -}; - -#endif // RUN_LOOP_H_ diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/utils.cpp b/experimental/federated_plugin/federated_plugin/example/windows/runner/utils.cpp index 37501e5db..d19bdbbcc 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/utils.cpp +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/utils.cpp @@ -20,3 +20,45 @@ void CreateAndAttachConsole() { FlutterDesktopResyncOutputStreams(); } } + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr); + if (target_length == 0) { + return std::string(); + } + std::string utf8_string; + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, utf8_string.data(), + target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/utils.h b/experimental/federated_plugin/federated_plugin/example/windows/runner/utils.h index d247a6630..3879d5475 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/utils.h +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/utils.h @@ -1,8 +1,19 @@ -#ifndef CONSOLE_UTILS_H_ -#define CONSOLE_UTILS_H_ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include // Creates a console for the process, and redirects stdout and stderr to // it for both the runner and the Flutter library. void CreateAndAttachConsole(); -#endif // CONSOLE_UTILS_H_ +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/win32_window.cpp b/experimental/federated_plugin/federated_plugin/example/windows/runner/win32_window.cpp index e7607ef07..c10f08dc7 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/win32_window.cpp +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/win32_window.cpp @@ -154,13 +154,6 @@ Win32Window::MessageHandler(HWND hwnd, UINT const message, WPARAM const wparam, LPARAM const lparam) noexcept { - auto window = - reinterpret_cast(GetWindowLongPtr(hwnd, GWLP_USERDATA)); - - if (window == nullptr) { - return 0; - } - switch (message) { case WM_DESTROY: window_handle_ = nullptr; @@ -180,26 +173,21 @@ Win32Window::MessageHandler(HWND hwnd, return 0; } - case WM_SIZE: - RECT rect; - GetClientRect(hwnd, &rect); + case WM_SIZE: { + RECT rect = GetClientArea(); if (child_content_ != nullptr) { // Size and position the child window. MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, TRUE); } return 0; + } case WM_ACTIVATE: if (child_content_ != nullptr) { SetFocus(child_content_); } return 0; - - // Messages that are directly forwarded to embedding. - case WM_FONTCHANGE: - SendMessage(child_content_, WM_FONTCHANGE, NULL, NULL); - return 0; } return DefWindowProc(window_handle_, message, wparam, lparam); @@ -225,8 +213,7 @@ Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { void Win32Window::SetChildContent(HWND content) { child_content_ = content; SetParent(content, window_handle_); - RECT frame; - GetClientRect(window_handle_, &frame); + RECT frame = GetClientArea(); MoveWindow(content, frame.left, frame.top, frame.right - frame.left, frame.bottom - frame.top, true); @@ -234,6 +221,12 @@ void Win32Window::SetChildContent(HWND content) { SetFocus(child_content_); } +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + HWND Win32Window::GetHandle() { return window_handle_; } diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/win32_window.h b/experimental/federated_plugin/federated_plugin/example/windows/runner/win32_window.h index ea09829ca..17ba43112 100644 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/win32_window.h +++ b/experimental/federated_plugin/federated_plugin/example/windows/runner/win32_window.h @@ -1,8 +1,7 @@ -#ifndef WIN32_WINDOW_H_ -#define WIN32_WINDOW_H_ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ -#include -#include +#include #include #include @@ -52,6 +51,9 @@ class Win32Window { // If true, closing this window will quit the application. void SetQuitOnClose(bool quit_on_close); + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + protected: // Processes and route salient window messages for mouse handling, // size change and DPI. Delegates handling of these to member overloads that @@ -93,4 +95,4 @@ class Win32Window { HWND child_content_ = nullptr; }; -#endif // WIN32_WINDOW_H_ +#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/window_configuration.cpp b/experimental/federated_plugin/federated_plugin/example/windows/runner/window_configuration.cpp deleted file mode 100644 index c56ede181..000000000 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/window_configuration.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "window_configuration.h" - -const wchar_t* kFlutterWindowTitle = L"example"; -const unsigned int kFlutterWindowOriginX = 10; -const unsigned int kFlutterWindowOriginY = 10; -const unsigned int kFlutterWindowWidth = 1280; -const unsigned int kFlutterWindowHeight = 720; diff --git a/experimental/federated_plugin/federated_plugin/example/windows/runner/window_configuration.h b/experimental/federated_plugin/federated_plugin/example/windows/runner/window_configuration.h deleted file mode 100644 index ea5cead43..000000000 --- a/experimental/federated_plugin/federated_plugin/example/windows/runner/window_configuration.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef WINDOW_CONFIGURATION_ -#define WINDOW_CONFIGURATION_ - -// This is a temporary approach to isolate changes that people are likely to -// make to main.cpp, where the APIs are still in flux. This will reduce the -// need to resolve conflicts or re-create changes slightly differently every -// time the Windows Flutter API surface changes. -// -// Longer term there should be simpler configuration options for common -// customizations like this, without requiring native code changes. - -extern const wchar_t* kFlutterWindowTitle; -extern const unsigned int kFlutterWindowOriginX; -extern const unsigned int kFlutterWindowOriginY; -extern const unsigned int kFlutterWindowWidth; -extern const unsigned int kFlutterWindowHeight; - -#endif // WINDOW_CONFIGURATION_ diff --git a/experimental/federated_plugin/federated_plugin/ios/.gitignore b/experimental/federated_plugin/federated_plugin/ios/.gitignore index aa479fd3c..0c885071e 100644 --- a/experimental/federated_plugin/federated_plugin/ios/.gitignore +++ b/experimental/federated_plugin/federated_plugin/ios/.gitignore @@ -34,4 +34,5 @@ Icon? .tags* /Flutter/Generated.xcconfig +/Flutter/ephemeral/ /Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/experimental/federated_plugin/federated_plugin/ios/federated_plugin.podspec b/experimental/federated_plugin/federated_plugin/ios/federated_plugin.podspec index 0edca548c..2a2fede89 100644 --- a/experimental/federated_plugin/federated_plugin/ios/federated_plugin.podspec +++ b/experimental/federated_plugin/federated_plugin/ios/federated_plugin.podspec @@ -1,6 +1,6 @@ # # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint federated_plugin.podspec' to validate before publishing. +# Run `pod lib lint federated_plugin.podspec` to validate before publishing. # Pod::Spec.new do |s| s.name = 'federated_plugin' @@ -15,9 +15,9 @@ A new flutter plugin project. s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.platform = :ios, '8.0' + s.platform = :ios, '9.0' - # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } s.swift_version = '5.0' end diff --git a/experimental/federated_plugin/federated_plugin/macos/federated_plugin.podspec b/experimental/federated_plugin/federated_plugin/macos/federated_plugin.podspec deleted file mode 100644 index 280cb3a7c..000000000 --- a/experimental/federated_plugin/federated_plugin/macos/federated_plugin.podspec +++ /dev/null @@ -1,22 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint federated_plugin_macos.podspec' to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'federated_plugin' - s.version = '0.0.1' - s.summary = 'A new flutter plugin project.' - s.description = <<-DESC - No-op implementation of the url_launcher plugin to avoid build issues on macos. - https://github.com/flutter/flutter/issues/46618 - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.public_header_files = 'Classes/**/*.h' - - s.platform = :osx - s.osx.deployment_target = '10.11' - end diff --git a/experimental/federated_plugin/federated_plugin/pubspec.lock b/experimental/federated_plugin/federated_plugin/pubspec.lock index 608d8e656..488c80c02 100644 --- a/experimental/federated_plugin/federated_plugin/pubspec.lock +++ b/experimental/federated_plugin/federated_plugin/pubspec.lock @@ -204,5 +204,5 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=1.20.0" + dart: ">=2.15.1 <3.0.0" + flutter: ">=2.5.0" diff --git a/experimental/federated_plugin/federated_plugin/pubspec.yaml b/experimental/federated_plugin/federated_plugin/pubspec.yaml index a2be49b94..cd849c4ee 100644 --- a/experimental/federated_plugin/federated_plugin/pubspec.yaml +++ b/experimental/federated_plugin/federated_plugin/pubspec.yaml @@ -5,8 +5,8 @@ version: 0.0.1 publish_to: "none" environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.17.0" + sdk: ">=2.15.1 <3.0.0" + flutter: ">=2.5.0" dependencies: flutter: @@ -29,8 +29,8 @@ flutter: plugin: platforms: android: - pluginClass: FederatedPlugin package: dev.flutter.federated_plugin + pluginClass: FederatedPlugin ios: pluginClass: SwiftFederatedPlugin web: diff --git a/experimental/federated_plugin/federated_plugin_macos/.gitignore b/experimental/federated_plugin/federated_plugin_macos/.gitignore index e9dc58d3d..9be145fde 100644 --- a/experimental/federated_plugin/federated_plugin_macos/.gitignore +++ b/experimental/federated_plugin/federated_plugin_macos/.gitignore @@ -1,7 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp .DS_Store -.dart_tool/ +.atom/ +.buildlog/ +.history +.svn/ -.packages -.pub/ +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages build/ diff --git a/experimental/federated_plugin/federated_plugin_macos/.metadata b/experimental/federated_plugin/federated_plugin_macos/.metadata index 1d6ea1d06..8c15ad72b 100644 --- a/experimental/federated_plugin/federated_plugin_macos/.metadata +++ b/experimental/federated_plugin/federated_plugin_macos/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: b6d56a29dd482f596c3ddf937340c918154da871 - channel: master + revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b + channel: stable project_type: plugin diff --git a/experimental/federated_plugin/federated_plugin_macos/macos/Classes/FederatedPluginMacosPlugin.swift b/experimental/federated_plugin/federated_plugin_macos/macos/Classes/FederatedPluginMacosPlugin.swift index 050b7d357..8375b0e0a 100644 --- a/experimental/federated_plugin/federated_plugin_macos/macos/Classes/FederatedPluginMacosPlugin.swift +++ b/experimental/federated_plugin/federated_plugin_macos/macos/Classes/FederatedPluginMacosPlugin.swift @@ -16,22 +16,22 @@ public class FederatedPluginMacosPlugin: NSObject, FlutterPlugin { public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { switch call.method { case "getBatteryLevel": - getBatteryLevel(result) + getBatteryLevel(result) default: result(FlutterMethodNotImplemented) } } - private func getBatteryLevel(_ result: FlutterResult) { - let snapshot = IOPSCopyPowerSourcesInfo().takeRetainedValue() - let sources = IOPSCopyPowerSourcesList(snapshot).takeRetainedValue() as Array - let sourceInfo : NSDictionary = IOPSGetPowerSourceDescription(snapshot, sources[0]).takeUnretainedValue() - - guard let capacity = sourceInfo[kIOPSCurrentCapacityKey] as? Int else { - result(FlutterError(code: "STATUS_UNAVAILABLE", message: "Not able to determine battery level", details: nil)) - return - } - - result(capacity) + private func getBatteryLevel(_ result: FlutterResult) { + let snapshot = IOPSCopyPowerSourcesInfo().takeRetainedValue() + let sources = IOPSCopyPowerSourcesList(snapshot).takeRetainedValue() as Array + let sourceInfo : NSDictionary = IOPSGetPowerSourceDescription(snapshot, sources[0]).takeUnretainedValue() + + guard let capacity = sourceInfo[kIOPSCurrentCapacityKey] as? Int else { + result(FlutterError(code: "STATUS_UNAVAILABLE", message: "Not able to determine battery level", details: nil)) + return } + + result(capacity) + } } diff --git a/experimental/federated_plugin/federated_plugin_macos/macos/federated_plugin_macos.podspec b/experimental/federated_plugin/federated_plugin_macos/macos/federated_plugin_macos.podspec index 76c8f2c23..b918b59e7 100644 --- a/experimental/federated_plugin/federated_plugin_macos/macos/federated_plugin_macos.podspec +++ b/experimental/federated_plugin/federated_plugin_macos/macos/federated_plugin_macos.podspec @@ -1,6 +1,6 @@ # # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint federated_plugin_macos.podspec' to validate before publishing. +# Run `pod lib lint federated_plugin_macos.podspec` to validate before publishing. # Pod::Spec.new do |s| s.name = 'federated_plugin_macos' diff --git a/experimental/federated_plugin/federated_plugin_macos/pubspec.lock b/experimental/federated_plugin/federated_plugin_macos/pubspec.lock index ab09c704a..7079fb95d 100644 --- a/experimental/federated_plugin/federated_plugin_macos/pubspec.lock +++ b/experimental/federated_plugin/federated_plugin_macos/pubspec.lock @@ -157,5 +157,5 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=1.20.0" + dart: ">=2.15.1 <3.0.0" + flutter: ">=2.5.0" diff --git a/experimental/federated_plugin/federated_plugin_macos/pubspec.yaml b/experimental/federated_plugin/federated_plugin_macos/pubspec.yaml index ea786e57a..11b88d260 100644 --- a/experimental/federated_plugin/federated_plugin_macos/pubspec.yaml +++ b/experimental/federated_plugin/federated_plugin_macos/pubspec.yaml @@ -1,11 +1,11 @@ name: federated_plugin_macos description: macOS implementation of federated_plugin to retrieve current battery level. version: 0.0.1 -publish_to: none +homepage: environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.20.0" + sdk: ">=2.15.1 <3.0.0" + flutter: ">=2.5.0" dependencies: flutter: diff --git a/experimental/federated_plugin/federated_plugin_platform_interface/.gitignore b/experimental/federated_plugin/federated_plugin_platform_interface/.gitignore index bb431f0d5..9be145fde 100644 --- a/experimental/federated_plugin/federated_plugin_platform_interface/.gitignore +++ b/experimental/federated_plugin/federated_plugin_platform_interface/.gitignore @@ -21,55 +21,9 @@ #.vscode/ # Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock **/doc/api/ .dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies .packages -.pub-cache/ -.pub/ build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Flutter.podspec -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/experimental/federated_plugin/federated_plugin_platform_interface/.metadata b/experimental/federated_plugin/federated_plugin_platform_interface/.metadata index 9d7f2841a..af84dae5e 100644 --- a/experimental/federated_plugin/federated_plugin_platform_interface/.metadata +++ b/experimental/federated_plugin/federated_plugin_platform_interface/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: 8bd2e6585b0eda5ccdc10c1e1d35105e11f84424 - channel: master + revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b + channel: stable project_type: package diff --git a/experimental/federated_plugin/federated_plugin_platform_interface/pubspec.lock b/experimental/federated_plugin/federated_plugin_platform_interface/pubspec.lock index 64b8eefb0..3fbbd8e84 100644 --- a/experimental/federated_plugin/federated_plugin_platform_interface/pubspec.lock +++ b/experimental/federated_plugin/federated_plugin_platform_interface/pubspec.lock @@ -164,5 +164,5 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.15.1 <3.0.0" flutter: ">=1.17.0" diff --git a/experimental/federated_plugin/federated_plugin_platform_interface/pubspec.yaml b/experimental/federated_plugin/federated_plugin_platform_interface/pubspec.yaml index c2b92296a..44dfa5af8 100644 --- a/experimental/federated_plugin/federated_plugin_platform_interface/pubspec.yaml +++ b/experimental/federated_plugin/federated_plugin_platform_interface/pubspec.yaml @@ -2,16 +2,15 @@ name: federated_plugin_platform_interface description: A platform interface for federated_plugin. version: 0.0.1 homepage: -publish_to: none environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.15.1 <3.0.0" flutter: ">=1.17.0" dependencies: flutter: sdk: flutter - plugin_platform_interface: ^2.0.0 + plugin_platform_interface: ^2.0.2 dev_dependencies: flutter_test: diff --git a/experimental/federated_plugin/federated_plugin_windows/.gitignore b/experimental/federated_plugin/federated_plugin_windows/.gitignore index e9dc58d3d..9be145fde 100644 --- a/experimental/federated_plugin/federated_plugin_windows/.gitignore +++ b/experimental/federated_plugin/federated_plugin_windows/.gitignore @@ -1,7 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp .DS_Store -.dart_tool/ +.atom/ +.buildlog/ +.history +.svn/ -.packages -.pub/ +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages build/ diff --git a/experimental/federated_plugin/federated_plugin_windows/.metadata b/experimental/federated_plugin/federated_plugin_windows/.metadata index a4e8a6120..8c15ad72b 100644 --- a/experimental/federated_plugin/federated_plugin_windows/.metadata +++ b/experimental/federated_plugin/federated_plugin_windows/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: 780f5f99044ce7fcbcd868e2cf6878da02022db5 - channel: master + revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b + channel: stable project_type: plugin diff --git a/experimental/federated_plugin/federated_plugin_windows/pubspec.lock b/experimental/federated_plugin/federated_plugin_windows/pubspec.lock index ab09c704a..7079fb95d 100644 --- a/experimental/federated_plugin/federated_plugin_windows/pubspec.lock +++ b/experimental/federated_plugin/federated_plugin_windows/pubspec.lock @@ -157,5 +157,5 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=1.20.0" + dart: ">=2.15.1 <3.0.0" + flutter: ">=2.5.0" diff --git a/experimental/federated_plugin/federated_plugin_windows/pubspec.yaml b/experimental/federated_plugin/federated_plugin_windows/pubspec.yaml index 838e4603b..85f08724f 100644 --- a/experimental/federated_plugin/federated_plugin_windows/pubspec.yaml +++ b/experimental/federated_plugin/federated_plugin_windows/pubspec.yaml @@ -2,11 +2,10 @@ name: federated_plugin_windows description: Windows implementation of federated_plugin to retrieve current battery level. version: 0.0.1 homepage: -publish_to: none environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.20.0" + sdk: ">=2.15.1 <3.0.0" + flutter: ">=2.5.0" dependencies: flutter: diff --git a/experimental/federated_plugin/federated_plugin_windows/windows/CMakeLists.txt b/experimental/federated_plugin/federated_plugin_windows/windows/CMakeLists.txt index f9414c2e1..94b8c6410 100644 --- a/experimental/federated_plugin/federated_plugin_windows/windows/CMakeLists.txt +++ b/experimental/federated_plugin/federated_plugin_windows/windows/CMakeLists.txt @@ -1,11 +1,13 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.14) set(PROJECT_NAME "federated_plugin_windows") project(${PROJECT_NAME} LANGUAGES CXX) -set(PLUGIN_NAME "${PROJECT_NAME}_plugin") +# This value is used when generating builds using this plugin, so it must +# not be changed +set(PLUGIN_NAME "federated_plugin_windows_plugin") add_library(${PLUGIN_NAME} SHARED - "${PLUGIN_NAME}.cpp" + "federated_plugin_windows_plugin.cpp" ) apply_standard_settings(${PLUGIN_NAME}) set_target_properties(${PLUGIN_NAME} PROPERTIES diff --git a/experimental/federated_plugin/federated_plugin_windows/windows/federated_plugin_windows_plugin.cpp b/experimental/federated_plugin/federated_plugin_windows/windows/federated_plugin_windows_plugin.cpp index 3a64f7673..334877158 100644 --- a/experimental/federated_plugin/federated_plugin_windows/windows/federated_plugin_windows_plugin.cpp +++ b/experimental/federated_plugin/federated_plugin_windows/windows/federated_plugin_windows_plugin.cpp @@ -4,6 +4,7 @@ #include "include/federated_plugin_windows/federated_plugin_windows_plugin.h" +// This must be included before many other Windows headers. #include #include @@ -15,73 +16,74 @@ namespace { - class FederatedPluginWindowsPlugin : public flutter::Plugin { - public: - static void RegisterWithRegistrar(flutter::PluginRegistrarWindows* registrar); - - FederatedPluginWindowsPlugin(); - - virtual ~FederatedPluginWindowsPlugin(); - - private: - // Called when a method is called on this plugin's channel from Dart. - void HandleMethodCall( - const flutter::MethodCall& method_call, - std::unique_ptr> result); - }; - - void FederatedPluginWindowsPlugin::RegisterWithRegistrar( - flutter::PluginRegistrarWindows* registrar) { - auto channel = - std::make_unique>( - registrar->messenger(), "battery", - &flutter::StandardMethodCodec::GetInstance()); - - auto plugin = std::make_unique(); - - channel->SetMethodCallHandler( - [plugin_pointer = plugin.get()](const auto& call, auto result) { - plugin_pointer->HandleMethodCall(call, std::move(result)); - }); - - registrar->AddPlugin(std::move(plugin)); - } - - FederatedPluginWindowsPlugin::FederatedPluginWindowsPlugin() {} - - FederatedPluginWindowsPlugin::~FederatedPluginWindowsPlugin() {} - - void FederatedPluginWindowsPlugin::HandleMethodCall( - const flutter::MethodCall& method_call, - std::unique_ptr> result) { - if (method_call.method_name().compare("getBatteryLevel") == 0) { - SYSTEM_POWER_STATUS systemPower; - // GetSystemPowerStatus will retrieve the power status of the system. - if (GetSystemPowerStatus(&systemPower)) { - int batteryLevel = systemPower.BatteryLifePercent; - // The batteryLevel value in the range 0 to 100, or 255 if status is unknown. - if (batteryLevel != 255) { - flutter::EncodableValue response(batteryLevel); - result->Success(&response); - } - else { - result->Error("STATUS_UNAVAILABLE", "Not able to determine battery level."); - } - } - else { - result->Error("STATUS_UNAVAILABLE", "Not able to determine battery level."); - } - } - else { - result->NotImplemented(); - } - } +class FederatedPluginWindowsPlugin : public flutter::Plugin { + public: + static void RegisterWithRegistrar(flutter::PluginRegistrarWindows *registrar); + FederatedPluginWindowsPlugin(); + + virtual ~FederatedPluginWindowsPlugin(); + + private: + // Called when a method is called on this plugin's channel from Dart. + void HandleMethodCall( + const flutter::MethodCall &method_call, + std::unique_ptr> result); +}; + +// static +void FederatedPluginWindowsPlugin::RegisterWithRegistrar( + flutter::PluginRegistrarWindows *registrar) { + auto channel = + std::make_unique>( + registrar->messenger(), "battery", + &flutter::StandardMethodCodec::GetInstance()); + + auto plugin = std::make_unique(); + + channel->SetMethodCallHandler( + [plugin_pointer = plugin.get()](const auto &call, auto result) { + plugin_pointer->HandleMethodCall(call, std::move(result)); + }); + + registrar->AddPlugin(std::move(plugin)); +} + +FederatedPluginWindowsPlugin::FederatedPluginWindowsPlugin() {} + +FederatedPluginWindowsPlugin::~FederatedPluginWindowsPlugin() {} + +void FederatedPluginWindowsPlugin::HandleMethodCall( + const flutter::MethodCall &method_call, + std::unique_ptr> result) { + if (method_call.method_name().compare("getBatteryLevel") == 0) { + SYSTEM_POWER_STATUS systemPower; + // GetSystemPowerStatus will retrieve the power status of the system. + if (GetSystemPowerStatus(&systemPower)) { + int batteryLevel = systemPower.BatteryLifePercent; + // The batteryLevel value in the range 0 to 100, or 255 if status is unknown. + if (batteryLevel != 255) { + flutter::EncodableValue response(batteryLevel); + result->Success(&response); + } + else { + result->Error("STATUS_UNAVAILABLE", "Not able to determine battery level."); + } + } + else { + result->Error("STATUS_UNAVAILABLE", "Not able to determine battery level."); + } + } + else { + result->NotImplemented(); + } } +} // namespace + void FederatedPluginWindowsPluginRegisterWithRegistrar( - FlutterDesktopPluginRegistrarRef registrar) { - FederatedPluginWindowsPlugin::RegisterWithRegistrar( - flutter::PluginRegistrarManager::GetInstance() - ->GetRegistrar(registrar)); + FlutterDesktopPluginRegistrarRef registrar) { + FederatedPluginWindowsPlugin::RegisterWithRegistrar( + flutter::PluginRegistrarManager::GetInstance() + ->GetRegistrar(registrar)); }