Skip to content

chore: Explicit .gitignore rules for macOS and Windows generated files #1289

@frantovar

Description

@frantovar

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.swift
  • macos/Runner.xcworkspace/contents.xcworkspacedata (and potentially other generated files within .xcworkspace/ that are not xcshareddata).

Windows:

  • windows/flutter/generated_plugin_registrant.cc
  • windows/flutter/generated_plugin_registrant.h
  • windows/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

Metadata

Metadata

Assignees

Labels

choreChanges that don't modify source code or tests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions