- 18 Oct, 2023 1 commit
-
-
Christopher Fujino authored
Fixes https://github.com/flutter/flutter/issues/130277 This PR does two things: 1. introduce a hidden `flutter build _preview` command, that will build a debug windows desktop app and copy it into the SDK's binary cache. This command is only intended to be run during packaging. 2. introduce a new device type, called `PreviewDevice`, which relies on the prebuilt desktop debug app from step 1, copies it into the target app's assets build folder, and then hot reloads their dart code into it.
-
- 10 Oct, 2023 1 commit
-
-
- 29 Sep, 2023 1 commit
-
-
Elias Yishak authored
Part of: - https://github.com/flutter/flutter/issues/128251 Currently, when we want to use the analytics instance from `package:unified_analytics`, we are just grabbing it from globals. However, with the legacy analytics instance, there are some things we check to return a no-op version of the instance.. for example, if we are running on bots or a non standard branch, we use a no-op instance This PR uses the same previous checks for the new analytics instance
-
- 10 Sep, 2023 1 commit
-
-
Daco Harkes authored
Support for FFI calls with `@Native external` functions through Native assets on MacOS and iOS. This enables bundling native code without any build-system boilerplate code. For more info see: * https://github.com/flutter/flutter/issues/129757 ### Implementation details for MacOS and iOS. Dylibs are bundled by (1) making them fat binaries if multiple architectures are targeted, (2) code signing these, and (3) copying them to the frameworks folder. These steps are done manual rather than via CocoaPods. CocoaPods would have done the same steps, but (a) needs the dylibs to be there before the `xcodebuild` invocation (we could trick it, by having a minimal dylib in the place and replace it during the build process, that works), and (b) can't deal with having no dylibs to be bundled (we'd have to bundle a dummy dylib or include some dummy C code in the build file). The dylibs are build as a new target inside flutter assemble, as that is the moment we know what build-mode and architecture to target. The mapping from asset id to dylib-path is passed in to every kernel compilation path. The interesting case is hot-restart where the initial kernel file is compiled by the "inner" flutter assemble, while after hot restart the "outer" flutter run compiled kernel file is pushed to the device. Both kernel files need to contain the mapping. The "inner" flutter assemble gets its mapping from the NativeAssets target which builds the native assets. The "outer" flutter run get its mapping from a dry-run invocation. Since this hot restart can be used for multiple target devices (`flutter run -d all`) it contains the mapping for all known targets. ### Example vs template The PR includes a new template that uses the new native assets in a package and has an app importing that. Separate discussion in: https://github.com/flutter/flutter/issues/131209. ### Tests This PR adds new tests to cover the various use cases. * dev/devicelab/bin/tasks/native_assets_ios.dart * Runs an example app with native assets in all build modes, doing hot reload and hot restart in debug mode. * dev/devicelab/bin/tasks/native_assets_ios_simulator.dart * Runs an example app with native assets, doing hot reload and hot restart. * packages/flutter_tools/test/integration.shard/native_assets_test.dart * Runs (incl hot reload/hot restart), builds, builds frameworks for iOS, MacOS and flutter-tester. * packages/flutter_tools/test/general.shard/build_system/targets/native_assets_test.dart * Unit tests the new Target in the backend. * packages/flutter_tools/test/general.shard/ios/native_assets_test.dart * packages/flutter_tools/test/general.shard/macos/native_assets_test.dart * Unit tests the native assets being packaged on a iOS/MacOS build. It also extends various existing tests: * dev/devicelab/bin/tasks/module_test_ios.dart * Exercises the add2app scenario. * packages/flutter_tools/test/general.shard/features_test.dart * Unit test the new feature flag.
-
- 23 Aug, 2023 1 commit
-
-
Ian Hickson authored
-
- 10 Aug, 2023 1 commit
-
-
Ian Hickson authored
Fixes https://github.com/flutter/flutter/issues/132157
-
- 15 Jun, 2023 1 commit
-
-
Christopher Fujino authored
Fixes https://github.com/flutter/flutter/issues/112833 Most of the actual changes here are in [packages/flutter_tools/lib/src/version.dart](https://github.com/flutter/flutter/pull/124558/files#diff-092e00109d9e1589fbc7c6de750e29a6ae512b2dd44e85d60028953561201605), while the rest is largely just addressing changes to the constructor of `FlutterVersion` which now has different dependencies. This change makes `FlutterVersion` an interface with two concrete implementations: 1. `_FlutterVersionGit` which is mostly the previous implementation, and 2. `_FlutterVersionFromFile` which will read a new `.version.json` file from the root of the repo The [`FlutterVersion` constructor](https://github.com/flutter/flutter/pull/124558/files#diff-092e00109d9e1589fbc7c6de750e29a6ae512b2dd44e85d60028953561201605R70) is now a factory that first checks if `.version.json` exists, and if so returns an instance of `_FlutterVersionFromGit` else it returns the fallback `_FlutterVersionGit` which will end up writing `.version.json` so that we don't need to re-calculate the version on the next invocation. `.version.json` will be deleted in the bash/batch entrypoints any time we need to rebuild he tool (this will usually be because the user did `flutter upgrade` or `flutter channel`, or manually changed the commit with git).
-
- 01 Jun, 2023 1 commit
-
-
Andrew Kolos authored
Fixes #124252, finishing work on the umbrella tracking issue, #126126. Essentially, after this PR, no (non-test) code should be be referencing/invoking the java home or binary paths.
-
- 23 May, 2023 1 commit
-
-
Ian Hickson authored
Give channel descriptions in `flutter channel`, use branch instead of upstream for channel name (#126936) ## How we determine the channel name Historically, we used the current branch's upstream to figure out the current channel name. I have no idea why. I traced it back to https://github.com/flutter/flutter/pull/446/files where @abarth implement this and I reviewed that PR and left no comment on it at the time. I think this is confusing. You can be on a branch and it tells you that your channel is different. That seems weird. This PR changes the logic to uses the current branch as the channel name. ## How we display channels The main reason this PR exists is to add channel descriptions to the `flutter channel` list: ``` ianh@burmese:~/dev/flutter/packages/flutter_tools$ flutter channel Flutter channels: master (tip of tree, for contributors) main (tip of tree, follows master channel) beta (updated monthly, recommended for experienced users) stable (updated quarterly, for new users and for production app releases) * foo_bar Currently not on an official channel. ianh@burmese:~/dev/flutter/packages/flutter_tools$ ``` ## Other changes I made a few other changes while I was at it: * If you're not on an official channel, we used to imply `--show-all`, but now we don't, we just show the official channels plus yours. This avoids flooding the screen in the case the user is on a weird channel and just wants to know what channel they're on. * I made the tool more consistent about how it handles unofficial branches. Now it's always `[user branch]`. * I slightly adjusted how unknown versions are rendered so it's clearer the version is unknown rather than just having the word "Unknown" floating in the output without context. * Simplified some of the code. * Made some of the tests more strict (checking all output rather than just some aspects of it). * Changed the MockFlutterVersion to implement the FlutterVersion API more strictly. * I made sure we escape the output to `.metadata` to avoid potential injection bugs (previously we just inlined the version and channel name verbatim with no escaping, which is super sketchy). * Tweaked the help text for the `downgrade` command to be clearer. * Removed some misleading text in some error messages. * Made the `.metadata` generator consistent with the template file. * Removed some obsolete code to do with the `dev` branch. ## Reviewer notes I'm worried that there are implications to some of these changes that I am not aware of, so please don't assume I know what I'm doing when reviewing this code. :-)
-
- 20 May, 2023 1 commit
-
-
Andrew Kolos authored
Relands #126086, which was reverted by #126569.
-
- 11 May, 2023 2 commits
-
-
Andrew Kolos authored
Reverts flutter/flutter#126086. This PR changed the interfaces of some classes, namely `AndroidSdk`, and deleted a global. These classes had custom overrides in g3 that were not updated with a g3fix, so this PR has broken tests. See https://b.corp.google.com/issues/281945232 (non-public link)
-
Andrew Kolos authored
This is the first step in unifying Java-finding logic across the tool. If curious, see #126029 for an example of what all the changes will probably entail. Moves java-related functionality like `AndroidSdk.findJavaHome` to a new class, `Java`. See tracking issue https://github.com/flutter/flutter/issues/126126 for more.
-
- 04 May, 2023 1 commit
-
-
chunhtai authored
fixes https://github.com/flutter/flutter/issues/120405
-
- 05 Apr, 2023 1 commit
-
-
Reid Baker authored
https://github.com/flutter/flutter/issues/123917 Doc covering a broad set of issues related to android studio updating. https://docs.google.com/document/d/1hTXkjbUrBnXgu8NQsth1c3aEqo77rWoEj8CcsQ39wwQ/edit?pli=1# Specifically this pr: - Adds new functions to find a projects AGP, Gradle and java versions, and tests. - Adds new functions that take versions and parse if the versions are compatible with each other, and tests. - Adds validator for `flutter analyze --suggestions` that evaluates the java/gradle/agp versions and checks if they are compatible, and integration test. - Updates the version of gradle used by dev/integration_tests/flutter_gallery/ to the minimum supported by java 18 so that the integration tests pass (It is unknown why the java version is 18.9 instead of 11) - Moves `isWithinVersionRange` to version.dart, and tests. - Adds FakeAndroidStudio to fakes to be used in multiple tests but does not remove existing copies. Metrics will be included as part of the definition of done for this bug but not as part of this cl. It is already too big. Known work still left in this pr: * Understand why analyze integration tests are failing. Example output if Java and gradle are not compatible: ``` ┌───────────────────────────────────────────────────────────────────┐ │ General Info │ │ [✓] App Name: espresso_example │ │ [✓] Supported Platforms: android │ │ [✓] Is Flutter Package: yes │ │ [✓] Uses Material Design: yes │ │ [✓] Is Plugin: no │ │ [✗] Java/Gradle/Android Gradle Plugin: │ │ │ │ Incompatible Java/Gradle versions. │ │ │ │ Java Version: 17.0.6, Gradle Version: 7.0.2 │ │ │ │ See the link below for more information. │ │ https://docs.gradle.org/current/userguide/compatibility.html#java │ │ │ └───────────────────────────────────────────────────────────────────┘ ``` Example output if Gradle and AGP are not compatible ``` ┌─────────────────────────────────────────────────────────────────────────────┐ │ General Info │ │ [✓] App Name: espresso_example │ │ [✓] Supported Platforms: android │ │ [✓] Is Flutter Package: yes │ │ [✓] Uses Material Design: yes │ │ [✓] Is Plugin: no │ │ [✗] Java/Gradle/Android Gradle Plugin: Incompatible Gradle/AGP versions. │ │ │ │ Gradle Version: 7.0.2, AGP Version: 7.4.2 │ │ │ │ Update gradle to at least "7.5". │ │ See the link below for more information: │ │ https://developer.android.com/studio/releases/gradle-plugin#updating-gradle │ │ │ │ Incompatible Java/Gradle versions. │ │ │ │ Java Version: 17.0.6, Gradle Version: 7.0.2 │ │ │ │ See the link below for more information: │ │ https://docs.gradle.org/current/userguide/compatibility.html#java │ │ │ └─────────────────────────────────────────────────────────────────────────────┘ ``` Example output if Java/Gradle/Agp are not compatible. ``` ┌─────────────────────────────────────────────────────────────────────────────┐ │ General Info │ │ [✓] App Name: espresso_example │ │ [✓] Supported Platforms: android │ │ [✓] Is Flutter Package: yes │ │ [✓] Uses Material Design: yes │ │ [✓] Is Plugin: no │ │ [✗] Java/Gradle/Android Gradle Plugin: Incompatible Gradle/AGP versions. │ │ │ │ Gradle Version: 7.0.2, AGP Version: 7.4.2 │ │ │ │ Update gradle to at least "7.5". │ │ See the link below for more information: │ │ https://developer.android.com/studio/releases/gradle-plugin#updating-gradle │ │ │ │ Incompatible Java/Gradle versions. │ │ │ │ Java Version: 17.0.6, Gradle Version: 7.0.2 │ │ │ │ See the link below for more information: │ │ https://docs.gradle.org/current/userguide/compatibility.html#java │ │ │ └─────────────────────────────────────────────────────────────────────────────┘ ``` Commit messages - Add function to gradle_utils.dart that gets the gradle version from wrapper or system and add a test for each situation - Add method to get agp version, add method to validate agp against gradle version, update documentation, add tests for agp validation. - Update dart doc for validateGradleAndAgp to describe where the info came from and corner case behavior, create function to validate java and gradle and hardcode return to false - Fill out and test java gradle compatibility function in gradle_utils - Hook up java gradle evaluateion to hasValidJavaGradleAgpVersions with hardcoded java version - Add java --version output parsing and tests - Add getJavaBinary test - Update comment in android_sdk for mac behavior with java_home -v ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] All existing and new tests are passing.
-
- 16 Mar, 2023 1 commit
-
-
Greg Spencer authored
Add macos project auto migration code for FlutterApplication
-
- 02 Mar, 2023 1 commit
-
-
Kevin Moore authored
flutter_tool: only enable wasm compile in master channel
-
- 23 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* dart fix --apply * manual fixes * fix after merge conflicts * review
-
- 08 Nov, 2022 1 commit
-
-
Jesús S Guerrero authored
* update flutter build command * update tests * fix analyze suggestions
-
- 08 Sep, 2022 1 commit
-
-
Sigurd Meldgaard authored
-
- 29 Aug, 2022 2 commits
-
-
Zachary Anderson authored
This reverts commit 3802eb62.
-
Sigurd Meldgaard authored
-
- 22 Jul, 2022 1 commit
-
-
Rich Kadel authored
Fuchsia will soon remove all support for Component Framework version 1 components (recognized by component manifests ending in `.cmx`). Notably, some of the `flutter` tool commands for Fuchsia devices-- notably, but not limited to, those related to CFv1--are outdated, and either do not work today or soon won't work. This PR removes the outdated components and commands, replacing some with the newer version, or simply removing the non-working features, in some cases.
-
- 09 Jun, 2022 1 commit
-
-
Christopher Fujino authored
-
- 25 May, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 24 May, 2022 1 commit
-
-
Jenn Magder authored
-
- 27 Apr, 2022 1 commit
-
-
Alexandre Ardhuin authored
-
- 26 Apr, 2022 1 commit
-
-
Jonah Williams authored
-
- 08 Apr, 2022 1 commit
-
-
Jesús S Guerrero authored
Co-authored-by:
Christopher Fujino <christopherfujino@gmail.com>
-
- 31 Mar, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 14 Dec, 2021 1 commit
-
-
Lau Ching Jun authored
* Switch to use xml in PlistParser * Review feedbacks: Change dynamic to Object, remove getValueFromFile
-
- 11 Nov, 2021 1 commit
-
-
Kenzie (Schmoll) Davisson authored
* Add DevTools version to `flutter --version` output. * review comments * fix test * add explanatory comment * dummy commit to kick bots Co-authored-by:
Christopher Fujino <christopherfujino@gmail.com>
-
- 10 Jun, 2021 1 commit
-
-
Jonah Williams authored
-
- 08 Jun, 2021 1 commit
-
-
Lau Ching Jun authored
-
- 15 May, 2021 1 commit
-
-
Jonah Williams authored
-
- 22 Apr, 2021 1 commit
-
-
Jenn Magder authored
-
- 10 Apr, 2021 1 commit
-
-
Jenn Magder authored
-
- 07 Apr, 2021 1 commit
-
-
Jenn Magder authored
-
- 01 Apr, 2021 1 commit
-
-
Hannes Winkler authored
-
- 16 Mar, 2021 1 commit
-
-
Jonah Williams authored
-
- 15 Mar, 2021 1 commit
-
-
Jenn Magder authored
-