Skip to content

[Swift Package Manager] Git ignore the .build directory #148018

@loic-sharma

Description

@loic-sharma

Xcode creates a .build directory for apps that use the Swift Package Manager. This contains build artifacts and should not be check-in to version control. We should update .gitignore files:

  1. Update the app template & add a migration to the Flutter tool

  2. If necessary, also update the plugin template.

    flutter channel main
    flutter config --enable-swift-package-manager
    
    flutter create -t plugin --platforms=ios foo
    cd foo
    git init ; git add . ; git commit -m "Init"
    

    In Xcode, open the directory that contains Package.swift: ios/foo/

    $ git status
    Untracked files:
    (use "git add <file>..." to include in what will be committed)
     ios/foo/.swiftpm/
    
  3. Update the flutter/packages repo

  4. Update all sample projects' .gitignore files.

Part of #126005

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions