chore: Explicit .gitignore rules for macOS and Windows generated files
Description:
When creating a new Flutter project with the cli the default .gitignore includes explicit rules for ios/ and android/ generated files. However, it seems to lack equally explicit rules for common generated files within the macos/ and windows/ directories.
I've noticed that when I added a package with native dependencies to my project (e.g., package_info_plus).
I think the next files should not be tracked in Git for macOS and Windows:
macOS:
macos/Flutter/*.xcconfig(e.g., Flutter-Debug.xcconfig, Flutter-Release.xcconfig)macos/Flutter/GeneratedPluginRegistrant.swiftmacos/Runner.xcworkspace/contents.xcworkspacedata(and potentially other generated files within.xcworkspace/that are notxcshareddata).
Windows:
windows/flutter/generated_plugin_registrant.ccwindows/flutter/generated_plugin_registrant.hwindows/flutter/generated_plugins.cmake
Thank you @marcossevilla for considering this improvement!
Requirements
- [ ] No functional changes to the code.
- [ ] All CI/CD checks are passing.
- [ ] There is no drop in the test coverage percentage.
Additional Context
No response
hey @frantovar, thanks for submitting this issue!
I was checking what is the .gitignore from a flutter create project and I have this from 3.32.0:
# linux/.gitignore
flutter/ephemeral
# macos/.gitignore
# Flutter-related
**/Flutter/ephemeral/
**/Pods/
# Xcode-related
**/dgph
**/xcuserdata/
# windows/.gitignore
flutter/ephemeral/
# Visual Studio user-specific files.
*.suo
*.user
*.userosscache
*.sln.docstates
# Visual Studio build-related files.
x64/
x86/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
Which seems to be pretty aligned with what we already have on very_good_core. So I'm curious of what are the reasons to ignore the files you're mentioning, particularly the generated plugin registrant files since they can have custom platform logic.
Hi @frantovar,
Were you able to take a look to the comment of @marcossevilla above? Thanks!
Hi @omartinma! Sorry, I totally forget about the issue.
As @marcossevilla said it seems Very Good CLI is indeed totally aligned with the Flutter's official templates.
@frantovar thanks for checking! I'll close this issue since everything is aligned :)