Skip to content

Instantly share code, notes, and snippets.

@mrasityilmaz
Created June 27, 2025 11:12
Show Gist options
  • Save mrasityilmaz/9c6547bd6e2048adeda409630909213c to your computer and use it in GitHub Desktop.
Save mrasityilmaz/9c6547bd6e2048adeda409630909213c to your computer and use it in GitHub Desktop.
vscode-dart-tasks

Put tasks.json file in .vscode/ directory

Flutter VS Code Tasks Configuration

🇹🇷 Türkçe Açıklama

Bu dosya, Flutter projeleri için VS Code'da kullanılan özel görevleri (tasks) tanımlar. Bu görevler, geliştirme sürecini hızlandırmak ve tekrarlayan komutları otomatikleştirmek için kullanılır.

📋 Görevler ve Açıklamaları:

�� Build Runner

  • Ne işe yarar: Dart kod üreticilerini (code generators) çalıştırır
  • Kullanım: auto_route, injectable, json_annotation gibi paketler için gerekli
  • Ne zaman kullanılır: Model sınıfları, route'lar veya dependency injection değiştiğinde

��️ Watch Runner

  • Ne işe yarar: Kod üreticilerini sürekli izler ve değişiklik olduğunda otomatik çalıştırır
  • Kullanım: Geliştirme sırasında sürekli açık tutulabilir
  • Avantaj: Manuel olarak build runner çalıştırmaya gerek kalmaz

📱 iOS Görevleri:

  • iOS: Refresh Pod: Pod'ları tamamen temizler ve yeniden kurar (sorun giderme için)
  • iOS: Pod Install: iOS bağımlılıklarını kurar
  • iOS: Pod Update: Pod'ları günceller
  • iOS: Build IPA: Release IPA dosyası oluşturur

🤖 Android Görevleri:

  • Android: Build APK: Release APK dosyası oluşturur
  • Android: Build APK (Development): Debug APK dosyası oluşturur
  • Android: Build AAB: Google Play Store için AAB dosyası oluşturur

🧹 Flutter Clean & Get

  • Ne işe yarar: Projeyi temizler ve bağımlılıkları yeniden yükler
  • Kullanım: Build sorunları yaşandığında veya bağımlılık değişikliklerinden sonra

�� Nasıl Kullanılır:

  1. VS Code'da Ctrl+Shift+P (Windows/Linux) veya Cmd+Shift+P (Mac)
  2. "Tasks: Run Task" yazın
  3. İstediğiniz görevi seçin
  4. Veya Ctrl+Shift+P → "Tasks: Run Build Task" ile hızlı erişim

🇺🇸 English Description

This file defines custom tasks for Flutter projects in VS Code. These tasks are used to speed up the development process and automate repetitive commands.

📋 Tasks and Descriptions:

�� Build Runner

  • Purpose: Runs Dart code generators
  • Usage: Required for packages like auto_route, injectable, json_annotation
  • When to use: When model classes, routes, or dependency injection changes

��️ Watch Runner

  • Purpose: Continuously monitors code generators and runs them automatically when changes occur
  • Usage: Can be kept running during development
  • Advantage: No need to manually run build runner

📱 iOS Tasks:

  • iOS: Refresh Pod: Completely cleans and reinstalls pods (for troubleshooting)
  • iOS: Pod Install: Installs iOS dependencies
  • iOS: Pod Update: Updates pods
  • iOS: Build IPA: Creates release IPA file

🤖 Android Tasks:

  • Android: Build APK: Creates release APK file
  • Android: Build APK (Development): Creates debug APK file
  • Android: Build AAB: Creates AAB file for Google Play Store

🧹 Flutter Clean & Get

  • Purpose: Cleans the project and reloads dependencies
  • Usage: When experiencing build issues or after dependency changes

�� How to Use:

  1. In VS Code, press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
  2. Type "Tasks: Run Task"
  3. Select the desired task
  4. Or use Ctrl+Shift+P → "Tasks: Run Build Task" for quick access

💡 Pro Tips:

  • Use "Watch Runner" during active development
  • "Flutter Clean & Get" is your friend when things go wrong
  • iOS tasks require CocoaPods to be installed
  • Android tasks require proper SDK setup

�� Requirements:

  • Flutter SDK installed
  • VS Code with Flutter extension
  • CocoaPods (for iOS tasks)
  • Android SDK (for Android tasks)
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Runner",
"type": "shell",
"command": "dart run build_runner build --delete-conflicting-outputs",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "tools"
}
},
{
"label": "Watch Runner",
"type": "shell",
"command": "dart run build_runner watch --delete-conflicting-outputs",
"group": "build",
"problemMatcher": [],
"isBackground": true,
"icon": {
"id": "eye"
}
},
{
"label": "iOS: Refresh Pod",
"type": "shell",
"command": "cd ios && rm -rf Pods && rm -rf Podfile.lock && pod deintegrate && pod setup && pod install && cd ..",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "refresh"
}
},
{
"label": "iOS: Pod Install",
"type": "shell",
"command": "cd ios && pod install && cd ..",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "package"
}
},
{
"label": "iOS: Pod Update",
"type": "shell",
"command": "cd ios && pod install --repo-update && cd ..",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "arrow-up"
}
},
{
"label": "iOS: Build IPA",
"type": "shell",
"command": "flutter build ipa --release",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "rocket"
}
},
{
"label": "Android: Build APK",
"type": "shell",
"command": "flutter build apk --release",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "rocket"
}
},
{
"label": "Android: Build APK (Development)",
"type": "shell",
"command": "flutter build apk",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "rocket"
}
},
{
"label": "Android: Build AAB",
"type": "shell",
"command": "flutter build appbundle",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "rocket"
}
},
{
"label": "Flutter Clean & Get",
"type": "shell",
"command": "flutter clean && flutter pub get",
"group": "build",
"problemMatcher": [],
"icon": {
"id": "refresh"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment