- 15 Feb, 2024 2 commits
-
-
Bartek Pacia authored
This PR will make it easier for future Flutter-Android apps/plugins/modules etc. to migrate to Gradle Kotlin DSL. This PR is similar to #140452 but concerns public Gradle templates instead of Flutter's internal Gradle code. It should be a no-op change. **before**  **after** 
-
Hossein Yousefi authored
* Use `dart run` instead of `flutter pub run` in the documentation as it is now deprecated. * Use `int64_t` instead of `intptr_t` for `sum` examples.
-
- 13 Feb, 2024 1 commit
-
-
Gray Mackall authored
This is a direct revert of (the revert of (the reland of (the policy pr))): https://github.com/flutter/flutter/pull/143132. The only change is: 1. to put a conditional all on one line, because the packages repository has a test that uses an old flutter project to make sure nothing regresses. The old project uses an old gradle version, and the old gradle version bundles an old groovy version, and the old groovy version has a bug where lines that start with `&&` don't always work: https://issues.apache.org/jira/browse/GROOVY-7218 (I enjoy that the revert reason ends up providing another strong justification to go forward with the policy). Also thanks to @reidbaker for pointing out this bug. 2. I also made a slight formatting change to the messages that print when out of the support bounds, which I think looks slightly better. I tested this with on a branch that included a revert of https://github.com/flutter/flutter/pull/142008, and was able to recreate the failure and verify that it was resolved by 1).
-
- 12 Feb, 2024 1 commit
-
-
Reid Baker authored
Reverts flutter/flutter#143132
-
- 09 Feb, 2024 1 commit
-
-
Jenn Magder authored
Fixes https://github.com/flutter/flutter/issues/140474 See https://github.com/flutter/flutter/pull/122625 where this was done 11->12.
-
- 08 Feb, 2024 1 commit
-
-
Gray Mackall authored
Re land of https://github.com/flutter/flutter/pull/142000. Differences: 1. Fixed the test that was failing in postsubmit. The reason was that the Flutter Gradle Plugin was being applied after KGP in that test, so we couldn't find the KGP version. This caused a log, and the test expects no logs. I moved FGP to after KGP 2. Added to the logs for when we can't find AGP. Change is from > "Warning: unable to detect project AGP version. Skipping version checking." to > ~"Warning: unable to detect project AGP version. Skipping version checking. \nThis may be because you have applied the Flutter Gradle Plugin after AGP."~ update: the above is wrong, changed to > "Warning: unable to detect project KGP version. Skipping version checking. \nThis may be because you have applied AGP after the Flutter Gradle Plugin." 3. Added a note to the app-level build.gradle templates that FGP must go last > // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugin.
-
- 07 Feb, 2024 2 commits
-
-
Gray Mackall authored
Re-sets two jvmargs that were getting cleared because we set a value for `-Xmx`. Could help with https://github.com/flutter/flutter/issues/142957. Copied from comment here https://github.com/flutter/flutter/issues/142957: >Two random things I ran into while looking into this that might help: > >1. Gradle has defaults for a couple of the jvmargs, and setting any one of them clears those defaults for the others (bug here https://github.com/gradle/gradle/issues/19750). This can cause the "Gradle daemon to consume more and more native memory until it crashes", though the bug typically has a different associated error. It seems worth it to re-set those defaults. >2. There is a property we can set that will give us a heap dump on OOM ([-XX:HeapDumpOnOutOfMemoryError](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/clopts001.html)) Mostly just a find and replace from `find . -name gradle.properties -exec sed -i '' 's/\-Xmx4G/-Xmx4G\ \-XX:MaxMetaspaceSize=2G\ \-XX:+HeapDumpOnOutOfMemoryError/g' {} \;`, with the templates and the one test that writes from a string replaced by hand. I didn't set a value for `MaxMetaspaceSize` in the template files because I want to make sure this value doesn't cause problems in ci first (changes to the templates are essentially un-revertable for those who `flutter create` while the changes exist).
-
Chris Bracken authored
Previously, we were comparing the signed int `target_length` (returned by WideCharToMultiByte) to a size_t string length, resulting in a signed/unsigned comparison warning as follows: ``` windows\runner\utils.cpp(54,43): warning C4018: '>': signed/unsigned mismatch ``` WideCharToMultiByte returns: * 0 on error * the number of bytes written to the buffer pointed to by its fifth parameter, lpMultiByteStr, on success. As a result it's safe to store the return value in an unsigned int, which eliminates the warning. No changes to tests since this is dependent on end-user project settings/modifications and does not trigger a warning with default project settings. Fixes: https://github.com/flutter/flutter/issues/134227
-
- 26 Jan, 2024 1 commit
-
-
Daco Harkes authored
Update packages from https://github.com/dart-lang/native to the last published stable versions in templates.
-
- 24 Jan, 2024 1 commit
-
-
Jackson Gardner authored
Reverts flutter/flutter#135529 This had some failures in postsubmit: https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20gradle_plugin_light_apk_test/17054/overview and https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20gradle_plugin_fat_apk_test/17262/overview We should revert and then investigate.
-
- 23 Jan, 2024 1 commit
-
-
Gray Mackall authored
Fixes https://github.com/flutter/flutter/issues/135173, and could also be interpreted as fixing https://github.com/flutter/flutter/issues/83596 based on @chinmaygarde 's comment.
-
- 22 Jan, 2024 1 commit
-
-
Daco Harkes authored
Fixes https://github.com/flutter/flutter/issues/141827 Reland: https://dart-review.googlesource.com/c/sdk/+/346960 has rolled into g3, so the imports should now resolve in g3 as well. > [!CAUTION] > _Do NOT merge if "Google Testing" bot didn't run!_ Rolls the packages from https://github.com/dart-lang/native in the native assets implementation. Most notable we're refactoring `package:native_assets_cli` for `build.dart` use. Therefore, all imports to that package for Flutter/Dart should be to the implementation internals that are no longer visible for `build.dart` writers. Hence all the import updates. No behavior in Flutter apps should change. This PR also updates the template to use the latests version of `package:native_assets_cli` which no longer exposes all the implementation details.
-
- 21 Jan, 2024 1 commit
-
-
林洵锋 authored
On `Podfile`: ```ruby flutter_application_path = '../flutter_module' load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb') target 'OCProject' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for OCProject # install_all_flutter_pods(flutter_application_path) # install_flutter_engine_pod(flutter_application_path) # install_flutter_application_pod(flutter_application_path) install_flutter_plugin_pods(flutter_application_path) end post_install do |installer| flutter_post_install(installer) end ``` Encountering the following error after executing `pod install`: ```shell pod install [!] Invalid `Podfile` file: undefined method `flutter_relative_path_from_podfile' for #<Pod::Podfile:0x000000010e74c520 @defined_in_file=#<Pathname:/Users/lxf/gitHub/flutter_hybrid_bug/OCProject/Podfile>, @internal_hash={}, @root_target_definitions=[#<Pod::Podfile::TargetDefinition label=Pods>], @current_target_definition=#<Pod::Podfile::TargetDefinition label=Pods>> relative = flutter_relative_path_from_podfile(export_script_directory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^. # from /Users/lxf/gitHub/flutter_hybrid_bug/OCProject/Podfile:17 # ------------------------------------------- # # install_flutter_plugin_pods(flutter_application_path) > install_flutter_application_pod(flutter_application_path) # # ------------------------------------------- ``` The `flutter_relative_path_from_podfile` method is in `flutter_tools/bin/podhelper.rb`, but now `flutter_tools/bin/podhelper.rb` is only required in `install_all_flutter_pods` in `podhelper.rb.tmpl`. Sometimes we only need to use the `install_flutter_plugin_pods` method in podhelper.rb. For example, using `Shorebird` in an iOS hybird app scenario, we need to build `Flutter.xcframework` and `App.xcframework` and embed them into the iOS native project. In order to avoid unnecessary conflicts, use `install_flutter_plugin_pods` method to install Flutter plugin pods. [Shorebird - Code Push In Hybrid Apps](https://docs.shorebird.dev/guides/hybrid-app/ios) So I adjust the position of `require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)`.
-
- 18 Jan, 2024 1 commit
-
-
Jesús S Guerrero authored
b/320767653 Reverts flutter/flutter#141684
-
- 17 Jan, 2024 1 commit
-
-
Daco Harkes authored
Rolls the packages from https://github.com/dart-lang/native in the native assets implementation. Most notable we're refactoring `package:native_assets_cli` for `build.dart` use. Therefore, all imports to that package for Flutter/Dart should be to the implementation internals that are no longer visible for `build.dart` writers. Hence all the import updates. No behavior in Flutter apps should change. This PR also updates the template to use the latests version of `package:native_assets_cli` which no longer exposes all the implementation details.
-
- 16 Jan, 2024 4 commits
-
-
Anis Alibegić authored
I continued [my mission](https://github.com/flutter/flutter/pull/141431) to find as many typos as I could. This time it's a smaller set than before. There is no need for issues since it's a typo fix.
-
Bartek Pacia authored
This line is a leftover. Removing it is a no-op.
-
Bartek Pacia authored
Inspired by #137621.
-
Jenn Magder authored
`swift-format` alphabetizes imports. Alphabetize them in swift template files and integration tests. I found this as part of https://github.com/flutter/flutter/issues/41129 running `swift-import` on packages.
-
- 12 Jan, 2024 2 commits
-
-
OutdatedGuy authored
Added missing required newline at end of some `.gitignore` files. All other `.gitignore` files ends with a newline except the changed ones, hence the PR. > *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* **Not listing any issues because of trivial fixes as mentioned above.**
-
Anis Alibegić authored
Fair amount of typos spotted and fixed. Some of them are in comments, some of them are in code and some of them are in nondart files. There is no need for issues since it's a typo fix. I have doubts about [packages/flutter_tools/lib/src/ios/core_devices.dart](https://github.com/flutter/flutter/compare/master...anisalibegic:flutter:master#diff-fdbc1496b4bbe7e2b445a567fd385677af861c0093774e3d8cc460fdd5b794fa), I have a feeling it might broke some things on the other end, even though it's a typo.
-
- 03 Jan, 2024 2 commits
-
-
Jenn Magder authored
Change the following in the `flutter create` templates. I didn't make any auto-migrations for existing apps because none seem that critical: 1. Turn on `ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS` in iOS and macOS. 1. Turn on `BuildIndependentTargetsInParallel` in macOS template. https://github.com/flutter/flutter/pull/125827/files#r1181817619 1. Turn on `DEAD_CODE_STRIPPING` in macOS template. 1. Set `ENABLE_USER_SCRIPT_SANDBOXING=NO` in iOS and macOS template. `flutter` scripts don't work with this on. This might require a migration in the future to explicitly turn this one off. However at least for now if the setting isn't present it defaults to `NO`. Add migration for `LastUpgradeVersion` so users won't see these validation issues in Xcode. Run migrator on all the example apps. A few aren't Flutter apps so I edited them in Xcode. Fixes https://github.com/flutter/flutter/issues/140253 See also https://github.com/flutter/flutter/issues/125817 and https://github.com/flutter/flutter/pull/90304.
-
Jenn Magder authored
Reland https://github.com/flutter/flutter/pull/140478 with `ios_content_validation_test` test fix. ``` [ios_content_validation_test] Process terminated with exit code 0. Task result: { "success": true, "data": null, "detailFiles": [], "benchmarkScoreKeys": [], "reason": "success" } ``` __________ 1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963 Fixes https://github.com/flutter/flutter/issues/136060
-
- 02 Jan, 2024 2 commits
-
-
auto-submit[bot] authored
Reverts flutter/flutter#140478 Initiated by: loic-sharma This change reverts the following previous change: Original Description: 1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963 Fixes https://github.com/flutter/flutter/issues/136060
-
Jenn Magder authored
1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963 Fixes https://github.com/flutter/flutter/issues/136060
-
- 27 Nov, 2023 1 commit
-
-
Bartek Pacia authored
This PR updates the app templates generated by `flutter create` to use declarative `plugins {}` syntax for applying the Kotlin Gradle Plugin. I realized this is missing while writing [#9857.](https://github.com/flutter/website/pull/9857)
-
- 16 Nov, 2023 2 commits
-
-
lsaudon authored
Bump cupertino_icons to 1.0.6
-
Bruno Leroux authored
## Description This PR adds a new section to the Android manifest file. This section is required for https://github.com/flutter/engine/pull/44579 (because it uses `PackageManager.queryIntentActivities` API ), see: 1. https://developer.android.com/training/package-visibility?hl=en 2. https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT 3. https://developer.android.com/reference/android/content/pm/PackageManager?hl=en#queryIntentActivities(android.content.Intent,%20android.content.pm.PackageManager.ResolveInfoFlags) ## Related Issue Android manifest update for https://github.com/flutter/flutter/issues/107603 ## Tests This PR updates the integration tests and examples Android manifest files, this will help catch error or warning related to this change.
-
- 09 Nov, 2023 1 commit
-
-
Camille Simon authored
Re-lands https://github.com/flutter/flutter/pull/137191. The fix for the issue causing that PR to be reverted was tested in this PR but ultimately landed separately in https://github.com/flutter/flutter/pull/138093.
-
- 03 Nov, 2023 2 commits
-
-
Daco Harkes authored
Pin the dependencies from dart-lang/native to a specific version during testing (rather than having them auto-upgrade during pub resolution). This will prevent tests using the template to start failing if a bad version is published to pub. Closes: https://github.com/flutter/flutter/issues/137418 Also bumps dep in flutter_tools.
-
auto-submit[bot] authored
Reverts flutter/flutter#137191 Initiated by: camsim99 This change reverts the following previous change: Original Description: Adds support for Android 34 in the following ways: - Bumps integration tests compile SDK versions 33 --> 34 - Bumps template compile SDK version 33 --> 34 - Also changes deprecated `compileSdkVersion` to `compileSdk` Part of https://github.com/flutter/flutter/issues/134220
-
- 02 Nov, 2023 3 commits
-
-
Camille Simon authored
Adds support for Android 34 in the following ways: - Bumps integration tests compile SDK versions 33 --> 34 - Bumps template compile SDK version 33 --> 34 - Also changes deprecated `compileSdkVersion` to `compileSdk` Part of https://github.com/flutter/flutter/issues/134220
-
Reid Baker authored
Fixes #137600 Protect flutter analyze --suggestions from null error when AGP value is missing Update template with a reference to new agp definition location Look for AGP version being set in settings.gradle (change to templates happened in https://github.com/flutter/flutter/commit/dbe0ccd8853dabdcb0f94ce2cdef892a1b10e48a#diff-20537fb84ee37894a3f3d9723a06bcf2674290ee25aa83332c2524a1f7546a6d
-
Bartek Pacia authored
I'm removing an unneded block of configuration from the `settings.gradle` template. It was introduced by me in #123511. At that time, I did not know that it's unnecessary, and did not test removing it â sorry about that. I learned that it's unnecessary recently, when [I asked a question on StackOverflow](https://stackoverflow.com/questions/77073596/whats-the-difference-between-plugins-and-pluginmanagement-plugins-in). More context there.
-
- 20 Oct, 2023 1 commit
-
-
Robert Ancell authored
Add missing call to parent method of GApplication::shutdown, implement GApplication::startup (#136836) Fixes a warning introduced in https://github.com/flutter/flutter/pull/136780 and adds the other related function.
-
- 18 Oct, 2023 2 commits
-
-
Michael Goderbauer authored
Follow-up to https://github.com/flutter/packages/pull/5177
-
Robert Ancell authored
Implement GApplication:shutdown so a Flutter developer knows where to put code that should occur on application shutdown. (#136780) This was added because the dispose method doesn't seem to be called - something must still have a reference to the application after shutdown. Solution for https://github.com/flutter/flutter/issues/136582
-
- 04 Oct, 2023 1 commit
-
-
Daco Harkes authored
Bump dart-lang/native deps. * https://github.com/dart-lang/native/issues/142
-
- 27 Sep, 2023 1 commit
-
-
Daco Harkes authored
Support for FFI calls with `@Native external` functions through Native assets on Windows. 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 Windows. Mainly follows the design of https://github.com/flutter/flutter/pull/134031. Specifically for Windows in this PR is the logic for finding the compiler `cl.exe` and environment variables that contain the paths to the Windows headers `vcvars.bat` based on `vswhere.exe`.
-
- 22 Sep, 2023 1 commit
-
-
Bartek Pacia authored
Refactor "app plugin loader" Gradle Plugin so it can be applied using the declarative `plugins {}` block (#127897) This PR fixes #125009.
-