Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a legit .gitignore for a Flutter project that is developed in Android Studio?

What is a legit .gitignore for a Flutter project that is developed in Android Studio?

This is what I have so far, but when I open up the project in Android Studio I am unable to enable Dart Support or browse the project.

#flutter specific .flutter-plugins .DS_Store .dart_tool/ .packages .pub/ build/ android/app/google-services.json .idea/ android/key.properties pubspec.lock doc/api/  #ios specific ios/.generated/ ios/Podfile* ios/Flutter/Debug.xcconfig ios/Flutter/Release.xcconfig ios/Runner.xcworkspace/contents.xcworkspacedata  #android specific android/app/google-services.json android/key.properties  # User-specific .idea/**/workspace.xml .idea/**/tasks.xml .idea/**/usage.statistics.xml .idea/**/dictionaries .idea/**/shelf  # Generated files .idea/**/contentModel.xml  # Sensitive or high-churn files .idea/**/dataSources/ .idea/**/dataSources.ids .idea/**/dataSources.local.xml .idea/**/sqlDataSources.xml .idea/**/dynamic.xml .idea/**/uiDesigner.xml .idea/**/dbnavigator.xml  # Gradle .idea/**/gradle.xml .idea/**/libraries  # Gradle and Maven with auto-import .idea/modules.xml .idea/*.iml .idea/modules *.iml  # File-based project format *.iws  # IntelliJ out/ 
like image 392
dazza5000 Avatar asked Sep 12 '18 01:09

dazza5000


People also ask

What is Gitignore flutter?

. gitignore file contains a file or folder path that is considered not to commit in a flutter project. Some different files or folders adds to the gitignore file in the flutter project. It creates files and folders while generating a flutter project for Android and IOS build.


2 Answers

This is the .gitignore generated automatically by Android Studio, hope that this is what you're looking for:

# Miscellaneous *.class *.log *.pyc *.swp .DS_Store .atom/ .buildlog/ .history .svn/  # IntelliJ related *.iml *.ipr *.iws .idea/  # Visual Studio Code related .vscode/  # Flutter/Dart/Pub related **/doc/api/ .dart_tool/ .flutter-plugins .packages .pub-cache/ .pub/ /build/  # Android related **/android/**/gradle-wrapper.jar **/android/.gradle **/android/captures/ **/android/gradlew **/android/gradlew.bat **/android/local.properties **/android/**/GeneratedPluginRegistrant.java  # iOS/XCode related **/ios/**/*.mode1v3 **/ios/**/*.mode2v3 **/ios/**/*.moved-aside **/ios/**/*.pbxuser **/ios/**/*.perspectivev3 **/ios/**/*sync/ **/ios/**/.sconsign.dblite **/ios/**/.tags* **/ios/**/.vagrant/ **/ios/**/DerivedData/ **/ios/**/Icon? **/ios/**/Pods/ **/ios/**/.symlinks/ **/ios/**/profile **/ios/**/xcuserdata **/ios/.generated/ **/ios/Flutter/App.framework **/ios/Flutter/Flutter.framework **/ios/Flutter/Generated.xcconfig **/ios/Flutter/app.flx **/ios/Flutter/app.zip **/ios/Flutter/flutter_assets/ **/ios/ServiceDefinitions.json **/ios/Runner/GeneratedPluginRegistrant.*  # Exceptions to above rules. !**/ios/**/default.mode1v3 !**/ios/**/default.mode2v3 !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 
like image 177
SugaR256 Avatar answered Oct 01 '22 03:10

SugaR256


Here is Consistent .gitignore for Dart and Flutter projects all Editors

  • Android Studio
  • VisualStudioCode
  • Xcode

https://github.com/flutter/flutter/issues/13892#issue-285842688

like image 36
Nikunj Kumbhani Avatar answered Oct 01 '22 03:10

Nikunj Kumbhani