<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abdullah Al Sayeed on Medium]]></title>
        <description><![CDATA[Stories by Abdullah Al Sayeed on Medium]]></description>
        <link>https://medium.com/@alxayeed?source=rss-ca48b53a32eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fyN8qynEfXu3aGIkMnWtkw.png</url>
            <title>Stories by Abdullah Al Sayeed on Medium</title>
            <link>https://medium.com/@alxayeed?source=rss-ca48b53a32eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 14:09:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alxayeed/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding Flutter Flavors: The What, Why, and How]]></title>
            <link>https://alxayeed.medium.com/understanding-flutter-flavors-the-what-why-and-how-e1f558fdf251?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1f558fdf251</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flavor]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Mon, 23 Jun 2025 15:06:54 GMT</pubDate>
            <atom:updated>2025-06-23T15:06:54.311Z</atom:updated>
            <content:encoded><![CDATA[<h4>A step-by-step guide to setting up multiple environments in Flutter</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QaPNb1EHAIZAUmYhlamIrw.png" /></figure><p>Managing different environments like development, staging, and production is a common need in modern app development — and Flutter is no exception. Whether you’re working on a personal project or collaborating with a team, having separate configurations for each environment can save you time, prevent mistakes, and improve your workflow. In this guide, we’ll explore Flutter flavors: what they are, why you need them, and most importantly, how to set them up step-by-step. By the end, you’ll have a clear structure in place to manage multiple environments confidently within your Flutter project.</p><blockquote>If you prefer reading this article in Bangla, <a href="https://medium.com/@alxayeed/flutter-flavors-bangla-88e5c90c5e5e">you are welcome</a></blockquote><h3>What Are Flutter Flavors?</h3><p>Imagine your app is like an ice cream base — vanilla. Flutter flavors are like adding different toppings or syrups to create chocolate, strawberry, or mint versions. Each flavor shares the same core but offers something unique.</p><p>In the context of app development, flavors let you build multiple versions of your app — such as development, staging, and production — each with its own configurations like API endpoints, app icons, or feature toggles. They are similar to build variants in Android and schemes in iOS, providing a way to manage different environments efficiently. While Flutter doesn’t support flavors out-of-the-box, with a bit of setup, you can manage all these environments easily from a single codebase.</p><h3>Why Use Flutter Flavors?</h3><p>Imagine you’re working on an app that’s constantly evolving. You want to:</p><p>✅ <strong>Safe Testing:</strong> You can thoroughly test new features in the development version before releasing them to production.<br> 🔁 <strong>Separate Backend:</strong> Connect to a different server during development to avoid corrupting live data.<br> 🧪 <strong>Staging Environment:</strong> The QA team can properly verify features before they go to production.<br> 🎨 <strong>Distinct Branding:</strong> Clearly identify which version is which on the device by using different icons and app names.<br> 🧩 <strong>Feature Control:</strong> Features can be turned on or off depending on the environment — for example, a screen or feature may exist in dev but not in production.<br> 📊 <strong>Remote Monitoring:</strong> Logging tools like Crashlytics or Sentry can be used in production, but logs won’t be collected during development.</p><p>Without flavors, you’d have to manually change settings every time you switch between these environments — which is time-consuming and error-prone. Flavors let you handle all this cleanly within one codebase.</p><p>Using flavors not only speeds up your development but also reduces risks and improves your workflow, making collaboration smoother and deployments safer.</p><h3>How to configure Flavors?</h3><h4>Setup Flutter</h4><p><strong>1. Create the app config file</strong></p><p>To support multiple environments like dev and prod, we start by creating a shared app configuration model. This is where we define values that vary between flavors — such as app name, base URL, logging settings, etc.</p><pre>enum AppFlavor { dev, prod }<br><br>class AppConfig {<br>  final String appName;<br>  final String baseUrl;<br>  final AppFlavor flavor;<br>  final bool enableConsoleLogs;<br>  final bool enableRemoteLogs;<br><br>  AppConfig({<br>    required this.appName,<br>    required this.baseUrl,<br>    required this.flavor,<br>    required this.enableConsoleLogs,<br>    required this.enableRemoteLogs,<br>  });<br>}</pre><p><strong>2. Create the common file</strong></p><p>To avoid repeating setup code for each flavor, we use a shared main_common.dart file. It takes in the environment config and handles things like theming, logging, and launching the app—all from one place.</p><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;config/app_config.dart&#39;;<br>import &#39;theme/app_theme.dart&#39;;<br>import &#39;ui/home_screen.dart&#39;;<br><br>void runAppWithConfig(AppConfig config) {<br>  // Console Logging<br>  if (config.enableConsoleLogs) {<br>    // use any logger here<br>    debugPrint(&#39;🚀 &#39;<br>        &#39;${config.appName} is starting with [FLAVOR: ${config.flavor.name.toUpperCase()}] &#39;);<br>  }<br><br>  // Remote Logging (e.g., Crashlytics, Sentry)<br>  if (config.enableRemoteLogs) {<br>    // Initialize your crash reporting tool here<br>    // Example:<br>    // await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);<br>    <br>  }<br><br>  runApp(<br>    MaterialApp(<br>      debugShowCheckedModeBanner: config.flavor != AppFlavor.prod,<br>      title: config.appName,<br>      theme: getAppTheme(config.flavor),<br>      home: HomeScreen(config: config),<br>    ),<br>  );<br>}</pre><p>3. Create the different entry-points</p><p>We create separate entry files — main_dev.dart and main_prod.dart—to initialize the app with the correct configuration. Each file simply passes its respective AppConfig to the shared main_common.dart for setup.</p><p>For dev</p><pre>// main_dev.dart<br><br>import &#39;main_common.dart&#39;;<br>import &#39;config/app_config.dart&#39;;<br><br>void main() {<br>  final devConfig = AppConfig(<br>    appName: &#39;MyApp (Dev)&#39;,<br>    baseUrl: &#39;https://dev.api.example.com&#39;,<br>    flavor: AppFlavor.dev,<br>    enableConsoleLogs: true,<br>    enableRemoteLogs: false,<br>  );<br><br>  runAppWithConfig(devConfig);<br>}</pre><p>For prod</p><pre>// main_prod.dart<br><br>import &#39;main_common.dart&#39;;<br>import &#39;config/app_config.dart&#39;;<br><br>void main() {<br>  final prodConfig = AppConfig(<br>    appName: &#39;MyApp&#39;,<br>    baseUrl: &#39;https://api.example.com&#39;,<br>    flavor: AppFlavor.prod,<br>    enableConsoleLogs: false,<br>    enableRemoteLogs: true,<br>  );<br><br>  runAppWithConfig(prodConfig);<br>}</pre><h4>Android Changes</h4><p>Android already supports flavors via Gradle, so we configure our app level build.gradle.kts to define dev and prod product flavors. This lets us build each version with the correct application ID, label, icon, and even signing configs if needed.</p><pre># New way - app/build.gradle.kts<br><br>android {<br>    ...<br>    flavorDimensions += &quot;env&quot;<br><br>    productFlavors {<br>        create(&quot;dev&quot;) {<br>            dimension = &quot;env&quot;<br>            applicationIdSuffix = &quot;.dev&quot;<br>            versionNameSuffix = &quot;-dev&quot;<br>        }<br>        create(&quot;prod&quot;) {<br>            dimension = &quot;env&quot;<br>        }<br>    } <br> <br><br>//    For build.gradle files (the old way)<br>//    flavorDimensions &quot;env&quot;<br>//<br>//    productFlavors {<br>//        dev {<br>//            dimension &quot;env&quot;<br>//        }<br>//        prod {<br>//            dimension &quot;env&quot;<br>//        }<br>//    }<br><br>    <br>    ...<br>}</pre><p>You can also optionally override the launcher icon and app name per flavor to visually distinguish between builds on your device.</p><h4>Setting Up Flavors in iOS</h4><p>In iOS, we create flavors using <strong>Xcode schemes</strong> and <strong>build configurations</strong>. After duplicating the main scheme and setting up dev and prod configurations, we link them to the correct build settings and entry points.<br> Just like in Android, it’s also possible to customize the <strong>bundle ID</strong> and <strong>display name</strong> per flavor.</p><p>1. Open the ios folder in Xcode.</p><p>2. Select the Runner scheme and duplicate it. Name one scheme dev and the other prod (you can use any name you like).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H6U-OIXLq2x7EidRf9gxQQ.png" /></figure><p>3. In the project navigator on the left, click on the Runner → go to the Info tab. In the <strong>Configurations</strong> section, duplicate the existing Debug ,Profile and Release configurations. Rename one set to -dev and another to -prod.<br> For example: create Debug-dev, Profile-dev, Release-dev and Debug-prod,Profile-prod, and Release-prod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*rytuUUdYCSKGaKP-1f2qoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*aMuK7qUnl1RodDcjIQBRdw.png" /></figure><p>4. Go to Edit Scheme, and select one scheme eg prod scheme,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*k8felB51s0ECLbXy_hMidw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*jlBVNkJUPa8JWyd4EmXMyA.png" /></figure><p>select the appropriate Build Configuration for Run, Test, Profile, Analyze and Archive(e.g., Debug-prod or Release-prod).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*MJvLUSNR3vA5vvyQCuLlZw.png" /></figure><p>Do the same for the dev scheme, selecting Debug-dev or Release-dev.</p><h4>(Optional )</h4><p>If you want your dev and prod apps to have different names, icons, or run different Dart files (like main_dev.dart), you can:</p><p>Add the — target=lib/main_dev.dart flag under Build Phases &gt; Run Script<br>Customize Bundle ID and Display Name in Info.plist and project.pbxproj</p><h4>Setup IDE(Optional)</h4><p>To make it easier to run different flavors from the IDE, you can create separate run configurations for each entry point like main_dev.dart and main_prod.dart. In Android Studio, set the target file accordingly , add additional run arguments and specify the build flavor. This allows you to launch the correct environment with a single click, instead of using terminal commands every time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*oRTJSjvrHlD204WXLbyrKw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*A8DiKTbPTTAFS5FxvFXD8A.png" /></figure><h4>Run the project</h4><p>Now run the project in dev and prod by clicking the green run button from top or simply run this command</p><pre>flutter run --flavor dev -t lib/main_dev.dart<br>flutter run --flavor prod -t lib/main_prod.dart</pre><p>If everything is alright, you will see both flavors in action! Each flavor will launch with its own theme, app name, welcome message, base URL, and logging behavior — just as we configured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NVNt405FiSoRdL-txy1zqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dfu6buIOtTwg4Vcnyz19xg.png" /></figure><h4>Ending Note</h4><p>With that working fine, we are done with today’s article. However, Flutter flavors open the door to even more customization. You can set different app icons and display names for each flavor , include or exclude features conditionally, or even use separate Firebase projects per environment. As your app grows, flavors help you scale with confidence and keep things organized.</p><p>To check the code used in this article, check the <a href="https://github.com/alxayeed/flutter-flavor-demo">repository</a>.</p><p>If you want to get more articles like this, follow me on Medium or <a href="https://www.linkedin.com/in/alxayeed/">LinkedIn</a>.</p><p>Thanks for reading. Have a nice day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1f558fdf251" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Flavors : কী, কেন, আর কিভাবে]]></title>
            <link>https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/flutter-flavors-bangla-88e5c90c5e5e?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/88e5c90c5e5e</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[flavor]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Mon, 23 Jun 2025 15:05:23 GMT</pubDate>
            <atom:updated>2025-06-23T15:05:23.947Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter Flavors : কী, কেন, আর কিভাবে</h3><h4>ফ্লাটার অ্যাপে একাধিক এনভায়রনমেন্ট সেটআপের সহজ তরিকা</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QaPNb1EHAIZAUmYhlamIrw.png" /></figure><p>ফ্লাটার দিয়ে কাজ করতে গেলে আমরা অনেক সময় চাই ডেভেলপমেন্ট, স্টেজিং, আর প্রোডাকশনের মতো আলাদা আলাদা এনভায়রনমেন্টে অ্যাপ চালাতে। একেকটা এনভায়রনমেন্টে একেকরকম কনফিগারেশন দরকার পড়ে — যেমন আলাদা API URL, লগিং সেটিংস, বা থিম। একে একে ম্যানুয়ালি বদলাতে গেলে সময় লাগে, ভুল হয়, আর টিমে কাজ করলে ম্যানেজ করাও কঠিন হয়ে পড়ে।</p><p>এই সমস্যার সুন্দর সমাধান হলো — ফ্লাটার ফ্লেভারস।<br>এই আর্টিকেলে আমরা দেখবো ফ্লেভারস কী, কেন দরকার, আর খুব সহজভাবে কিভাবে ফ্লাটার প্রোজেক্টে এগুলো সেটআপ করা যায়। একবার বুঝে নিলে আপনি খুব সহজেই একসাথে অনেকগুলো এনভায়রনমেন্ট ম্যানেজ করতে পারবেন।</p><blockquote>আপনি চাইলে আর্টিকেলটি <a href="https://medium.com/@alxayeed/understanding-flutter-flavors-the-what-why-and-how-e1f558fdf251">ইংরেজিতেও</a> পড়তে পারেন</blockquote><h3>ফ্লাটার ফ্লেভার আসলে কী?</h3><p>ভাবুন আপনার অ্যাপটা একটা ভ্যানিলা আইসক্রিম — ফাউন্ডেশন একটাই। কিন্তু আপনি চাইলে একটায় চকোলেট সিরাপ, আরেকটায় মিন্ট বা স্ট্রবেরি দিতে পারেন। রেসিপি আলাদা না হলেও টেস্ট, লুক, আর ইউজার এক্সপেরিয়েন্স আলাদা হয়ে যায়।</p><p>ফ্লাটার ফ্লেভারও ঠিক তাই — একটা মূল কোডবেজ রেখে আপনি আলাদা আলাদা ভার্সন বানাতে পারেন, যেমন ডেভেলপমেন্ট , স্টেজিং , প্রোডাকশন ইত্যাদি। প্রতিটি ফ্লেভারে আলাদা সেটিংস থাকে — যেমন আলাদা API URL, ভিন্ন অ্যাপ আইকন, কনসোল লগ অন/অফ, বা ফিচার টগল। অ্যান্ড্রয়েডে যেমন বিল্ট ভ্যারিয়েন্ট আছে বা iOS-এ স্কিমস(Schemes) থাকে, ফ্লেভার দিয়ে ফ্লাটারে সেই প্রয়োজন মেটাতে পারি।</p><h3>কেন ফ্লাটার ফ্লেভার ব্যবহার করবেন?</h3><p>ধরুন আপনি একটা অ্যাপ নিয়ে কাজ করছেন যেটায় নিয়মিত আপডেট আসে। তখন আপনি চাইবেন —</p><p><strong>✅ নিরাপদে টেস্টিং</strong>: নতুন ফিচার প্রোডাকশনে পাঠানোর আগে ডেভেলপমেন্ট ভার্সনে ভালো করে টেস্ট করতে পারবেন।<br><strong>🔁 আলাদা ব্যাকেন্ড:</strong> ডেভেলপমেন্টে লাইভ ডেটা না নষ্ট করে আলাদা সার্ভারের সঙ্গে সংযোগ রাখা।<br><strong>🧪 স্টেজিং এনভায়রনমেন্ট:</strong> QA টিম যাতে প্রোডাকশনের আগে ফিচারগুলো ভালোভাবে যাচাই করতে পারে।<br><strong>🎨 আলাদা ব্র্যান্ডিং:</strong> ভিন্ন ভিন্ন ফ্লেভারের জন্য আলাদা আইকন আর অ্যাপ নাম ব্যবহার করা যায়।<br><strong>🧩 ফিচার কন্ট্রোল:</strong> ফিচার চালু বা বন্ধ করা যায় এনভায়রনমেন্ট অনুযায়ী, যেমন ডেভে হয়তো কোনো একটা স্ক্রিন বা ফিচার থাকবে কিন্তু প্রোডাকশনে থাকবে না। <br><strong>📊 রিমোট মনিটরিং:</strong> প্রোডাকশনে <em>Crashlytics</em> বা <em>Sentry</em>-এর মতো লগিং টুল ব্যবহার করা যাবে, কিন্তু ডেভে লগ জমা হবে না।<br>ফ্লেভার না থাকলে প্রতিবার হাতে ম্যানুয়ালি এসব সেটিং বদলাতে হবে, যা সময় নষ্ট করে এবং ভুল হওয়ার সুযোগ বাড়ায়। ফ্লেভারস দিয়ে এক কোডবেজ থেকে সবকিছু ম্যানেজ করা যায়, যা ডেভেলপমেন্ট ও ডিপ্লয়মেন্ট আরও নিরাপদ ও দ্রুততর করে।</p><h3>ফ্লাটার ফ্লেভার কীভাবে সেটআপ করবেন?</h3><h4>ফ্লাটার সেটাপ</h4><p><strong>১. অ্যাপ কনফিগারেশন Class তৈরি</strong></p><p>প্রতিটি এনভায়রনমেন্টের আলাদা আলাদা সেটিংস রাখার জন্য একটা কনফিগ Class বানাতে হবে। এখানে আমরা অ্যাপের নাম, <em>API Base URL</em>, লগিং অপশন ইত্যাদি রাখবো।</p><pre>enum AppFlavor { dev, prod }<br><br>class AppConfig {<br>  final String appName;<br>  final String baseUrl;<br>  final AppFlavor flavor;<br>  final bool enableConsoleLogs;<br>  final bool enableRemoteLogs;AppConfig({<br>    required this.appName,<br>    required this.baseUrl,<br>    required this.flavor,<br>    required this.enableConsoleLogs,<br>    required this.enableRemoteLogs,<br>  });<br>}</pre><p><strong>২. কমন ফাইল বানানো</strong><br>প্রতিটি flavor-এ আলাদা আলাদা কোড লেখার বদলে আমরা একটা কমন main_common.dart ফাইল তৈরি করবো। এটা ইনিশিয়ালাইজেশন, থিম, লগিং, আর অ্যাপ চালু করার কাজ করবে।</p><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;config/app_config.dart&#39;;<br>import &#39;theme/app_theme.dart&#39;;<br>import &#39;ui/home_screen.dart&#39;;<br><br>void runAppWithConfig(AppConfig config) {<br>  // Console Logging<br>  if (config.enableConsoleLogs) {<br>    // use any logger here<br>    debugPrint(&#39;🚀 &#39;<br>        &#39;${config.appName} is starting with [FLAVOR: ${config.flavor.name.toUpperCase()}] &#39;);<br>  }<br><br>// Remote Logging (e.g., Crashlytics, Sentry)<br>  if (config.enableRemoteLogs) {<br>    // Initialize your crash reporting tool here<br>    // Example:<br>    // await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);<br>    <br>  }<br><br>runApp(<br>    MaterialApp(<br>      debugShowCheckedModeBanner: config.flavor != AppFlavor.prod,<br>      title: config.appName,<br>      theme: getAppTheme(config.flavor),<br>      home: HomeScreen(config: config),<br>    ),<br>  );<br>}</pre><p><strong>৩. আলাদা আলাদা এন্ট্রি পয়েন্ট তৈরি</strong><br>ডেভেলপমেন্ট আর প্রোডাকশনের জন্য আলাদা আলাদা main_dev.dart এবং main_prod.dart ফাইল বানান, যেগুলো নিজেদের কনফিগারেশন দিয়ে main_common.dart কে কল করবে।</p><p>Dev এর জন্য:</p><pre>// main_dev.dart<br><br>import &#39;main_common.dart&#39;;<br>import &#39;config/app_config.dart&#39;;<br><br>void main() {<br>  final devConfig = AppConfig(<br>    appName: &#39;MyApp (Dev)&#39;,<br>    baseUrl: &#39;https://dev.api.example.com&#39;,<br>    flavor: AppFlavor.dev,<br>    enableConsoleLogs: true,<br>    enableRemoteLogs: false,<br>  );<br><br>runAppWithConfig(devConfig);<br>}</pre><p>Prod এর জন্য</p><pre>// main_prod.dart<br><br>import &#39;main_common.dart&#39;;<br>import &#39;config/app_config.dart&#39;;<br><br>void main() {<br>  final prodConfig = AppConfig(<br>    appName: &#39;MyApp&#39;,<br>    baseUrl: &#39;https://api.example.com&#39;,<br>    flavor: AppFlavor.prod,<br>    enableConsoleLogs: false,<br>    enableRemoteLogs: true,<br>  );<br><br>runAppWithConfig(prodConfig);<br>}</pre><h4>অ্যান্ড্রয়েডে ফ্লেভার সেটআপ</h4><p>Android-এ Gradle-এর মাধ্যমে flavors ডিফল্টভাবেই সাপোর্ট করে, তাই আমরা অ্যাপ-লেভেলের build.gradle.kts ফাইলে ডেভ এবং প্রোডাকশন flavor আলাদাভাবে কনফিগার করি।</p><pre># New way - app/build.gradle.kts<br><br>android {<br>    ...<br>    flavorDimensions += &quot;env&quot;<br><br><br>    productFlavors {<br>        create(&quot;dev&quot;) {<br>            dimension = &quot;env&quot;<br>            applicationIdSuffix = &quot;.dev&quot;<br>            versionNameSuffix = &quot;-dev&quot;<br>        }<br>        create(&quot;prod&quot;) {<br>            dimension = &quot;env&quot;<br>        }<br>    } <br> <br><br>//    For build.gradle files (the old way)<br>//    flavorDimensions &quot;env&quot;<br>//<br>//    productFlavors {<br>//        dev {<br>//            dimension &quot;env&quot;<br>//        }<br>//        prod {<br>//            dimension &quot;env&quot;<br>//        }<br>//    }<br>    <br>    ...<br>}</pre><p>এছাড়া অ্যান্ড্রয়েড এ আলাদা অ্যাপ আইডি, লেবেল, আইকন ইত্যাদি সেট করতে পারবেন।</p><h4>iOS-এ ফ্লেভার সেটআপ</h4><p>iOS-এ আমরা Xcode-এর scheme আর build configuration ব্যবহার করে flavors তৈরি করি। মূল scheme ডুপ্লিকেট করে dev আর prod কনফিগারেশন সেটআপ করার পর, সেগুলো সঠিক build settings আর entry point-এর সাথে যুক্ত করি।<br> Android-এর মতোই এখানে প্রতিটি flavor-এর জন্য আলাদা bundle ID আর display name কাস্টমাইজ করাও সম্ভব।</p><ol><li>Xcode-এ ios ফোল্ডারটি খুলুন।</li></ol><p>2. ওপরের বারে Runner scheme সিলেক্ট করে সেটি ডুপ্লিকেট করুন। একটির নাম দিন dev, আরেকটির নাম prod (আপনার ইচ্ছেমতো নাম দিতে পারেন)।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H6U-OIXLq2x7EidRf9gxQQ.png" /></figure><p>3. Xcode-এর বাম দিকের project navigator থেকে Runner-এ ক্লিক করুন → Info tab-এ যান। Configurations সেকশনে গিয়ে বিদ্যমান Debug, Profile আর Release কনফিগারেশনগুলো ডুপ্লিকেট করুন।<br> এক সেটের নাম দিন -dev, আরেক সেটের নাম দিন -prod। যেমন: Debug-dev, Profile-dev, Release-dev and Debug-prod,Profile-prod, and Release-prod।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*rytuUUdYCSKGaKP-1f2qoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*aMuK7qUnl1RodDcjIQBRdw.png" /></figure><p>4. Edit Scheme-এ যান এবং একটি scheme সিলেক্ট করুন, যেমন prod scheme।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*k8felB51s0ECLbXy_hMidw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*jlBVNkJUPa8JWyd4EmXMyA.png" /></figure><p>Run, Test, Profile, Analyze, এবং Archive এর জন্য উপযুক্ত বিল্ড কনফিগারেশন সিলেক্ট করুন।(যেমন Debug-prod or Release-prod)।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*MJvLUSNR3vA5vvyQCuLlZw.png" /></figure><p>dev scheme-এর জন্য একইভাবে করুন।</p><h4>(ঐচ্ছিক)</h4><p>যদি আপনি চান আপনার devএবং prodঅ্যাপগুলো আলাদা নাম, আইকন অথবা ভিন্ন Dart ফাইল (যেমন main_dev.dart) দিয়ে চালুকরা হোক, তাহলে:</p><ul><li>Build Phases &gt; Run Script এর মধ্যে — target=lib/main_dev.dart ফ্ল্যাগ যোগ করুন।</li><li>Info.plist এবং project.pbxproj-এ Bundle ID এবং Display Name কাস্টমাইজ করুন।</li></ul><h4>IDE সেটআপ (ঐচ্ছিক)</h4><p>IDE থেকে সহজে বিভিন্ন ফ্লেভার চালানোর জন্য, প্রতিটি এন্ট্রি পয়েন্ট যেমন main_dev.dartএবং main_prod.dart এর জন্য আলাদা রান কনফিগারেশন তৈরি করতে পারেন। অ্যান্ড্রয়েড স্টুডিওতে টার্গেট ফাইল ঠিকমতো সেট করে, অতিরিক্ত run arguments যোগ করে এবং build flavor দিয়ে দিলে, প্রতিবার টার্মিনাল কমান্ড ব্যবহার না করে এক ক্লিকে সঠিক এনভায়রনমেন্ট চালানো যায়।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*oRTJSjvrHlD204WXLbyrKw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*A8DiKTbPTTAFS5FxvFXD8A.png" /></figure><h4>প্রোজেক্ট রান করুন</h4><p>এবার dev ও prod ফ্লেভারগুলো রান করি:</p><pre>flutter run --flavor dev -t lib/main_dev.dart<br>flutter run --flavor prod -t lib/main_prod.dart</pre><p>সঠিকভাবে সেটআপ হলে, অ্যাপ শুরু হবে আলাদা আলাদা থিম, নাম, ও লগিং নিয়ে — যেমন আমরা কনফিগার করেছি।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NVNt405FiSoRdL-txy1zqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dfu6buIOtTwg4Vcnyz19xg.png" /></figure><h4>শেষ কথা</h4><p>ফ্লাটার ফ্লেভার দিয়ে আপনার অ্যাপ একসাথে অনেক পরিবেশে চালানো সহজ হয়। চাইলে আলাদা আলাদা আইকন, নাম, ফিচার, Firebase প্রকল্প ব্যবহার করতে পারেন। অ্যাপ বড় হলে ফ্লেভারস আপনাকে স্কেল করতে সাহায্য করবে এবং কোডবেজ পরিষ্কার রাখবে।</p><p>আর্টিকেলে ব্যবহৃত কোড দেখতে <a href="https://github.com/alxayeed/flutter-flavor-demo">রিপোজিটরি</a> দেখুন।</p><p>এ ধরনের আরো আর্টিকেল পেতে ফলো করতে পারেন মিডিয়াম অথবা <a href="https://www.linkedin.com/in/alxayeed/">লিংকডই</a>নে।</p><p>আর্টিকেলটি পড়ার জন্য ধন্যবাদ। আপনার দিনটি সুন্দর কাটুক!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88e5c90c5e5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/flutter-flavors-bangla-88e5c90c5e5e">Flutter Flavors : কী, কেন, আর কিভাবে</a> was originally published in <a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE">প্রোগ্রামিং পাতা</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[প্রি কমিট হুক — পরিচ্ছন্ন কোডবেজ]]></title>
            <link>https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A6%BF-%E0%A6%95%E0%A6%AE%E0%A6%BF%E0%A6%9F-%E0%A6%B9%E0%A7%81%E0%A6%95-7f7ce08ac652?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f7ce08ac652</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[bangla]]></category>
            <category><![CDATA[গিট]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Fri, 29 Dec 2023 11:25:37 GMT</pubDate>
            <atom:updated>2023-12-30T17:41:45.666Z</atom:updated>
            <content:encoded><![CDATA[<h3>প্রি কমিট হুক — পরিচ্ছন্ন কোডবেজ</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zTAtYqo-1fmMrv0Fv7GN0g.png" /></figure><h4>ভূমিকা</h4><p>ধরুন আপনি একটি প্রজেক্টে কাজ করছেন এবং মাত্রই একটি ফিচার বা বাগ ফিক্স এর কাজ শেষ করেছেন। এখন আপনার করা কোডগুলো কমিট করে অন্য ডেভেলপারদের জন্য পুশ করবেন। কিন্তু আপনি কি কিছু ভুলে যাচ্ছেন? হয়তো ডিবাগের জন্য কয়েক জায়গায় প্রিন্ট ফাংশন লিখেছিলেন, কিংবা আপনার লিন্টিং রুলসে কিছু ওয়ার্নিং দিচ্ছে, অথবা আপনার হয়তো ইউনিট টেস্ট স্যুট রেডি আছে, কমিট এর আগে দেখে নিতে চান সব টেস্ট আগের মতো ঠিকঠাক কাজ করছে কিনা।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*NYzfdJVtA7VEqcH_h7gB_g.png" /></figure><p>আপনার কি কখনো প্রশ্ন জেগেছে প্রতি কমিট এর আগে এইসব কাজ অটোমেট করার জন্য কোনো পদ্ধতি বা স্ক্রিপ্ট আছে কিনা যাতে করে বার বার এসব খুঁটিনাটি বিষয় ভুলে যেতে না হয়? সেই স্ক্রিপ্টই হয়তো আমাদের হয়ে এসব চেক করে দিবে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bnxk_KRLEDJDdB16I_PGgA.png" /></figure><p>আমারও মনে হয়েছে। অনেকবার।</p><p>এবং আন্দাজ করুন তো? ঠিক, আমাদের নতুন করে চাকা আবিষ্কারের দরকার নেই। গিট নিজেই এতো দারুণ আর শক্তিশালী যে, এমন কিছু ইতোমধ্যে নেই শুনলেই বরং অবাক লাগতো।</p><blockquote><em>এই আর্টিকেলের ইংরেজি ভার্সন পড়তে </em><a href="https://alxayeed.medium.com/tpre-commit-hooks-dafaf48bca42"><em>এখানে</em></a><em> ক্লিক করুন।</em></blockquote><h4>গিট হুকস</h4><p>গিট হুকস কী চলুন <a href="https://www.atlassian.com/git/tutorials/git-hooks">Atlassian</a> এর এই সংজ্ঞায় চোখ বুলিয়ে নেই</p><blockquote>Git hooks are scripts that run automatically every time a particular event occurs in a Git repository. They let you customize Git’s internal behavior and trigger customizable actions at key points in the development life cycle.</blockquote><p>সুন্দর বর্ণনা। হুক হচ্ছে এমন কিছু স্ক্রিপ্ট যা ডেভেলপমেন্ট এর বিভিন্ন ধাপ যেমন কমিট এর আগে-পরে, রিবেজ কিংবা মার্জ এর আগে পরে রান হবে। সেটা ক্লায়েন্ট বা সার্ভার দুই খানেই হতে পারে। এই স্ক্রিপ্টে কী কী হবে সেটা আমরা নিজেদের মতো ঠিক করে দিতে পারি। বিস্তারিত জানতে <a href="https://git-scm.com/docs/githooks">এখানে</a> আর <a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks">এখানে</a> চোখ বুলিয়ে নিতে পারেন।</p><p>এই আর্টিকেলে আমাদের উদ্দেশ্য ক্লায়েন্ট সাইডের একটি হুক, সুনির্দিষ্ট করে প্রি কমিট হুক কে আত্মস্থ করা।</p><h4>প্রি কমিট হুক</h4><p>প্রি কমিট হুক হচ্ছে এমন একটা স্ক্রিপ্ট যা প্রতি কমিট এর আগে রান হবে। স্ক্রিপ্ট এর ভেতরের সব ঠিকঠাক থাকলে কমিট হবে, কোনো সমস্যা থাকলে কমিট না হয়ে সমস্যাটা দেখিয়ে আগে সমাধান করতে বলবে।</p><p>আপনি কি কখনো প্রজেক্টের এর <em>hooks/</em>ফোল্ডারে উঁকি দিয়েছিলেন? এটা <em>.git </em>ফোল্ডারে থাকে। (<em>.git/কিন্ত হিডেন থাকে। প্রথমে একে আনহাইড করে নিতে হবে</em>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*mE31nlVsggnicbob9kFXSA.png" /></figure><p>ওখানে চোখ বুলালে দেখতে পারবেন অনেকগুলো হুক রয়েছে। যদিও এদের সবার শেষে <em>.sample </em>এক্সটেনশন দেয়া, কাজেই এরা ঘুমন্ত অবস্থায় আছে বলা যায়।</p><p>ঘুম ভাঙাতে <em>pre-commit.sample </em>ফাইলটিকে রিনেম করে .sample সরিয়ে দিয়ে কোনো টেক্সট এডিটরে ওপেন করুন-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*Bm55fESCfEkjLpNDoybbNg.png" /></figure><p>আপনি চাইলে লেখাগুলোয় চোখ বুলিয়ে নিতে পারেন অথবা সব মুছে দিতে পারেন, যেহেতু আমরা আমাদের নিজেদের মতো করে স্ক্রিপ্ট লিখবো</p><blockquote>স্ক্রিপ্টটি আমরা ব্যাশ, পাইথন রুবি ইত্যাদি অনেক ভাষায় লিখতে পারি। তবে এখানে আমরা ব্যাশ ব্যবহার করবো।</blockquote><p>কাজেই ফাইলের একেবারে শুরুতে #!/bin/bash লিখি যাতে বোঝা যায় এটা একটা ব্যাশ স্ক্রিপ্ট।</p><p>এখন, স্ক্রিপ্টে আমরা আসলে কী করতে চাই?</p><p>প্রতিটি কমিটের আগে আমরা নিচের কাজগুলো করতে চাই-</p><p>১. কোডগুলো ফরম্যাট করবো</p><p>২. dart analyze রান করে কোনো ওয়ার্নিং বা ইস্যু আছে কিনা চেক করতে চাই</p><p>৩. টেস্ট কেসগুলো রান করতে চাই</p><p>কিন্তু শুরুতে আমাদের একটা ব্যাপার বুঝে নিতে হবে। আমরা কি প্রজেক্ট এর ভেতরে থাকা সব ফাইলে এই চেকগুলো করতে চাই? এটা ভালো বুদ্ধি হবে না, কারণ প্রায় সব প্রজেক্টেই এমন অনেক ফাইল থাকে যেগুলোতে আসলে ডেভেলপমেন্ট রিলেটেড কোড থাকে না, যেমন এসেটস, ডিপেন্ডেন্সি ইত্যাদির ফাইল। আমাদের মূল কোডগুলো সব হয়তো একটা ফোল্ডারের ভেতরে থাকে। ফ্লাটারের ক্ষেত্রে সেটা lib/</p><p>আবার, lib/ এর ভেতরের সব ফাইলে কি আমরা চেক করতে চাই?</p><p>নাহ! আমাদের হয়তো ১০০ ফাইল আছে, কিন্তু আমরা চেঞ্জ করেছি হয়তো ১০ টি ফাইলে, আর তার মধ্যে হয়তো ৫ টি ফাইল আমাদের কমিট এর জন্য স্টেজিং এরিয়া তে এনেছি ।</p><p>মূলকথা হলো, আমরা শুধু স্টেজিং এরিয়াতে আনা ফাইলগুলোর উপর এই স্ক্রিপ্ট রান করতে চাই।</p><p>এখন আমরা format, analyze আর test কমান্ডগুলো স্টেজিং এরিয়ার সব ফাইলে রান করবো। কোডের পুনরাবৃত্তি কমানোর জন্য আমরা একটা ফাংশন লিখে ফেলি</p><pre># Function to check staged files<br>check_staged_files() {<br>    local command=&quot;$1&quot;<br><br># Get a list of staged files within the lib/ or test/ directory<br>    local staged_files<br>    staged_files=$(git diff --name-only --cached | grep -E &#39;^(lib/|test/)&#39;)<br>    # Run the specified command on each staged file<br>    for file in $staged_files; do<br>        if ! $command &quot;$file&quot;; then<br>            exit 1  # Exit the script if there&#39;s an issue<br>        fi<br>    done<br>}</pre><p>ওয়াও! কী হচ্ছে এখানে?</p><p>ধীরে, ব্যাপারগুলো আসলে সহজই। চলুন ধাপে ধাপে একটু দেখে নেই।</p><p>প্রথমে, <em>check_staged_files()</em> নামে একটা ফাংশন তৈরি করেছি যা আর্গুমেন্ট হিসেবে একটা কমান্ড নিবে। যেহেতু একাধিক কমান্ড রান করবো তাই কমান্ডটি আলাদা ভাবে আর্গুমেন্ট হিসেবে পাঠাবো।</p><p>দ্বিতীয়ত, lib/ আর test/ ডিরেক্টরির সব ফাইলগুলো একটা ভেরিয়েবল এ জমা করে রাখছি।</p><p>তৃতীয়ত, ভেরিয়েবলে থাকা এই সবগুলো ফাইলে আর্গুমেন্টে পাওয়া কমান্ডটি রান করবো। সব ঠিকঠাক থাকলে তো হলো-ই, যদি কোনো কমান্ড কোনো ফাইলে সমস্যা পায়, তাহলে আমরা exit 1 দিয়ে স্ক্রিপ্ট থেকে বের হয়ে যাবো যাতে সমস্যাটা বের করে ঠিক করতে পারি।</p><p>তেমন কঠিন না, তাই না? বলেছিলাম তো। চলুন এখন কমান্ডগুলো একে একে রান করি।</p><pre># Run code formatting using dart format on staged files<br>check_staged_files &quot;dart format --set-exit-if-changed&quot;<br><br># Run static code analysis using flutter analyze on staged files<br>check_staged_files &quot;flutter analyze&quot;<br># Run unit tests using flutter test<br>if ! flutter test; then<br>    exit 1<br>fi</pre><p>১. আমরা check_staged_files ফাংশন ব্যবহার করে সব স্টেজড ফাইলে ফরম্যাটিং করছি।</p><p>২. একইভাবে ফাইলগুলোতে কোনো লিন্টিং ইস্যু আছে কিনা জানার জন্য flutter analyze কমান্ড দিচ্ছি।</p><p>৩. সবশেষে আমাদের টেস্টকেস(যদি থাকে) রান করছি। যেহেতু এগুলো কোনো নির্দিষ্ট ফাইলের উপর চালাবো না, তাই <em>check_staged_files </em>ব্যবহার করছি না।</p><p>যদি সব ঠিকঠাকে থাকে আমাদের কমিটটি সফল হবে, আর যদি কোনো সমস্যা পাওয়া যায়, সেখানেই স্ক্রিপ্টটি থেমে গিয়ে আমাদেরকে সমস্যাটি সমাধান করতে বলবে। এভাবে সব সমস্যা সমাধান করলে কমিট সফল হয়ে যাবে।</p><p>সব টুকরো জোড়া লাগালে আমাদের পুরো স্ক্রিপ্টটি নিচের মতো হবে-</p><pre>#!/bin/bash<br><br># Function to check staged files<br>check_staged_files() {<br>    local command=&quot;$1&quot;<br>    # Get a list of staged files within the lib/ and test/ directory<br>    local staged_files<br>    staged_files=$(git diff --name-only --cached | grep -E &#39;^(lib/|test/)&#39;)<br>    # Run the specified command on each staged file<br>    for file in $staged_files; do<br>        if ! $command &quot;$file&quot;; then<br>            exit 1  # Exit the script if there&#39;s an issue<br>        fi<br>    done<br>}<br><br># Run code formatting<br>check_staged_files &quot;dart format --set-exit-if-changed&quot;<br># Run static code analysis<br>check_staged_files &quot;flutter analyze&quot;<br># Run unit tests<br>if ! flutter test; then<br>    exit 1<br>fi<br><br># Reapply the stash to other files<br>git stash pop<br># Exit with success status<br>exit 0</pre><p>আমাদের স্ক্রিপ্ট লেখার কাজ শেষ(প্রায়)। এখন তা টেস্ট করে দেখার সময়।</p><p>মিউজিক প্লিজ 🥁🥁</p><p>আপনারা যেকোনো প্রজেক্টে টেস্ট করে দেখতে পারেন, আমি আপাতত <a href="https://github.com/alxayeed/flutter-animation-graphics/tree/feature/pre-commit">এই এনিমেশন প্রজেক্টটায়</a> টেস্ট করে দেখছি, এখানে ইচ্ছাকৃত কিছু সমস্যা আর একটা ফেইল করা টেস্ট ফাইল আছে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ygwsdcU3enZYWK3-_fAYfQ.png" /></figure><p>টেস্ট ফাইলের ভেতরে একটু চোখ বুলিয়ে নেই</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6cpPwZIdCxXDK7st81RMg.png" /></figure><p>এটা জাস্ট একটা ডামি ফাইল যার কাজ হচ্ছে আপাতত ফেইল করা, যাতে আমরা স্ক্রিপ্টটি টেস্ট করতে পারি। সমস্যা নেই, শেষে আমরা ওকে পাশ করিয়ে দিবো।</p><p>এখন, আমরা মোট ৪ টি ফাইলে কিছু চেঞ্জ করেছি, তবে শুধু main আর dummy_test ফাইল দুটো স্টেজিং এরিয়াতে নিবো, যাতে করে দেখতে পারি চেক শুধু স্টেজিং এরিয়ার ফাইলে হচ্ছে কিনা।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7uok8BzgiuDtAwmCd6QY1w.png" /></figure><p>দুটো ফাইলকে স্টেজ করে নিয়েছি</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v2CMGpBr5wVjhYOWeurHZw.png" /></figure><p>এখন আমরা কোনো একটা কমিট করার চেষ্টা করবো। আমাদের প্রত্যাশা হচ্ছে, শুধু সবুজ ফাইল দুটোয়ে স্ক্রিপ্ট রান হবে। যেহেতু ফাইল দুটোয়ে লিন্টিং সমস্যা রয়েছে, আবার টেস্টকেসও ফেইল করবে, কাজেই আমাদের আশা কমিটটি সফল হবে না।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcxIMMaVOCNv_o92Po6_PQ.png" /></figure><p>আমরা দেখতে পাচ্ছি প্রথমে দুটো ফাইলে ফরম্যাটিং হয়েছে, এরপর flutter analyze শুরু হয়েছে। কিন্তু শুরুতেই main ফাইলে ইস্যু থাকায় স্ক্রিপ্ট থেমে গেছে এবং কনসোলে ইস্যুটি দেখিয়েছে ।</p><p>স্ক্রিপ্টটি Top-bottom পদ্ধতিতে, মানে উপর থেকে নিচে ধাপে ধাপে চলেছে। কোনো ধাপে সমস্যা পেলে নিচের ধাপে আর না গিয়ে কী সমস্যা হলো তা দেখিয়ে স্ক্রিপ্ট হতে বের হয়ে গিয়েছে এবং আমাদেরকে এখন সমাধান করে আবার কমিট করতে হবে। কনসোলে আমরা দেখতে পাচ্ছি কোন ফাইলে কী সমস্যা হয়েছে। আপাতত দুটো ফাইলের সমস্যাই ঠিক করে, ফাইলগুলো স্টেজে এড করে আবার কমিট করি।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRym07RhN_o20euyIG3N8A.png" /></figure><p>এখন দেখতে পাচ্ছি আমাদের flutter analyze এ কোনো সমস্যা পায়নি, এরপর টেস্ট কমান্ড রান করেছে। যেহেতু আমাদের টেস্ট ফেইল করেছে, তাই আবার কমিট বন্ধ হয়ে আমাদের টেস্ট পাশ করতে বলছে। এটা একটা ডামি টেস্ট তাই আমরা পাশ করিয়ে দিবো, তবে আসল টেস্ট কেসে আগে দেখতে হবে কেন ফেইল করলো, এরপর টেস্ট কেস নয় বরং কোডের ইস্যু ঠিক করতে হবে যাতে টেস্ট ঠিকঠাক পাশ হয়।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SG3Xs1t4NNiszKJUgv9F1Q.png" /></figure><p>ওয়াও! অবশেষে সব চেক সফলভাবে শেষ হয়েছে। আমাদের মূল কাজ শেষ, তবে কনসোল আউটপুট দেখতে বেশ একঘেয়ে লাগছে। চলুন একটু রঙ যোগ করে নেই</p><pre>#!/bin/bash<br><br># Color formatting sequences<br>error=&quot;\e[31;1m%s\e[0m\n&quot;<br>success=&quot;\e[32;1m%s\e[0m\n&quot;<br>info=&quot;\e[33;1m%s\e[0m\n&quot;<br>reset=&quot;\e[0m&quot;<br><br># Symbolic characters<br>checkmark=&quot;✅&quot;<br>crossmark=&quot;❌&quot;<br><br># Function to check staged files within the lib/ directory<br>check_staged_files() {<br>    local command=&quot;$1&quot;<br><br>    # Get a list of staged files within the lib/ directory<br>    local staged_files<br>    staged_files=$(git diff --name-only --cached | grep -E &#39;^(lib/|test/)&#39;)<br><br>    # Run the specified command on each staged file<br>    for file in $staged_files; do<br>        if ! $command &quot;$file&quot;; then<br>            printf &quot;${error}&quot; &quot;${crossmark}  $command error ${crossmark} &quot;<br>            exit 1  # Exit the script if there&#39;s an issue<br>        fi<br>    done<br>}<br><br># Inform the user that the pre-commit checks are starting<br>printf &quot;${success}&quot; &quot; ${checkmark}  Starting pre-commit checks... ${checkmark} &quot;<br><br><br><br># Run code formatting using dart format on staged files<br>printf &quot;${info}&quot; &#39;Running Flutter Formatter...&#39;<br>check_staged_files &quot;dart format --set-exit-if-changed&quot;<br>printf &quot;${success}&quot; &#39;Done!&#39;<br><br># Run static code analysis using flutter analyze on staged files<br>printf &quot;${info}&quot; &#39;Running Flutter analyzer...&#39;<br>check_staged_files &quot;flutter analyze&quot;<br>printf &quot;${success}&quot; &#39;Done!&#39;<br><br># Run unit tests using flutter test<br>printf &quot;${info}&quot; &#39;Running Unit Tests...&#39;<br>if ! flutter test; then<br>    printf &quot;${error}&quot; &quot;${crossmark} Unit tests error ${crossmark} &quot;<br>    exit 1<br>fi<br>printf &quot;${success}&quot; &#39;Done!&#39;<br><br><br># Inform the user that the pre-commit checks passed<br>printf &quot;${success}&quot; &quot;${checkmark}  Pre-commit checks passed. Committing ${checkmark} &quot;<br><br><br>exit 0</pre><p>এখন আবার কোনো চেঞ্জ করে কমিট করলে নিচের মতো আসবে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DTxjyggH0OoF3xAhSIqCPA.png" /></figure><p>এটা দেখতে বেশ ভালোই লাগছে। আমি নিজে এটা এখন প্রায় সব প্রজেক্টেই ব্যবহার করি। আপনারা অবশ্যই নিজেদের মতো করে স্ক্রিপ্ট এর ধাপ আর স্টাইল করে নিতে পারেন।</p><blockquote>কিন্তু কখনো যদি আমরা এই চেক বাইপাস করে চট করে কমিট করে ফেলতে চাই আগের মতো?</blockquote><p>আমরা সবসময়ই পরে চেক করে দেখতে পারি। যেহেতু কোনো ইস্যুই আপাত দৃষ্টিতে খুব বড়ো কিছু নয়। তবে একটা কথা হয়তো আমরা অনেকেই জানি, এখন না মানে আর কখনো না। সফটওয়ার ইঞ্জিনিয়ারিং এ এই কথা আরো বেশি সত্য। এতো কিছু আমাদের মাথায় থাকে যে পরের জন্য কিছু রেখে দিলে আর দেখা হয়ে উঠে না প্রায়ই। তাই সাথে সাথেই করে ফেলা ভালো।</p><p>তবুও বিভিন্ন সময় তাড়াহুড়োয় যদি আমরা প্রি কমিট হুকটি স্কিপ করতে চাই, তাহলে কমিট মেসেজ এর পরে শুধু — no-verify লিখে দিলেই হবে। এতে করে হুকটি আর রান হবে না।</p><pre> git commit -m &#39;Update: everythign is fine&#39; --no-verify</pre><p>শুরুতে এসব সময় নষ্ট বা অনেক কিছু মনে হতে পারে। তবে এই সব চেক রান হতে শুধু কিছু সেকেন্ড বাড়তি খরচ হয়। আর আমরা যদি ছোট ছোট চেঞ্জের জন্য কমিট করতে অভ্যস্ত হই, তাহলে সময় আরো কম লাগবে। তবে দিনশেষে এটা অনেক উপকারী বলে আমার কাছে মনে হয়। অনেকটা একজন কোড রিভিউয়ার এর মতো যে চেক করে টুকটাক জিনিসগুলো মনে করিয়ে দিচ্ছে, আর এমন ছোট ছোট চেক থেকেই পুরো কোডবেজ অনেকাংশে পরিচ্ছন্ন থাকবে, আমরা কিছু ভুলে গেলেও কমিট এর সময় মনে করিয়ে দেয়ার জন্য কেউ(অথবা কিছু) রয়েছে।</p><p>আজ এই পর্যন্তই । ধৈর্য্য ধরে এতোটা পড়ে আসতে পারার জন্য ধন্যবাদ। প্রি কমিট হুকে আর কী কী করা যায় বা আর কোন কোন হুক আপনারা ব্যবহার করেন আমাকে জানাতে পারেন।</p><p><a href="https://www.linkedin.com/in/alxayeed/">লিংকডইন</a> কিংবা মিডিয়ামে আমাকে ফলো করে রাখতে পারেন।</p><p>ধন্যবাদ।</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f7ce08ac652" width="1" height="1" alt=""><hr><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A6%BF-%E0%A6%95%E0%A6%AE%E0%A6%BF%E0%A6%9F-%E0%A6%B9%E0%A7%81%E0%A6%95-7f7ce08ac652">প্রি কমিট হুক — পরিচ্ছন্ন কোডবেজ</a> was originally published in <a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE">প্রোগ্রামিং পাতা</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Boosting Codebase Hygiene: Unleashing the Power of Pre-commit Hook]]></title>
            <link>https://alxayeed.medium.com/tpre-commit-hooks-dafaf48bca42?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/dafaf48bca42</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Fri, 29 Dec 2023 11:18:11 GMT</pubDate>
            <atom:updated>2023-12-29T11:27:11.846Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zTAtYqo-1fmMrv0Fv7GN0g.png" /></figure><h4>Preface</h4><p>Imagine you are working on a project, and you are just done implementing the feature or fixing the bug, or may be just some code refactoring. Now is the time to commit the changes and push it to others. But are you forgetting anything? Maybe you need to do some checks before committing. Maybe you want to run the tests to check if everything is working like before, or maybe you just want to check that there is no code smell in the code you are about to push.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*NYzfdJVtA7VEqcH_h7gB_g.png" /></figure><p>Have you thought of running this check automatically for you? Me too! I always wondered if there’s anything like that which will enforce me to being nice to the code I write.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bnxk_KRLEDJDdB16I_PGgA.png" /></figure><p>And guess what? We don’t need to re-invent the wheel. Because git itself is so powerful and charming, it would be so unlikely if there is not anything already.</p><blockquote>To read this article in Bangla, click <a href="https://alxayeed.medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A6%BF-%E0%A6%95%E0%A6%AE%E0%A6%BF%E0%A6%9F-%E0%A6%B9%E0%A7%81%E0%A6%95-7f7ce08ac652">here</a></blockquote><h4>Git hooks</h4><p>Let’s take a look at this nice definition from <a href="https://www.atlassian.com/git/tutorials/git-hooks">Atlassian</a>.</p><blockquote>Git hooks are scripts that run automatically every time a particular event occurs in a Git repository. They let you customize Git’s internal behavior and trigger customizable actions at key points in the development life cycle.</blockquote><p>Nicely described! Hooks are some scripts that may trigger at different points of your development — before or after commit, before rebase, after merge, before push and <a href="https://git-scm.com/docs/githooks">many more</a>. It can trigger both client or server side. You can learn more from the <a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks">documentation</a>.</p><p>In this article, we are interested in a client side hook, specifically the pre-commit hook in a flutter project.</p><h4>Pre-commit hook</h4><p>A pre-commit hook is a script that triggers every time we are about to make a commit. So we can do whatever we want to check before committing the changes. If the check fails, the commit will be halted.</p><p>Have you ever been to the <em>hooks/ </em>folder inside the<em> .git</em> folder of your project?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*mE31nlVsggnicbob9kFXSA.png" /></figure><p>If you do, you will see there are already some hooks there. If you look closely, all the files have <em>.sample</em> extension. That means they are sample files, kinda still deactivated.</p><p>Rename the <em>pre-commit.sample</em> file by removing <em>.sample</em> extension and open it in a text editor</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*Bm55fESCfEkjLpNDoybbNg.png" /></figure><p>You can try to read the script or may be just delete everything in it. Because we are going to write our own script!</p><blockquote>we can use our preferred language e.g. python, ruby or bash to write the script. bash is widely used, and we will also use bash.</blockquote><p>So we put #!/bin/bash at the very beginning of the file, indicating it’s a bash file.</p><p>Now, what are we going to do?</p><p>Before every commit, we want to check and do the following —</p><ol><li>format the code</li><li>Run the dart analysis to check for any warning or issues</li><li>Run the test cases</li></ol><p>But first, we have to understand one thing. Are we going to check all files in our project? That will not be wise because there could be many directories like assets or some others where we don’t want these checks. Ideally, our development related files are inside one directory, in flutter, which is the lib/ directory. Again, do we want to check all files inside lib/ ?</p><p>Nah! There could be a hundred files, but we changed may be 10 files, and we want to commit only 5 of them which are relevant to our commit. That’s why we have to add files in the staging area those needs to be committed with <em>git add </em>command.</p><p>The summary is, we want to check only the staged files that are going to be committed. We are settled here.</p><p>Now we want to run the format, analyze and test commands on all the staged files. To remove duplication, let’s create a function for that.</p><pre># Function to check staged files<br>check_staged_files() {<br>    local command=&quot;$1&quot;<br><br>    # Get a list of staged files within the lib/ or test/ directory<br>    local staged_files<br>    staged_files=$(git diff --name-only --cached | grep -E &#39;^(lib/|test/)&#39;)<br><br>    # Run the specified command on each staged file<br>    for file in $staged_files; do<br>        if ! $command &quot;$file&quot;; then<br>            exit 1  # Exit the script if there&#39;s an issue<br>        fi<br>    done<br>}</pre><p>Wow! Lots of <em>who-knows-what</em> thrown at the face!</p><p>Hold on, let’s quickly go through what is happening there.</p><p>First, we declare a function <em>check_staged_files()</em>, with a command that will be passed with this function. It is generic, since we will run 3 different commands.</p><p>Second, we are storing all staged files in a variable from lib/ and test/ directory.</p><p>Third, we are iterating over all the staged files, and running the command on each of them. If anything goes wrong in any file, that means our check failed, so we are exiting with exit 1.</p><p>Not so hard, right? Let’s use this function to run our commands.</p><pre># Run code formatting using dart format on staged files<br>check_staged_files &quot;dart format --set-exit-if-changed&quot;<br><br># Run static code analysis using flutter analyze on staged files<br>check_staged_files &quot;flutter analyze&quot;<br><br># Run unit tests using flutter test<br>if ! flutter test; then<br>    exit 1<br>fi</pre><ol><li>We are passing dart formatcommand to the <em>check_staged_files</em> function, which eventually format all staged files properly.</li><li>Similarly, we are running flutter analyze command, that will check all the staged files for any warning or issue raised by flutter linting.</li><li>At last, we are running the flutter test command. We are not using <em>check_staged_file</em> here, because running test is not related to any specific files, instead we want to run all tests in our repository.</li></ol><p>If everything is fine, the commit will be succeeded. Whether the checks pass or any issue occurs, we will go back to the state before running the script.</p><p>So putting all the pieces together, the pre-commit file will look like this</p><pre>#!/bin/bash<br><br># Function to check staged files<br>check_staged_files() {<br>    local command=&quot;$1&quot;<br><br>    # Get a list of staged files within the lib/ and test/ directory<br>    local staged_files<br>    staged_files=$(git diff --name-only --cached | grep -E &#39;^(lib/|test/)&#39;)<br><br>    # Run the specified command on each staged file<br>    for file in $staged_files; do<br>        if ! $command &quot;$file&quot;; then<br>            exit 1  # Exit the script if there&#39;s an issue<br>        fi<br>    done<br>}<br><br><br># Run code formatting<br>check_staged_files &quot;dart format --set-exit-if-changed&quot;<br><br># Run static code analysis<br>check_staged_files &quot;flutter analyze&quot;<br><br># Run unit tests<br>if ! flutter test; then<br>    exit 1<br>fi<br><br># Exit with success status<br>exit 0</pre><p>We are done (almost) with the script writing. It’s time for testing it in action.</p><p>Drum roll please! 🥁🥁</p><p>You can use it in any of your project, but I have used <a href="https://github.com/alxayeed/flutter-animation-graphics/tree/feature/pre-commit">this</a> Flutter animation project where I intentionally have some warnings and a failing test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ygwsdcU3enZYWK3-_fAYfQ.png" /></figure><p>Let’s take a look inside the test file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6cpPwZIdCxXDK7st81RMg.png" /></figure><p>and just a dummy unit test that absolutely does nothing but simulating test fail and pass scenario.</p><p>Now for the demonstration, I have added some changes in this test file and another file, but we will try to commit only the main and the test file,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7uok8BzgiuDtAwmCd6QY1w.png" /></figure><p>so we have added these 2 files to the staging area</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v2CMGpBr5wVjhYOWeurHZw.png" /></figure><p>Now try to commit. Our expectation is that, the checks will be running on main and test files since they are in staging area (the green ones), then start running the commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcxIMMaVOCNv_o92Po6_PQ.png" /></figure><p>We can see it formatted in 2 files. Then it started the flutter analyze command.</p><p>This program is executed on top to bottom manner. If at any point it encounters any issue, it immediately exits (remember the exit 1?) without executing anything else. In our case it starts with <em>main.dart</em> file, found a issue and exits. We can see in the console what are the issues. Now that we are reminded there are some issues in our staged files, let’s fix both of the file, add to staging area and commit again</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRym07RhN_o20euyIG3N8A.png" /></figure><p>Now we can see that no issues found in analyzing those files. Then it starts running the tests, and failed. Let’s fix the test case to be passed, by, add the changes and commit again</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SG3Xs1t4NNiszKJUgv9F1Q.png" /></figure><p>Hurrah! All of our checks passed, and the commit is successful. But the console looks a bit boring, right? Let’s add a some color to it.</p><pre>#!/bin/bash<br><br># Color formatting sequences<br>error=&quot;\e[31;1m%s\e[0m\n&quot;<br>success=&quot;\e[32;1m%s\e[0m\n&quot;<br>info=&quot;\e[33;1m%s\e[0m\n&quot;<br>reset=&quot;\e[0m&quot;<br><br># Symbolic characters<br>checkmark=&quot;✅&quot;<br>crossmark=&quot;❌&quot;<br><br># Function to check staged files within the lib/ directory<br>check_staged_files() {<br>    local command=&quot;$1&quot;<br><br>    # Get a list of staged files within the lib/ directory<br>    local staged_files<br>    staged_files=$(git diff --name-only --cached | grep -E &#39;^(lib/|test/)&#39;)<br><br>    # Run the specified command on each staged file<br>    for file in $staged_files; do<br>        if ! $command &quot;$file&quot;; then<br>            printf &quot;${error}&quot; &quot;${crossmark}  $command error ${crossmark} &quot;<br>            exit 1  # Exit the script if there&#39;s an issue<br>        fi<br>    done<br>}<br><br># Inform the user that the pre-commit checks are starting<br>printf &quot;${success}&quot; &quot; ${checkmark}  Starting pre-commit checks... ${checkmark} &quot;<br><br><br><br># Run code formatting using dart format on staged files<br>printf &quot;${info}&quot; &#39;Running Flutter Formatter...&#39;<br>check_staged_files &quot;dart format --set-exit-if-changed&quot;<br>printf &quot;${success}&quot; &#39;Done!&#39;<br><br># Run static code analysis using flutter analyze on staged files<br>printf &quot;${info}&quot; &#39;Running Flutter analyzer...&#39;<br>check_staged_files &quot;flutter analyze&quot;<br>printf &quot;${success}&quot; &#39;Done!&#39;<br><br># Run unit tests using flutter test<br>printf &quot;${info}&quot; &#39;Running Unit Tests...&#39;<br>if ! flutter test; then<br>    printf &quot;${error}&quot; &quot;${crossmark} Unit tests error ${crossmark} &quot;<br>    exit 1<br>fi<br>printf &quot;${success}&quot; &#39;Done!&#39;<br><br><br># Inform the user that the pre-commit checks passed<br>printf &quot;${success}&quot; &quot;${checkmark}  Pre-commit checks passed. Committing ${checkmark} &quot;<br><br><br>exit 0</pre><p>The output will look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DTxjyggH0OoF3xAhSIqCPA.png" /></figure><p>It looks pretty nice. I use this version a lot. You can make your own hook and decorate the way you want.</p><blockquote><strong><em>But what if you reeaally need to bypass some checks for now and commit anyway?</em></strong></blockquote><p>You can always check later, since these are not biting right at this moment. But ideally, you should never slip these off your hands for later. Because later often means never, and in coding it is very much true.</p><p>But still there can be a scenario where you just want to commit. Just append — no-verifyat the end of your commit message. It will ignore the hook.</p><pre> git commit -m &#39;Update: everythign is fine&#39; --no-verify</pre><p>At first, it may seem a lot of things going, but it only takes some seconds to run and check the tests. If you are used to committing specific small changes (which you should), you will find it very useful, like a mate who reminds you, hey! Be mindful of those issues and the test cases before pushing changes to others!</p><p>In the long run it will make your codebase nice and clean, and make you a careful programmer, who believes the great beauty lies in minding small things.</p><p>That’s a lot for today. If you find it useful, then my efforts are not in vain. See you later in some other articles.</p><p>You can check my medium and <a href="https://www.linkedin.com/in/alxayeed/">LinkedIn</a> profile to get updates about new articles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dafaf48bca42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FVM — ফ্লাটারের একাধিক ভার্সন ব্যবহার]]></title>
            <link>https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/use-multiple-fluter-version-8625c903cd7e?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/8625c903cd7e</guid>
            <category><![CDATA[bangla]]></category>
            <category><![CDATA[fvm]]></category>
            <category><![CDATA[ফ্লাটার]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Sat, 16 Sep 2023 06:47:49 GMT</pubDate>
            <atom:updated>2023-09-19T09:01:29.680Z</atom:updated>
            <content:encoded><![CDATA[<h3>FVM — ফ্লাটারের একাধিক ভার্সন ব্যবহার</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aVgZtloZvswP8sd5VsLQRw.png" /></figure><p>ধরুন আপনি একটা প্রজেক্টে কাজ করছেন(এর নাম দিলাম সিরিয়াস প্রজেক্ট), যাতে <em>3.7.3</em> ভার্সন ব্যবহার করছেন। এখন আরেকটি প্র্যাক্টিস প্রজেক্টে আপনি ফ্লাটারের সর্বশেষ ভার্সন ব্যবহার করতে চান। আপনি চাইলে ফ্লাটার ভার্সন আপগ্রেড করতে পারেন, তবে তাতে করে আপনার সিরিয়াস প্রজেক্টের ডিপেন্ডেন্সীতে ঝামেলা হবার সম্ভাবনা আছে, তখন যেখানে যেখানে সমস্যা সেগুলো ঠিক করতে হবে। সেটা না করে নতুন ভার্সনে আপগ্রেড করে কাজ করলেন। এখন কাজ শেষে আবার সিরিয়াস প্রজেক্টে কাজ করতে চাইলে আবার ভার্সন ডাউনগ্রেড করতে হবে।</p><p>আমরা চাইলে অনেক কিছুই করতে তো পারি, তবে হয়তো করতে চাই না। যেমন ধরুন ডিপেন্ডেন্সির কনফ্লিক্ট ঠিক করা, কিংবা ঘনঘন ভার্সন আপগ্রেড-ডাউনগ্রেড করা। অথচ বিভিন্ন প্রজেক্টে বিভিন্ন ভার্সন থাকা খুবই স্বাভাবিক ব্যাপার।</p><p>কেমন হতো যদি এমন কোনো পদ্ধতি থাকতো, যাতে করে আমরা আমাদের ডিভাইসে একই সাথে একাধিন ফ্লাটার ভার্সন ইনস্টল করতে পারতাম, এবং ভিন্ন ভিন্ন প্রজেক্টে ভিন্ন ভিন্ন ভার্সন ব্যবহার করতে পারতাম? ঠিক অনেকটা পাইথনের <em>venv</em> বা <em>pyenv </em>এর মতোন?</p><p>নিঃসন্দেহে খুবই ভালো হতো। আসলে প্রয়োজন যখন বাস্তবসম্মত, এমন পদ্ধতি অবশ্যই আছে!</p><blockquote>এই আর্টিকেলটি <a href="https://alxayeed.medium.com/fvm-use-different-versions-of-flutter-seamlessly-532d1330df3">ইংরেজি ভার্সনেও </a>প্রকাশিত হয়েছে।</blockquote><h4>FVM</h4><p>চলুন <em>FVM</em> কে স্বাগত জানাই। <em>FVM</em> এর পূর্ণরূপ হচ্ছে <em>Flutter Version Manager</em>। নামই যথেষ্ট সে কী করে তা বোঝানোর জন্য। এটা আমাদের ডিভাইসে একাধিক ভার্সন রাখতে সাহায্য করে। সেই সাথে আমরাএকাধিক চ্যানেল বা ফ্লেভারও ব্যবহার করতে পারি। এর মাধ্যমে ফ্লাটারের গ্লোবাল ভার্সন যেমন ঠিক করে দিতে পারি, তেমনি বিভিন্ন প্রজেক্টে বিভিন্ন ভার্সনও কনফিগার করে দিতে পারি। এমনকি প্রজেক্টে ব্যবহারের আগেই সর্বশেষ রিলিজ কিংবা বেটা রিলিজ এর স্বাদ নিয়ে দেখতে পারি। এটা আমাদের কাজ যেমন সহজ করে, তেমনি ব্যবহারও একেবারে সহজ সরল।</p><p>তবে এটা ইন্সটল আর ব্যবহার শুরুর আগে এর পেছনের মোটিভেশনগুলোয় চোখ বুলিয়ে নেই। <em>FVM</em> এর <a href="https://fvm.app/docs/getting_started/overview#motivation">অফিসিয়াল ডক</a> অনুযায়ী — <a href="https://fvm.app/docs/getting_started/overview#motivation">​</a></p><ul><li><strong><em>We need to have more than one Flutter SDK at a time.</em></strong></li><li><strong><em>Testing new SDK features requires switching between </em></strong><a href="https://flutter.dev/docs/development/tools/sdk/releases"><strong><em>Channels</em></strong></a><strong><em>.</em></strong></li><li><strong><em>The switch between channels is slow and requires reinstalling every time.</em></strong></li><li><strong><em>No way of keeping track of the latest working/used version of the SDK in an app.</em></strong></li><li><strong><em>Major Flutter updates require migration of all Flutter apps in the machine.</em></strong></li><li><strong><em>Inconsistent development environments between other devs in the team.</em></strong></li></ul><p>আচ্ছা , এবার হাতে ময়লা লাগাই।</p><h4>ইন্সটল করা</h4><p>মূলত দুভাবে আমরা <em>fvm</em> ইন্সটল করতে পারি। (এখন থেকে ছোট হাতের <em>fvm</em> নামে ডাকবো)</p><p>১। <strong>Standalone: </strong>এই পদ্ধতিতে আমরা গ্লোবালি <em>fvm</em> ইন্সটল করে ফ্লাটার ম্যানেজ করতে পারি. তবে আমরা এই পদ্ধতির বদলে ২য় টি অনুসরণ করবো। <a href="https://fvm.app/docs/getting_started/installation#recommendation">অফিসিয়াল ডকুমেন্টেশনেও</a> একই পরামর্শ দেয়া হয়েছে। তবু চাইলে এই পদ্ধতিতে চোখ বুলিয়ে নিতে পারেন।</p><p>২। <strong>Pub package:</strong> অফিসিয়াল নির্দেশনা অনুযায়ী আমাদের উচিত আগে ফ্লাটার <em>SDK</em> ইন্সটল করা, যেটা হবে আমাদের ডিভাইসে মেইন ভার্সন। এরপর <em>fvm</em> কে প্যাকেজ হিসেবে ইন্সটল করে বিভিন্ন প্রজেক্টে বিভিন্ন ভার্সন ব্যবহার করতে পারি।</p><p>ধরে নিচ্ছি আমাদের আগেই ফ্লাটার ইন্সটল করা আছে। এখন <em>fvm</em> ইন্সটল করা যেকোনো পাব প্যাকেজ ইন্সটল মতোই। শুধু কন্সোল ওপেন করে নিচের মন্ত্র পড়ে ফু দিন!</p><pre>dart pub global activate fvm</pre><p>আমার <em>fvm</em> ইন্সটল করা আছে। তাই আপনাদের আউটপুট পুরোপুরি নাও মিলতে পারে, তবে অনেকটাই নিচের মতো আসবে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*f_OwmB2KSDcUxq4MXrWx5A.png" /></figure><p>ব্যস এইটুকুই! এখন আমরা <em>fvm</em> এর বিভিন্ন মন্ত্র দিয়ে বিভিন্ন কাজ করে ফেলার জন্য প্রস্তুত।</p><p>চলুন মন্ত্র বা কমান্ডগুলোর সাথে পরিচিত হয়ে নেই।</p><blockquote>আমরা চাইলে ফ্লাটারের যেকোনো কমান্ডকে fvm এর কমান্ড হিসেবেও ব্যবহার করতে পারি। এরজন্য ফ্লাটার এর কমান্ডের আগে শুধু fvm জুড়ে দিলেই হবে। যেমন ধরুন fvm flutter pub get</blockquote><blockquote>কী দারুণ ব্যাপার, তাই না?</blockquote><h4>সকল ইন্সটল করা ভার্সনের লিস্ট দেখা</h4><p>সবার আগে আমরা দেখতে চাই আমাদের কী কী ভার্সন ইন্সটল করা আছে, তাই তো? কন্সোল ওপেন করে নিচের কমান্ড চালাই</p><pre>fvm list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*igc3xu0gko0uaKr1iAbKzg.png" /></figure><p>এখানে আমরা দেখতে পাচ্ছি আমাদের ডিভাইসে <em>fvm</em> এর মাধ্যমে কোন কোন ভার্সন ইন্সটল করা আছে। আমার ক্ষেত্রে এগুলো আছে। আপনাদের ক্ষেত্রে ফাঁকা থাকতে পারে, যেহেতু কোনো ভার্সন এখনো ইন্সটল করা হয়নি।</p><h4>সর্বশেষ রিলিজ চেক করা</h4><p>এখন আমরা চাচ্ছি নতুন ভার্সন ইন্সটল করতে, আসলে সর্বশেষ ভার্সনটি ইন্সটল করতে। কিন্তু এর আগে আমাদের জানতে হবে সর্বশেষ ভার্সন নাম্বারটি কতো। আমরা ব্রাউজার ওপেন করে ফ্লাটারের ওয়েবসাইটে গিয়ে রিলিজ ভার্সন গুলো চেক করে দেখতে পারি। তবে আমাদের হাতে তো জাদুর মন্ত্র আছে, তাহলে এতো কষ্ট কেন করবো?</p><p>কন্সোল ওপেন করে নিচের কমান্ড দেই</p><pre>fvm releases</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Od7o5Rd-j4hlFOteeJ6mew.png" /></figure><p>দেখতে পাচ্ছি ফ্লাটারের সর্বশেষ ভার্সন থেকে শুরু করে একেবারে ১ম ভার্সন পর্যন্ত লিস্ট আকারে দেখাচ্ছে। এখানে তারিখ, বছর, ভার্সন নাম্বার এমনকি স্টেবল নাকি বেটা চ্যানেলে সেটাও দেখাচ্ছে।</p><p>ওয়াও! এখন থেকে তো তাহলে আমাদের কষ্ট করে ফ্লাটারের সাইটে গিয়ে খুঁজতে হবে না(তবে যদি ভার্সন এর সাথে রিলিজ নোটও দেখতে চাই তো আলাদা কথা)</p><h4>নির্দিষ্ট ভার্সন ইন্সটল করা</h4><p>এখন যেহেতু আমরা ফ্লাটার পরিবারের সব পূর্বপুরুষের নাম-ধাম জন্মসাল দেখতে পাচ্ছি, এখান থেকে আমরা বংশের সর্বশেষ উত্তরসূরী, <em>3.13.4</em> ভার্সনটি ইন্সটল করবো। কীভাবে? অবশ্যই কমান্ড লাইনে মন্ত্র পড়ে।</p><p>কোনো নির্দিষ্ট ভার্সন ইন্সটল করতে আমাদের <em>fvm install &lt;version-no&gt;</em> কমান্ডটি দিতে হবে, আমাদের বেলায় ভার্সন নাম্বার <em>3.13.4</em></p><pre>fvm install 3.13.4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*Oksnbv2xSNY2ZgJhN4hzag.png" /></figure><p>ব্যাস! হয়ে গেলো ইন্সটল। চাইলে আমরা চেক করেও দেখতে পারি ।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*A9_MeOpYNEb6gbmjVNVKig.png" /></figure><h4>কোনো ভার্সন আনইন্সটল করা</h4><p>এখন আমরা চাইলে যতো খুশি ভার্সন রাখতে পারবো। তবে হার্ডডিস্কের জায়গা বরবাদ করার জন্য এটা কোনো ভালো বুদ্ধি নয়। কাজেই আমরা পুরোনো ভার্সনগুলো আনইন্সটল করে ফেলতে পারি। যেমন আমার বেলায় আমি <em>2.10.5 </em>ভার্সনটি আর ব্যবহার করছি না(আপাতত)। কাজেই একে রিমুভ করে দেয়াই ভালো।</p><p>আবারও, শুধু একটা কমান্ড দিলেই চলবে।</p><pre>fvm remove 2.10.5</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*2s4Rm2_spaUkUoWBsQETrg.png" /></figure><p>আমাদের ভার্সনটি আমাদের ডিভাইস থেকে আনইন্সটল হয়ে গেছে, তবে যেহেতু যেকোনো সময় আমরা আবার ইন্সটল করতে পারি, তাই আপাতত মন খারাপ না করে হাতের কাজ শেষ করি।</p><p><strong>গ্লোবাল ভার্সন সেট করা</strong></p><p>আমরা ফ্লাটারের মাল্টিপল ভার্সন ইন্সটল করেছি, তবে আমরা চাইলে কোনো একটা ভার্সনকে গ্লোবাল বা ডিফল্ট হিসেবে সেট করে দিতে পারি</p><pre>fvm global &lt;version-no&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*5HdAGVrvKp7HrmiU8oZFcQ.png" /></figure><p>এখানে আমি <em>3.13.4 </em>কে আমার গ্লোবাল ভার্সন হিসেবে সেট করেছি। এখন যদি আমরা কোনো ভার্সন এর কথা বলে না দেই, যেমন <em>fvm flutter create</em> প্রক্সি কমান্ড দিয়ে কোনো প্রজেক্ট তৈরী করি, সেখানে এই গ্লোবাল ভার্সনটাই ব্যবহৃত হবে।</p><h4>প্রজেক্টে নির্দিষ্ট ভার্সন কনফিগার করা</h4><p>এখন আমরা যদি আলাদা আলাদা প্রজেক্টে আলাদা আলাদা ভার্সন ব্যবহার করতে চাই তাহলে কী করবো? আবার একই প্রজেক্টের ভার্সন পরে চেঞ্জ করতে চাইলে কী করবো?</p><p>এর জন্যেও রয়েছে কমান্ড।</p><p><strong>fvm use</strong></p><p>যে প্রজেক্টে ভার্সন সেট করতে চাই তার রুট ডিরেক্টরিতে গিয়ে নিচের কমান্ড দিবো</p><pre>fvm use &lt;version-no&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*Eldlw4TCxVe6k1nmrket2Q.png" /></figure><p>এখানে আমরা <em>3.7.3 </em>ভার্সনটা ব্যবহার করছি। আগে একটু বুঝে নেই এই কমান্ড কী কাজ করছে।</p><p>উপরের ছবিতে আমরা দেখতে পাচ্ছি, কমান্ড দেয়ার পরে প্রজেক্টের রুট ডিরেক্টরিতে একটা <em>.fvm/</em> ডিরেক্টরি তৈরী হয়েছে, যার ভেতরে আছে একটা জেসন ফাইল, যেখানে আমাদের ব্যবহৃত ভার্সনের নাম্বার দেয়া আছে, সাথে একটা <em>flutter_sdk/ </em>ডিরেক্টরি তৈরী হয়েছে। এই ডিরেক্টরিটা আসলে একটা রেফারেন্সের মতো, যেটা <em>fvm</em> এর ডাউনলোড করা বিভিন্ন ভার্সনের ডিরেক্টরির কপি ভার্সন বলা যায়, আমাদের বেলায় যেটা <em>3.7.3</em> ভার্সন।</p><p>এখন আমাদের এডিটর বা <em>IDE</em> থেকে যদি আমরা এই ডিরেক্টরিকে আমাদের <em>Flutter SDK path</em> এ সেট করি, তাহলে পরে আবার ভার্সন চেঞ্জ করলে এই ডিরেক্টরির ভেতরের ফাইলগুলো চেঞ্জ হবে, কিন্তু আমাদের <em>Flutter SDK path</em> টা কিন্তু একই থাকছে। এভাবে আমরা আমাদের এডিটর বা <em>IDE</em> কনফিগার করতে পারি।</p><p>কিন্তু তার আগে আমাদেরকে এই ডিরেক্টরিটাকে <em>.gitignore</em> এ জুড়ে দিতে হবে, যাতে এর ভেতরের ফাইলগুলো কমিট বা পুশ না হয়।</p><pre>.fvm/flutter_sdk</pre><p>এবার আমাদের এডিটর/IDE কনফিগার করার পালা</p><p><strong>VS Code</strong></p><p>রুট ডিরেক্টরিতে <em>.vscode/</em> নামে আরেকটা ডিরেক্টরি তৈরি করি, তার ভেতরে <em>settings.json</em> নামে একটা ফাইল তৈরি করি, এরপর নিচের কোডটুকু জুড়ে দেই</p><pre>{<br>  &quot;dart.flutterSdkPath&quot;: &quot;.fvm/flutter_sdk&quot;,<br>  // Remove .fvm files from search<br>  &quot;search.exclude&quot;: {<br>    &quot;**/.fvm&quot;: true<br>  },<br>  // Remove from file watching<br>  &quot;files.watcherExclude&quot;: {<br>    &quot;**/.fvm&quot;: true<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4QdZlf6Qm8tyBHOg7PWFmg.png" /></figure><p>ব্যস, কাজ শেষ।</p><p><strong>Android studio</strong></p><p>এনড্রয়েড স্টুডিও এর জন্য ব্যাপারটা একটু আলাদা, তবে আরো সহজ।</p><p>ধরে নেই আমাদের <em>practice_project</em> এর জন্য আমরা <em>3.13.4</em> টা ব্যবহার করবো এবং এনড্রয়েড স্টুডিওতে কনফিগার করবো। শুরুতে আগের মতোইভার্সন সেট করে নেই।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*zWdnVN0IZgkPruV3RyJXPw.png" /></figure><p>এখন এনড্রয়েড স্টুডিওর উপরে বাম কোণায় File আছে যে, ওখান থেকে ক্লিক করা শুরু করি, <strong><em>file&gt;Settings…&gt;Languages &amp; Frameworks&gt; Flutter</em></strong></p><p>এখন আমাদের প্রজেক্টে তৈরী হওয়া সেই <strong><em>./fvm/flutter_sdk/ </em></strong>এর পাথটা হুবহু কপি করে <strong><em>Flutter SDK</em></strong><em> </em><strong><em>path</em></strong> এ বসিয়ে সেভ করি।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*--2qhkYcGwLN3GNzLadxwQ.png" /></figure><p>কনফিগারেশন এর পরে <em>VS Code</em> বা <em>Android Studio</em> রিস্টার্ট দিতে ভুলবেন না।</p><p>ব্যস, আমাদের কনফিগারেশন এর ঝামেলা শেষ।</p><p><strong>fvm doctor</strong></p><p>সবশেষের আগে, আমরা চাইলে <em>fvm doctor</em> কমান্ড ব্যবহার করে নিচের মতো বিভিন্ন তথ্য পেতে পারি। আমার কাছে যেটা পছন্দ হয়েছে, তা হচ্ছে প্রজেক্টে ফ্লাটারের কোন ভার্সন ব্যবহার হচ্ছে তা পরিষ্কারভাবে বলে দেয়া আছে। এমনিতে এই ফ্লাটারে এই তথ্য পাওয়া সবসময় একটু ঝক্কির কাজ মনে হয়েছে আমার কাছে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*kG6TQXtkVjJR9R0Ot1652Q.png" /></figure><h4>উপসংহার</h4><p><em>fvm</em> দিয়ে আমরা আরো এডভান্স কাজও করতে পারি। যেমন, প্রজেক্ট ফ্লেভার, কাস্টম ফ্লাটার ভার্সন, কোনো নির্দিষ্ট রিভিশন ইন্সটল কিংবা একাধিক চ্যানেলে রিলিজ করা। কিন্তু আমাদের দৈনন্দিন কাজের জন্য যা যা প্রয়োজন আমরা এই আর্টিকেলে দেখেছি। যদি কখনো এরচেয়ে বেশি কিছুর প্রয়োজন হয় আমরা অফিশিয়াল ডকুমেন্টেশন দেখে করে ফেলতে পারি। অথবা কে জানে তার জন্য একটা নতুন আর্টিকেলও হয়তো লিখে ফেলা যেতে পারে। তবে আজ এই পর্যন্তই।</p><p>সামনে অন্য কোনো টপিকে অন্য কোনো আর্টিকেলে দেখা হবে ইনশা আল্লাহ। যেকোনো মন্তন্য বা পরামর্শের জন্য আগাম ধন্যবাদ। নতুন কোনো আপডেট পেতে আমাকে <a href="https://www.linkedin.com/in/alxayeed/">লিংকডইনে</a> ফলো করতে পারেন।</p><p>ধন্যবাদ।</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8625c903cd7e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/use-multiple-fluter-version-8625c903cd7e">FVM — ফ্লাটারের একাধিক ভার্সন ব্যবহার</a> was originally published in <a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE">প্রোগ্রামিং পাতা</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FVM — use different versions of flutter seamlessly]]></title>
            <link>https://alxayeed.medium.com/fvm-use-different-versions-of-flutter-seamlessly-532d1330df3?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/532d1330df3</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[fvm]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Sat, 16 Sep 2023 06:31:40 GMT</pubDate>
            <atom:updated>2023-09-16T08:26:53.980Z</atom:updated>
            <content:encoded><![CDATA[<h3>FVM — use different versions of flutter seamlessly</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aVgZtloZvswP8sd5VsLQRw.png" /></figure><p>You are working on a flutter project(let’s call it <em>serious_project</em>) that uses version 3.7.3, but there is a new practice project(and name it <em>practice_project</em>) where you want to use the latest stable version. You could update the flutter that is installed on your machine, but that could lead to some dependency conflicts with the packages you are using in your serious project. You have to manually resolve those conflicts by updating some portion of the code. You could still update to latest flutter version, done the practice project then again downgrade to <em>3.7.3</em> , to continue with your serious project.</p><p>You could do many things that you simply don’t want to. For example, here upgrading and downgrading is not only a very hectic approach, it is also very bad one. What will you even do if you have to work on both project frequently? Will you keep upgrading and downgrading? I bet not.</p><p>Wouldn&#39;t it be easy(and more realistic) to be able to install and use multiple version of flutter at once? Just like <em>venv</em> or <em>pyenv</em> in python?</p><p>It definitely would, and there is actually something like this!</p><blockquote>This article is also published in <a href="https://medium.com/@alxayeed/use-multiple-fluter-version-8625c903cd7e">Bangla</a></blockquote><h4>FVM</h4><p>Say Hi to <em>FVM</em>, which stand for Flutter Version Manager. Self explanatory to what it’s name says. It lets the user use multiple version of flutter simultaneously in your machine. Even more, it lets you use multiple channels and flavors. It lets you use a specific version as a global version or a per project version. It is very very helpful to maintain different version for different projects. It is also helpful if you want to just give a try to the latest version or a different channel before actually upgrading to it. It is that helpful, and guess what? it is more than that easy to use!</p><p>But before going to install it, lets see what motivates the FVM team to bring it to light-</p><h4><a href="https://fvm.app/docs/getting_started/overview#motivation">Motivation</a><a href="https://fvm.app/docs/getting_started/overview#motivation">​</a></h4><ul><li><strong><em>We need to have more than one Flutter SDK at a time.</em></strong></li><li><strong><em>Testing new SDK features requires switching between </em></strong><a href="https://flutter.dev/docs/development/tools/sdk/releases"><strong><em>Channels</em></strong></a><strong><em>.</em></strong></li><li><strong><em>The switch between channels is slow and requires reinstalling every time.</em></strong></li><li><strong><em>No way of keeping track of the latest working/used version of the SDK in an app.</em></strong></li><li><strong><em>Major Flutter updates require migration of all Flutter apps in the machine.</em></strong></li><li><strong><em>Inconsistent development environments between other devs in the team.</em></strong></li></ul><h4>Installation</h4><p>There are two ways you can install fvm(<em>from now we will call it with all lowercase</em>).</p><ol><li><strong>Standalone: </strong>This way you use fvm to manage your global flutter versions. However, we are not going to follow this approach. We will be following the<em> recommended approach</em>. In case you are curious, take a look at the steps in <a href="https://fvm.app/docs/getting_started/installation#standalone">docs</a></li><li><strong>Pub package:</strong> FVM recommends to install Flutter SDK manually, which will be the main version of Flutter across your machine. Then use fvm to manage versions per project. Let’s go!</li></ol><p>Assuming you have flutter SDK already installed, it is as easy as installing any pub packages. Just open the console and cast the spell!</p><pre>dart pub global activate fvm</pre><p>I already have it installed. So your output could be a little different.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*f_OwmB2KSDcUxq4MXrWx5A.png" /></figure><p>That’s it! Now you can use fvm command to unleash many things!</p><p>Let’s play around with the commands.</p><blockquote>you can proxy any flutter command by just adding fvm before it. For example, fvm flutter pub get.</blockquote><blockquote>How cool is that?</blockquote><h4>List all installed versions</h4><p>First, you want to see how many flutter version you have already installed, right? lets do it</p><pre>fvm list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*igc3xu0gko0uaKr1iAbKzg.png" /></figure><p>I have these two versions installed. Probably you have none, since you have not installed yet. Lets go towards this.</p><h4>Check the available releases</h4><p>Now you want to install a flutter version. But which one? most probably the latest one. But what is latest version? You can go to the official website to check it, or even better, you can type this command</p><pre>fvm releases</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Od7o5Rd-j4hlFOteeJ6mew.png" /></figure><p>See? It shows from the latest version to all the way back to the first release, with date, year, version no and channels(stable or beta).</p><p><em>WOW</em>! I no longer need to go to check the website(unless I want to see the release notes).</p><h4>Install a specific version</h4><p>Now you have seen all the ancestors of flutter family, and you want install the younger one, <em>3.13.4</em>. How? just a command I say!</p><p>To install a specific version of flutter, fire up the console, type <strong><em>fvm install &lt;version-no&gt;</em></strong> and hit enter.</p><pre>fvm install 3.13.4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*Oksnbv2xSNY2ZgJhN4hzag.png" /></figure><p>Well, it’s installed! Lets check it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*A9_MeOpYNEb6gbmjVNVKig.png" /></figure><h4>Remove a specific version</h4><p>You can have as many version as you wish, but probably you don’t want to eat all your disk space in this way. So? remove unused versions. For example, you may no longer need <em>2.10.5</em>. So, say bye.</p><p>again, just a command I say!</p><pre>fvm remove 2.10.5</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*2s4Rm2_spaUkUoWBsQETrg.png" /></figure><p>With just it, 2.10.5 is gone(only from your machine. and you can definitely install again if needed. So no need be nostalgic. We have things to do.)</p><h4>Set a global flutter version</h4><p>You have installed multiple flutter version. Now you want to set one of them as global, or say, default version. How do you do that?</p><p>Simply declare that version as global with the following command. That’s it.</p><pre>fvm global &lt;version-no&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*5HdAGVrvKp7HrmiU8oZFcQ.png" /></figure><p>Here I have declared the latest one as default. Now if I create a new flutter project with <strong><em>fvm flutter create</em></strong> command(<em>you can proxy any flutter command with fvm, remember?</em>), the project will take the default or global version.</p><h4>Configure specific version for a project</h4><p>But you want to specifically select a particular version for a project. Perhaps you may want to change the version later. How?</p><p><strong>fvm use</strong></p><p>you just go to the root directory of your project, open the console, and give the command</p><pre>fvm use &lt;version-no&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*Eldlw4TCxVe6k1nmrket2Q.png" /></figure><p>Here we use <em>3.7.3</em> version for our serious project. That’s it?</p><p>Not yet. We have some tiny but important things to do. Lets understand what this command does.</p><p>It will create a <em>.fvm/ </em>directory in the root of the project. If you take a closer look inside, we have a<em> fvm_config_json</em> file, and a<em> flutter_sdk/</em> directory. This directory is actually a copy of the selected version in our main fvm directory. Now if we set this directory location in our Editor/IDE’s <em>Fluter sdk path</em>, it will always remain same even the contents inside will be changed if we use a different version later.</p><p>But before that, we need add this<em> flutter_sdk/</em> directory to<em> .gitignore,</em> because it has lots of file in it which we don’t want to include in our git commit or push. However we want to include the <em>config_json</em> file, just to know and let others know which version is being used.</p><pre>.fvm/flutter_sdk</pre><p>Now, we have to configure our favorite IDE so that it points to this <em>flutter_sdk/ </em>directory as it’s sdk path.</p><p>Enough talk, lets do it.</p><p><strong>VS Code</strong></p><p>just create a <em>.vscode/ </em>directory in the root of your project, create a <em>settings.json</em> file and add the following content in it</p><pre>{<br>  &quot;dart.flutterSdkPath&quot;: &quot;.fvm/flutter_sdk&quot;,<br>  // Remove .fvm files from search<br>  &quot;search.exclude&quot;: {<br>    &quot;**/.fvm&quot;: true<br>  },<br>  // Remove from file watching<br>  &quot;files.watcherExclude&quot;: {<br>    &quot;**/.fvm&quot;: true<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4QdZlf6Qm8tyBHOg7PWFmg.png" /></figure><p>As simple as that.</p><p><strong>Android studio</strong></p><p>for android studio it’s a something different, but still very easy. Lets say you want to use <em>3.13.4</em> for your practice_project. First give <strong><em>fvm use</em></strong> command as before</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*zWdnVN0IZgkPruV3RyJXPw.png" /></figure><p>Now on top left of the IDE, click<em> </em><strong><em>file&gt;Settings…&gt;Languages &amp; Frameworks&gt; Flutter</em></strong></p><p>Now copy the exact path of the <strong><em>./fvm/flutter_sdk/</em></strong> directory of your project, and set it in your <strong><em>Flutter SDK path</em></strong> and click save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*--2qhkYcGwLN3GNzLadxwQ.png" /></figure><p>We are done with the configuration.</p><p><strong>fvm doctor</strong></p><p>Now before we opt out, we have a <strong><em>fvm doctor</em></strong> command similar to flutter doctor, it shows many information of the project, including the version that is being used in the project. I find it difficult to get the used version with other ways before. Thanks again to fvm!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*kG6TQXtkVjJR9R0Ot1652Q.png" /></figure><h4>Conclusion</h4><p>There are many other things you can do with fvm, for example project flavors, custom flutter versions, install specific revision or may be releasing to multiple channels. FVM team has all that covered. But may be that’s too many for you for now, because we will pretty much need what we have covered in our day to day life. And you can always go to the <a href="https://fvm.app/docs/getting_started/overview">official docs</a> for what is not covered. This article is just to get up and running with fvm.</p><p>That’s all for this article. To get latest update, follow me on <a href="https://www.linkedin.com/in/alxayeed/">LinkedIn</a>. We will meet in another article insha Allah.</p><p>Till then- stay happy, keep learning and keep sharing knowledge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=532d1330df3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ফ্লাটারে গিটহাব একশনস এর ব্যবহার — এপিকে বিল্ডকে অটোমেট করা]]></title>
            <link>https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/automate-apk-generation-in-flutter-4776f2527f58?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4776f2527f58</guid>
            <category><![CDATA[apk]]></category>
            <category><![CDATA[cicd-pipeline]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[bangla]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Sat, 08 Jul 2023 11:18:11 GMT</pubDate>
            <atom:updated>2023-07-15T14:20:55.748Z</atom:updated>
            <content:encoded><![CDATA[<h3>ফ্লাটারে গিটহাব একশনস এর ব্যবহার — এপিকে বিল্ডকে অটোমেট করা</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aSWl_vzfW0OAx_SxmHYg-g.png" /></figure><h4>ভূমিকা</h4><p>আমরা যখন ফ্লাটারে(বা অন্য যেকোনো কিছু দিয়ে) কোনো মোবাইপ এপ তৈরি করি, তখন আমাদের উদ্দেশ্য থাকে তা যেন ব্যবহারকারী কেউ ব্যবহার করতে পারে। যেমন এন্ড্রয়েডের ক্ষেত্রে আমরা প্লেস্টোর থেকে সরাসরি ইন্সটল করি। অনেক সময় বিভিন্ন জায়গা থেকে apk ফাইল ডাউনলোড করে ইন্সটল করি। এছাড়াও ডেভেলপমেন্ট চলাকালীন টেস্টিং এর জন্য প্রায়শই apk ফাইল আদান প্রদান করতে হয়। যদিও এরজন্যে ভালো উপায় হচ্ছে এপ ডিস্ট্রিবিউশন এর মাধ্যমে শেয়ার করা। তবে সেটা হয়তো সবক্ষেত্রে করা হয়ে উঠে না। অনেক সময় সিম্পল একটা apk ফাইল জেনারেট করাই আমাদের উদ্দেশ্য থাকে। কিন্তু আমরা প্রোগ্রামরা যেহেতু অলস, তো বারবার ম্যানুয়ালি কমান্ড চালিয়ে ফাইল তৈরি করা বিরক্ত লাগতে পারে। কাজেই আজকে আমরা দেখবো কীভাবে গিটহাব একশনসকে কাজে লাগাতে পারি, যাথে , আমাদের রিপোজিটরিতে পুশ করলে অটোমেটিক apk ফাইল তৈরি হয়ে যায়।</p><blockquote><strong>(এই আর্টিকেলের মূল ফোকাস গিটহাব একশনস এর ব্যবহার। কাজেই ফ্লাটার ও গিটের প্রাথমিক ধারণা থাকা কাম্য)</strong></blockquote><h4>হাতে ময়লা লাগাই</h4><p>শুরুতেই আমরা কমান্ড চালিয়ে একটা ফ্লাটার প্রজেক্ট তৈরি করে নিবো। যেহেতু এপ দেখতে কেমন বা কী করবে সেটা নিয়ে আমাদের মাথা ব্যাথা নেই, কাজেই প্রজেক্টটা হবে একেবারেই সিম্পল, যে আসলে কিছুই করবে না।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vFYIaZ9G_HjoJzRmtcTWtQ.png" /></figure><p>এবার প্রজেক্টের জন্য গিটহাবে একটি রিপোজিটরি তৈরী করতে হবে, এরপর তারসাথে আমাদের প্রজেক্ট কানেক্ট করতে হবে যাতে আমরা আমাদের কোড পুশ করতে পারি।</p><h4>কনফিগারেশন ফাইল তৈরী</h4><p>ব্যস! ফ্লাটারে আমাদের কাজ শেষ। সত্যিই!</p><p>এখন আমরা মাথা ঘামাবো কনফিগারেশন ফাইল নিয়ে, যেটা অনুযায়ী আমাদের রিপোজিটরিতে পুশ(বা পুল রিকোয়েস্ট) করলে অটোমেটেড কিছু কাজ করবে।</p><p>এইধরণের কনফিগারেশন গুলো লেখা হয় yml বা yaml ফরম্যাটের ফাইলে। এই ফরম্যাটের সাথে টুকটাক পরিচয় থাকলে খুবই ভালো, না থাকলেই সমস্যা নেই, কারণ এখানে কোনো রকেট সায়েন্সের ফর্মুলা লেখা থাকবে না। এছাড়া প্রয়োজনীয় লাইনের ব্যাখ্যা তো থাকবেই।</p><p>তো শুরুতে আমাদের প্রজেক্টের একেবারে রুট ফোল্ডারে, মানে যেখানে lib/ বা অন্য ফোল্ডারগুলো রয়েছে সেখানে .github/ নামে একটা ফোল্ডার তৈরি করি, এর ভেতরে workflows/ নামে আরেকটি ফোল্ডার তৈরি করি। এখানেই আমাদের কনফিগারেশন ফাইলগুলো থাকবে। তো workflows এর ভেতরে আমরা একটা yaml ফাইল তৈরি করি, এর নাম যেকোনো কিছু হতে পারে। আমি build_automation.yaml নামে ফাইল তৈরি করলাম।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*XRtWzMDMJYlHGyyioXq5mw.png" /></figure><p>এরপর ফাইলটিতে নিচের লাইনগুলো লিখে ফেলি। তবে সতর্ক থাকতে হবে যেন ইনডেনটেশন,মানে প্রতি লাইনের শুরুর স্পেস সংখ্যার মধ্যে নিরবিচ্ছিন্নতা থাকে। yaml ফাইলে এই ইনডেনটেশন রক্ষা করতেই হবে(পাইথন এর মতো)</p><pre>#1 name<br>name: Build APK <br>#2 condition<br>on:<br>  push:<br>    #3 target branch<br>    branches:<br>      - feature/build_automation<br><br>#4 jobs<br>jobs:<br>  build:<br>    #5 <br>    name: Build APK<br>    #6 <br>    runs-on: ubuntu-latest <br>  <br>    #7 necessary steps to complete the job<br>    steps:<br>      #8<br>      - name: Checkout repository<br>        uses: actions/checkout@v2<br>      #9<br>      - name: Set up Flutter<br>        uses: subosito/flutter-action@v1<br>      #10<br>      - name: Install dependencies<br>        run: flutter pub get<br>      #11<br>      - name: Build APK<br>        run: |<br>          flutter build apk --release<br>      #12<br>      - name: Upload APK artifact<br>        uses: actions/upload-artifact@v2<br>        with:<br>          name: release-apk<br>          path: build/app/outputs/flutter-apk/app-release.apk</pre><p>ধীরে! এবার আমরা লাইনগুলোর অর্থ বুঝবো। যদিও name মাধ্যমে আমরা মোটামুটি বুঝে গেছি কোন লাইন কী করছে।</p><ul><li>(1)আমাদের বিল্ডের একটা নাম দিলাম</li><li>(2)এখানে কন্ডিশন দিচ্ছি যে কখন এই অটোমেটেড প্রসেস শুরু হবে। যেমন এখানে আমরা বলছি, প্রতি কোড পুশে এই অটোমেশনটি একবার করে চলবে। কোন ব্রাঞ্চে পুশ করলে হবে, সেটাও বলে দিচ্ছি(3)। এখানে আমি feature/build_automation ব্রাঞ্চ দিয়েছি। মানে এই ব্রাঞ্চে প্রতি পুশেই একবার করে জবটি রান হবে</li><li>আমরা অটোমেটিকভাবে কী কী কাজ করতে চাই তার প্রতিটিই একেকটি job(4)। আমাদের ক্ষেত্রে জব একটি, তা হলো শুধু apk বিল্ড করে আপলোড করা। আমরা জবের একটি নামও দিচ্ছি(5), এবং কোন এনভায়রনমেন্টে রান হবে তাও বলে দিচ্ছি(6)। এখানে আমরা উবুন্টু ব্যবহার করছি।মানে গিটহাব একটা উবুন্টু ডেভেলপমেন্ট এনভায়রনমেন্টে বাকি স্টেপ গুলো রান করবে।</li></ul><p>এরপরে বিভিন্ন স্টেপ বা ধাপ দেয়া আছে(8–12)। <em>name</em> এ এই ধাপের কী কাজ করছে তা বলে দিচ্ছি। <em>uses</em> মানে আগে থেকে তৈরি করা ওয়ার্কফ্লো ব্যবহার করছি আমাদের কাজ উদ্ধার করার জন্য। যেমন একবারে যদি বলে যাই, 8 এ আমরা চেক আউট করছি, 9 এ তেএকটা ফ্লাটারের ওয়ার্কফ্লো ব্যবহার করে ফ্লাটার সেটাপ করলাম, 10 এ প্রয়োজনীয় প্যাকেজ ডাউনলোড করে নিলাম, 11 তে আমরা কমান্ড দিয়ে apk তৈরি করছি। মানে এনভায়রনমেন্ট তৈরির পরে লোকালি যা যা করতাম, সেইগুলোই করছি।</p><p>এপিকে তৈরির ধাপ শেষ। এবার তা আপলোডের পালা। 12 তে আমরা এপিকে আপলোড করছি।</p><p>এবার কমিট করে বলে দেয়া নির্ধারিত ব্রাঞ্চে(যেমন এখানে <em>feature/build_automation</em>) পুশ করলাম।</p><p>এবার যদি আমাদের গিটহাব রিপোজিটরিতে যাই, আর তার <em>Actions</em> প্যানেলে ক্লিক করি, তাহলে নিচের মতো দেখতে পাবো।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mhyXBKqG3Cl0ULt_SJra3A.png" /></figure><p>আমাদের ওয়ার্কফ্লো বা জব রান করা শুরু করে দিয়েছে। আমরা যদি সেটিতে ক্লিক করি তাহলে নিচের মতো বিস্তারিত দেখতে পারবো।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fdNETbBJdPDVACIJvcGKug.png" /></figure><p>এখানে দেখতে পাচ্ছি আমাদের বলে দেয়া স্টেপগুলো, আর সাথে গিটহাব কিছু বাড়তি স্টেপ রান করছে। এগুলোর প্রতিটায় ক্লিক করলে আমরা বিস্তারিত লগও দেখতে পারবো।</p><p>সব কয়টা স্টেপ ঠিকঠাক মতো শেষ হয়ে গেলে আবারও উপরে Actions ক্লিক করি,এরপর আমাদের জবে আবার ক্লিক করলে নিচের মতো দেখতে পাবো</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*JuU6ItUzZJHdvJtPxCq0Rw.png" /></figure><p>জবটি সফলভাবে রান হয়েছে আর নিচে <em>Artifacts</em> এ আমরা দেখতে পাচ্ছি <em>release-apk </em>জেনারেট হয়েছে। এতে ক্লিক করলে একটা জিপ ফাইল ডাউনলোড হবে। সেটাকে আনজিপ করলেই আমরা এপিকে ফাইলটি পেয়ে যাবো।</p><p>আমাদের উদ্দ্যেশ্য পূরণ হয়ে গেছে। এখন থেকে কোড চেঞ্জ করে প্রতি পুশ এর পর এভাবে অটোমেটিকভাবে আমাদের এপিকে জেনারেট হয়ে যাবে।</p><h4>কাস্টম এপ নেম</h4><p>যদিও আমাদের আর্টিকেল এখানেই শেষ করা যায়, তবে চাইলে আমরা আরেকটু ফাইন-টিউনিং করতেই পারি। যেমন, যে এপিকেটি তৈরি হচ্ছে তার নাম কিন্তু সবসময় <em>app-release.apk</em> হবে। কিন্তু আমরা চাইতেই পারি যে তা অন্য কোনো নামে তৈরি হবে। এরজন্য আমাদের জবে আরেকটি নতুন স্টেপ দিতে হবে যেখানে আমরা বিল্ড হওয়া এপিকে-টির নাম চেঞ্জ করবো</p><pre>name: Build APK<br><br>on:<br>  push:<br>    branches:<br>      - feature/build_automation<br><br>jobs:<br>  build:<br>    name: Build APK<br>    runs-on: ubuntu-latest<br><br>    steps:<br>      - name: Checkout repository<br>        uses: actions/checkout@v2<br><br>      - name: Set up Flutter<br>        uses: subosito/flutter-action@v1<br><br>      - name: Install dependencies<br>        run: flutter pub get<br><br>      - name: Build APK<br>        run: |<br>          flutter build apk --release<br>  <br>      # rename the apk artifact<br>      - name: Rename APK artifact<br>        run: |<br>          mv build/app/outputs/flutter-apk/app-release.apk &quot;app.apk&quot;<br>      - name: Upload APK artifact<br>        uses: actions/upload-artifact@v2<br>        with:<br>          name: release-apk<br>          # update the artifact path<br>          path: &quot;app.apk&quot;</pre><p>এখন কমিট করে আবার পুশ করি। আগের মতো জব কমপ্লিট হবার পরে আমরা এপিকে ডাউনলোড করলে দেখতে পারবো আমাদের দেয়া নামে তৈরি হয়েছে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hZbUTy_DBUxvb6uYh9mfFw.png" /></figure><h4>কমিট হ্যাশ দিয়ে কাস্টম নেম</h4><p>বেশ ইন্টারেস্টিং, তাই না? এবার আমরা আরেক ধাপ এগিয়ে যাবো।</p><p>অনেক সময় আমরা (অন্তত আমি) এপিকে ফাইলনেমের সাথে কমিট হ্যাশের নাম্বার জুড়ে দেই, যেমন<em> app_a75vs.apk</em>, যাতে ফাইলনেম দেখে সহজে বোঝা যায় কোন কমিটের চেঞ্জ এখানে আছে। তো এই কমিট হ্যাশ পাওয়ার জন্য আমাদের আরেকটি ধাপ যোগ করতে হবে, এরপর আগের ধাপে এই হ্যাশ সহ রিনেম করতে হবে, এবং একদম শেষে আর্টিফ্যাক্টের পাথও একই নামে আপডেট করে দিতে হবে।</p><pre>name: Build APK<br><br>on:<br>  push:<br>    branches:<br>      - feature/build_automation<br><br>jobs:<br>  build:<br>    name: Build APK<br>    runs-on: ubuntu-latest<br><br>    steps:<br>      - name: Checkout repository<br>        uses: actions/checkout@v2<br><br>      - name: Set up Flutter<br>        uses: subosito/flutter-action@v1<br><br>      - name: Install dependencies<br>        run: flutter pub get<br>      # getting commit hash<br>      - name: Get commit hash<br>        id: commit_hash<br>        run: echo &quot;COMMIT_HASH=$(git rev-parse --short HEAD)&quot; &gt;&gt; $GITHUB_ENV<br><br>      - name: Build APK<br>        run: flutter build apk --release<br><br>      - name: Rename APK artifact<br>        # notice, apk name now consists the commit has<br>        run: |<br>          commit_hash=$COMMIT_HASH<br>          mv build/app/outputs/flutter-apk/app-release.apk &quot;app_${commit_hash}.apk&quot;<br><br>      - name: Upload APK artifact<br>        uses: actions/upload-artifact@v2<br>        with:<br>          name: release-apk<br>          # artifact path must math the renamed apk<br>          path: &quot;app_${{ env.COMMIT_HASH }}.apk&quot;</pre><p>এবার যথারীতি আগের মতো কমিট-পুশ আর জব কমপ্লিট হবার পরে আর্টিফ্যাক্ট ডাউনলোড করলে আমরা নিচের মতো দেখতে পারবো।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*6sgbYBgQ3DAlquVFyvklMA.png" /></figure><p>এছাড়া চাইলে আরো বিভিন্নভাবে আমরা এপের নাম দিতে পারি। যেমন <em>app_commit_hash_current_date.apk</em> ফরম্যাটে নাম দিতে পারি। পাঠক চাইলে একটু নেট ঘাটাঘাটি করে নিজেরা চেষ্টা করে দেখতে পারেন। এটা এক্সারসাইজ হিসেবে থাকলো।</p><p>আর্টিকেলে ব্যবহৃত প্রজেক্টের শুরুর কোড পাওয়া যাবে <a href="https://github.com/alxayeed/github_actions/tree/starter">এখানে</a> , এক্সারসাইজের সমাধান সহ ফুল কোড পাওয়া যাবে <a href="https://github.com/alxayeed/github_actions/tree/feature/build_automation">এখানে</a></p><h4>উপসংহার</h4><p>এই আর্টিকেলে আমরা ম্যানুয়ালভাবে এপিকে তৈরি করাকে অটোমেট করেছি। গিটহাব একশন ব্যবহার করে আমরা এভাবে আরো অনেক কিছুই অটোমেট করতে পারি। যেমন এখানে যদিও আমরা এপিকে জেনারেট করছি, তবে সেটা টেস্টিং এর জন্য শেয়ার করতে গেলে আমাদের ডাউনলোড করে সেন্ড করতে হবে(যদি না আমাদের রিপোতে টেস্টারের একসেস থাকে)। তবে রিপোজটরি সাধারণত কোড রাখার জায়গা। টেস্টার সাধারণত একটা টেস্টিং এনভায়রনমেন্টে ব্যবহার করে থাকে, যেখানে নিয়মিত আপডেটেড ফাইল শেয়ার করা হয়, যেমন <em>Firebase app distribution। </em>এই অটোমেশন এর মাধ্যমে এপিকে তৈরির সাথে সাথে আমরা ডিস্ট্রিবিউট করতে পারি, এমনকি রিলিজও করতে পারি। পরবর্তী কোনো আর্টিকেলে হয়তো আমরা সেগুলাও দেখবো।</p><p>আজকে এই পর্যন্তই। ধৈর্য্য নিয়ে পড়ার জন্য ধন্যবাদ।</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4776f2527f58" width="1" height="1" alt=""><hr><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/automate-apk-generation-in-flutter-4776f2527f58">ফ্লাটারে গিটহাব একশনস এর ব্যবহার — এপিকে বিল্ডকে অটোমেট করা</a> was originally published in <a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE">প্রোগ্রামিং পাতা</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[উবুন্টুতে ডকার ও ডকার কম্পোজ ইন্সটল]]></title>
            <link>https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/install-docker-and-docker-compose-on-ubuntu-f8abed2aa74d?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8abed2aa74d</guid>
            <category><![CDATA[bangla]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Wed, 16 Nov 2022 03:25:31 GMT</pubDate>
            <atom:updated>2023-07-15T14:21:47.032Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*5u9UrT-rCM8vNyo8" /></figure><h4>ভূমিকা</h4><p>উবুন্টুতে ডকার বা ডকার কম্পোজ ইন্সটল করা সহজ হলেও প্রথম প্রথম বেশ ঝক্কি পোহানোটা একেবারে স্বাভাবিক, অন্তত আমার ক্ষেত্রে তাই হয়েছে। এমনকি অনেকদিন পর পুনরায় ইন্সটল করতে গেলেও হয়তো কমান্ডগুলো মনে থাকে না, তখন নেটে খোঁজাখুঁজি করতে হয় বিভিন্ন লিংকে। যেমন আমাকেও ডকার কম্পোজ ইন্সটল করার জন্য কিছুটা ঘোরাঘুরি করতে হয়েছে।</p><p>আজকে তাই ছোট্ট এই আর্টিকেলে লিখবো কীভাবে উবুন্টুতে ডকার এবং ডকার কম্পোজ ইন্সটল করতে হয়। লেখাটা হয়তো ভবিষ্যতের আমার জন্যেই রেফারেন্স হিসেবে লেখা, তবে আশা করি পাঠকরাও উপকৃত হবেন।</p><h4>ডকার ইন্সটল</h4><p>প্রথমে আমাদের সিস্টেমের রিপোজিটরি লিস্টগুলো আপডেট করে নেই</p><pre>sudo apt update</pre><p>এরপর কিছু প্যাকেজ ইন্সটল করে নেই, যার মাধ্যমে HTTPS এর মাধ্যমে অন্যান্য প্যাকেজ ইউজ করা যাবে</p><pre>sudo apt install apt-transport-https ca-certificates curl software-properties-common</pre><p>এবার আমাদের সিস্টেমে অফিসিয়াল ডকার রিপোজিটরির জন্য জিপিজি কি(GPG Key) যোগ করে নেই।</p><pre>curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -</pre><p>এবার এই ডকার রিপোজিটরিকে আমাদের APT তথা রিপোজিটরি সোর্স লিস্টে যোগ করি।</p><pre>sudo add-apt-repository &quot;deb [arch=amd64] https://download.docker.com/linux/ubuntu <strong>focal</strong> stable&quot;</pre><p>এখানে <em>focal</em> নাম দেখে আমরা বুঝতে পারছি এটা উবুন্টূ ২০ এর জন্য। তবে উবুন্টূ ২২.০৪ এও এটা ঠিকঠাক কাজ করেছে। আপনারা আপনাদের উবুন্টু ভার্সন অনুযায়ী ইন্সটল করার জন্য নামটি পাল্টে দিতে পারেন(যেমন ২২ এর জন্য <em>jammy</em>)</p><p>এবার উবুন্টু যাতে নিজের ডিফল্ট রিপোর বদলে আমাদের যোগ করা ডকারের অফিসিয়াল রিপো থেকে ইন্সটল করে তার জন্যে নিচের কমান্ড দেই-</p><pre>apt-cache policy docker-ce</pre><p>সবশেষে ডকার ইন্সটল করতে নিচের কমান্ডটি রান করি</p><pre>sudo apt install docker-ce</pre><p>সব ঠিকঠাক থাকলে ডকার আমাদের সিস্টেমে ইন্সটল হয়ে যাবে। সত্যিই ইন্সটল হয়েছে কিনা তা জানার জন্য নিচের কমান্ড রান দেই</p><pre>sudo systemctl status docker</pre><p>নিচের মতো দেখতে পাবো ডকার সার্ভিসটি active(running) অবস্থায় আছে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kAalU04RfH5-UincFtJ2bw.png" /></figure><p>ব্যস, হয়ে গেলো ডকার ইন্সটল।</p><h4>ডকার কম্পোজ ইন্সটল</h4><p>এবার ডকার কম্পোজ ইন্সটল করার পালা।</p><p>পূর্বের মতো রিপোজিটরি লিস্ট আপডেট করি, সাথে সাথে কোনো প্যাকেজ আপডেট করার থাকলে সেটিও করে ফেলি</p><pre>sudo apt-get update<br>sudo apt-get upgrade</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vMFJuDyVM2tnmAWAZZzQQw.png" /></figure><p>আমাদের লিস্টটি আপডেট হয়েছে তবে প্যাকেজ বা সফটওয়্যার সব আপ-টু-ডেট। এটা যদিও বাধ্যতামূলক নয় তবে নিয়মিত আপডেট করা ভালো অভ্যেস।</p><p>এছাড়া রিপোজিটরি লিস্টে ভালোভাবে খেয়াল করলে দেখতে পারবো আমাদের যোগ করা ডকার অফিসিয়াল রিপোজিটরিও এখন লিস্টে আছে।</p><p>এবার ডকার কম্পোজ ইন্সটল করার জন্য একটি ডিরেক্টরি তৈরি করি</p><pre>mkdir -p ~/usr/local/bin/docker-compose </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*BSz1CMx5XrSwAXHuSQQvAw.png" /></figure><p>এবার curl এর মাধ্যমে সদ্য তৈরি করা ডিরেক্টরিতে ডকার কম্পোজ ইন্সটল করবো। ডকার কম্পোজের সর্বশেষ ভার্সন জানতে <a href="https://github.com/docker/compose/releases">এই লিংকে</a> চেক করি। বর্তমানে সর্বশেষ ভার্সন 2.12.2, কাজেই ইন্সটল কমান্ডে আমরা সেটি উল্লেখ করে দিচ্ছি। আপনারা অন্য কোনো ভার্সন ইন্সটল করতে চাইলে কমান্ডের বোল্ড করা অংশে সেটি পাল্টে নিলেই হবে।</p><pre>sudo curl -SL https://github.com/docker/compose/releases/download/<strong>v2.12.2</strong>/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CI9qP32MXMe6n5yvPsm81Q.png" /></figure><p>এবার ডকার কম্পোজকে executable permission দেই যাতে করে টার্মিনালে আমরা docker-compose কমান্ডটি ব্যবহার করতে পারি।</p><pre>sudo chmod +x /usr/local/bin/docker-compose</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uz7B9FGo1wI6kFbdkklnpw.png" /></figure><p>ডকার কম্পোজ ইন্সটল হয়েছে, আবার executable permission দেয়ার কারণে টার্মিনালে আমরা docker-compose কমান্ড ব্যবহারও করতে পারবো।</p><p>যাচাই করতে নিচের কমান্ড দিয়ে ভার্সন চেক করি</p><pre>docker-compose version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*XF95M1NUEpV9ti6JGlGOkQ.png" /></figure><p>দেখতে পাচ্ছি আমাদের docker-compose ভার্সন ২.১২.২।</p><p>এরমানে আমাদের উবুন্টু সিস্টেম এখন ডকার ও ডকার কম্পোজ ব্যবহারের জন্য তৈরী।</p><p>আজকে এই পর্যন্তই। মূল্যবান মতামত বা পরামর্শ দিয়ে আমাকে আরো ভালো লেখার জন্য উৎসাহিত করতে পারেন। আমার লেখা অন্যান্য আর্টিকেলগুলো <a href="https://alxayeed.medium.com/">এখানে</a> পড়তে পারেন।</p><p>এছাড়া আমি আছি <a href="https://www.linkedin.com/in/alxayeed/">লিংকডইন</a> বা <a href="https://github.com/alxayeed">গিটহাবেও</a>।</p><p>আবারো ধন্যবাদ সবাইকে।</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8abed2aa74d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/install-docker-and-docker-compose-on-ubuntu-f8abed2aa74d">উবুন্টুতে ডকার ও ডকার কম্পোজ ইন্সটল</a> was originally published in <a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE">প্রোগ্রামিং পাতা</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[হ্যালো কিক্লোক]]></title>
            <link>https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/hello-keycloak-ed3e41be6da5?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed3e41be6da5</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[keycloak]]></category>
            <category><![CDATA[ami]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[bangla]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Wed, 16 Nov 2022 03:24:38 GMT</pubDate>
            <atom:updated>2023-07-15T14:22:36.747Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7WIMLzjOkiw4l-fj.jpg" /></figure><h4>ভুমিকা</h4><p>আমরা যখন ফেসবুক, গুগল ইত্যাদিতে লগিন করতে যাই তখন আমাদের বেশ কিছু সিকিউরিটির ধাপ পার হতে হয়। চোখের সামনে এসব ধাপগুলো সহজ বা কঠিন যাই লাগুক, পর্দার আড়ালে এসব ধাপ আরো জটিল। এগুলোকে বলা যায় সফটওয়ারের অথেন্টিকেশন ও ইউজার ম্যানেজমেন্ট।</p><p>আমরা যদি নিজেরা কোনো সফটওয়ার তৈরি করতে চাই, এবং সেখানে যদি এরকম ইউজার ম্যানেজমেন্ট প্রয়োজন হয়, তাহলে হয়তো আমরা নিজেরাই সেই ফিচার বানিয়ে নিতে পারি। তবে ইউজার ম্যানেজমেন্টের বিভিন্ন ফিচার তৈরী ও রক্ষণাবেক্ষণ করাতে বেশ সময় আর রিসোর্স প্রয়োজন । কারণ ইউজার ম্যানেজমেন্টের সাথে ওতপ্রোতভাবে জড়িয়ে আছে যে বিষয়টি, তার নাম সিকিউরিটি।</p><p>তো মোটাদাগে আমরা বলতে পারি,ফিচারসম্বৃদ্ধ এবং একই সাথে নিরাপদ ইউজার ম্যানেজমেন্ট তৈরী ও মেইনটেইন করা সময় ও রিসোর্স সাপেক্ষ। অনেকক্ষেত্রে আমরা নিজেরা হয়তো এগুলো ডেভেলপ করার বদলে ৩য় কোনো পক্ষের কাছ থেকে এই সেবা নিয়ে নিজেদের সফটওয়ারে যুক্ত করতে আগ্রহী হই, যাতে সময়ও অনেক কম লাগবে, রিসোর্স আর সিকিরিটির ঝক্কিও সেই ৩য় 3rd party) সামাল দেবে আমাদের হয়ে।</p><h4>কিক্লোক</h4><p>কিক্লোক একটি ওপেন সোর্স আইডেন্টিটি ও একসেস(IAM) টুল যার মাধ্যমে আমরা উপরে বর্ণিত সমস্যার সাথে সাথে আরো অনেক সেবা পেতে পারি। এতে করে আমাদের নিজেদের ব্যবহারকারীর অথেন্টিকেশনের তথ্য জমা করার কোনো প্রয়োজন নেই। কিক্লোকই আমাদের হয়ে সেটি করে দিবে।</p><p>একনজরে কিক্লোকের ফিচারগুলো দেখতে নিচের ছবিটি দেখতে পারি।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwl5wdM0zsRS-3cSLvTCyQ.png" /></figure><p>টপিক হিসেবে কিক্লোক অনেক বড়ো একটা বিষয়, যার বিভিন্ন দিক আলাদা আর্টিকেল লেখার দাবিদার। তবে শুরু হিসেবে আজকে আমরা দেখবো কিক্লোক কিভাবে আমাদের সিস্টেমে ডাউনলোড ও কনফিগার করতে হয়।</p><h4>ডাউনলোড</h4><p>কিক্লোকের ডাউনলোড পেজে গেলে আমরা নিচের ছবির মতো অনেকগুলো অপশন দেখতে পারবো।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-eD_HLm30ugrunXyLpNVtQ.png" /></figure><p>১ম অপশনটি হচ্ছে <em>OpenJDK</em> এর মাধ্যমে <em>standalone </em>ডাউনলোড। ২য় অপশনটি হচ্ছে ডকারের মাধ্যমে ডাউনলোড করা। আজকের লেখায় আমরা এই দুটি অপশন দেখবো।</p><p><strong>ডকার</strong></p><p>ডকার মাধ্যমে কিক্লোকের ইমেজ ডাউনলোড ও কন্টেইনার তৈরীর ধাপগুলো সোজাসাপ্টা।</p><p>টার্মিনাল ওপেন করে নিচের কমান্ডটি রান করি।</p><pre>docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:20.0.1 start-dev</pre><p>ডকারের সাথে যাদের হালকা পাতলা পরিচয় আছে, তাদের জন্য কমান্ডটি সহজ। যাদের কাছে ডকার নতুন, তাদের জন্য দুঃসংবাদ হচ্ছে, যেহেতু এই লেখা ডকার নিয়ে নয় তাই আমরা বিস্তারিত আলোচনা করছি না। আর সুসংবাদ হলো, বিস্তারিত আলোচনা না করলেও কমান্ডটি ব্যাখ্যা করছি ।</p><ul><li><strong><em>docker run</em></strong> — এই কমান্ডের মাধ্যমে আমরা একটা ইমেজ ডাউনলোড বা পুল করছি, তার একটি কন্টেইনার তৈরী করছি এবং একইসাথে সেটা রান করছি।</li><li><strong><em>-p 8080:8080</em></strong>- আমাদের সিস্টেমের 8080 পোর্টের সাথে কিক্লোক যে কন্টেইনারে রান হবে তার 8080 পোর্ট বাইন্ড বা কানেক্ট করে দিচ্ছি।</li><li><strong><em>-e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin — </em></strong>এনভায়রনমেন্ট ভেরিয়েবলের মাধ্যমে বলে দিচ্ছি, কিক্লোকের এডমিন ও পাসওয়ার্ড কী হবে।</li><li><strong><em>quay.io/keycloak/keycloak:20.0.1</em></strong> — যে ইমেজটি পুল বা ডাউনলোড করতে চাচ্ছি তার নাম ও ভার্সন নাম্বার। ইমেজ রিপোজিটরি থেকে ইমেজটি ডাউনলোড হবে। রিপোটি দেখতে চাইলে একটু চোখ বুলিয়ে নিতে পারেন <a href="https://quay.io/repository/keycloak/keycloak">এখানে</a></li><li><strong><em>start-dev</em></strong>- ডেভেলপমেন্ট মোডে রান হবে।</li></ul><p>ঠিকঠাক মতো ডাউনলোড হলে নিচের মতো আউটপুট আসবে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JMCouBB9LPaKbM7-zKIv_Q.png" /></figure><p>কিক্লোক সার্ভার যে রান হয়েছে তা চেক করার জন্য ব্রাউজারে গিয়ে <a href="http://localhost:8080/">এই লিংকে</a> গেলে নিচের মতো ছবি দেখতে পারবো -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVGH3yfKT1737U6swifEiw.png" /></figure><p>Administration Console এ ক্লিক করলে নিচের মতো লগিন পেজ আসবে যেখানে ইউজারনেম ও পাসওয়ার্ড দিয়ে লগিন করতে পারবো।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*TDCZe_iNzsSVmGnNshToCA.png" /></figure><p>১ মিনিট, ইউজার ও পাসওয়ার্ড কোথায় পাবো? মনে আছে এনভায়রনমেন্ট ভেরিয়েবলে আমরা এই দুটি ভ্যালু পাঠিয়েছিলাম? সেগুলো দিয়েই এখানে লগিন করতে হবে।</p><p>ডকারের রাস্তা ধরে আমাদের জার্নি আপাতত এখানে শেষ। এখন আমরা standalone ডাউনলোডের পথ ধরে আবার এখানে আসার চেষ্টা করি।</p><p><strong>স্ট্যান্ডএলোন(<em>standalone</em>) ডাউনলোড</strong></p><p>শুরুতেই যেটা মনে রাখতে হবে, এভাবে ডাউনলোড করে রান করার জন্য সিস্টেমে অবশ্যই <a href="https://openjdk.org/">OpenJDK</a> ১১ বা তার পরের ভার্সন ইন্সটল করা থাকতে হবে। না থাকলে করে ফেলুন, আর থাকলে আমরা সামনে আগাই -</p><p>প্রথমে <a href="https://www.keycloak.org/downloads">এই লিংকে</a> গেলে নিচের মতো পেজ দেখতে পাবো।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1FSckW9GvnGgEohydWK8w.png" /></figure><p>এই লেখার সময় ভার্সন ২০.০.১। আপনাদের সময় সেটি অন্য হতে পারে।</p><p>এবার Server সেকশনের ভেতরে ১ম অপশন(keycloak) থেকে জিপ ফাইলটি ডাউনলোড করে আনজিপ করি।</p><p>আনজিপ করা ফোল্ডারের ভেতর প্রবেশ করি, যেখানে <em>bin,conf, data, lib</em> ইত্যাদি রয়েছে। এবার এই ফোল্ডারে টার্মিনাল ওপেন করি। অথবা টার্মিনাল থেকে এই ডিরেক্টরিতে আসি। অন্যথায় ফাইল/ফোল্ডার খুজে পাবেনা। এবার টার্মিনালে নিচের কমান্ড রান করি-</p><pre>bin/kc.sh start-dev(লিনাক্সে)<br>bin/kc.bat start-dev(উইন্ডোজে)</pre><p>সব ঠিক থাকলে নিচের মতো আউটপুট আসবে</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NVFcaQK4x6j4Ji7m-MNkCg.png" /></figure><p>লেখাগুলো চেনা চেনা লাগছে? ডকার কন্টেইনারের মাধ্যমে রান করার সময়ও আমরা এমন আউটপুট দেখেছিলাম। এরমানে আমরা ডকারকে ছেড়ে আসা রাস্তার খুব কাছাকাছি চলে এসেছি।</p><p>আবার <a href="http://localhost:8080/">localhost:8080</a> তে গেলে আমরা নিচের পেজটি দেখতে</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s6mWg47fRXn1Fku17Oil9A.png" /></figure><p>পেজটি প্রায় পুরোটাই আগের মতো। পার্থক্য হচ্ছে, এখানে Administration Console এ শুরুতে আমাদের ইউজারনেম ও পাসওয়ার্ড দিয়ে ইউজার তৈরি করতে বলছে। কিন্তু কেন? কারণ এখানে আমরা এনভায়রনমেন্ট ভেরিয়েবলের মাধ্যমে আগে কোনো ইউজার তৈরি করি নি। চটপট তৈরি করে ফেলি, এরপর নিচের পেজটি আসবে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*TDCZe_iNzsSVmGnNshToCA.png" /></figure><p>এরমানে ডকার আর standalone দুই ধরণের ইন্সটলে আমরা এক বিন্দুতে এসে পৌছেছি। এবার সবার জন্য একইরকম পথ চলা।</p><p>আমাদের আসল উদ্দেশ্য পূর্ণ হয়েছে। এবার একটু কিক্লোকের ভেতরের জগতে ঢুকে উঁকিঝুকি দিয়ে দেখি, যাতে পরে কাজের সময় একেবারে অচেনা না লাগে।</p><p>লগিন করলে শুরুতেই আমরা নিচের মতো পেজ দেখতে পারবো যেখানে আমরা বর্তমান realm বা জগতের বিভিন্ন তথ্য পাবো।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2e_b5o-E-PjnmFdH4RUBHA.png" /></figure><p>এই realm বিষয়টা গুরুত্বপূর্ণ, কারণ কিক্লোক সবকিছু এই realm এর ভেতরে নিয়ন্ত্রণ করে। এটা সত্যিই একটা ভার্চুয়াল জগতের মতো।</p><p>ডিফল্টভাবে আমরা master realm দেখতে পাচ্ছি। চাইলে আমরা এখানেই কাজ হয়তো করতে পারি, তবে এই realm টি আসলে কিক্লোকের নিজের জন্য। এখানে কিছু করা রিকমেন্ডেড না। আমাদের প্রয়োজনে আমরা আলাদা একটা realm তৈরি করতে নিবো। এরজন্য উপরে বাম কোণায় master এর পাশের ড্রপডাউনে ক্লিক করে এরপর Create Realm বাটনে ক্লিক করি। একটি ফর্ম আসবে, সেখানে realm এর জন্য কোনো একটা নাম দিয়ে Create বাটনে ক্লিক করি। যেমন আমি development নামে একটি realm তৈরি করলাম।</p><p>create realm</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*5ADfO4U5_0CoXs2f7PisOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5L5DpAUw59SDqn69vEsmJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p4qXq6M88GEtbOmwJxmk1A.png" /></figure><p>আমাদের realm তৈরি হয়ে গেছে। উপরে বাম কোণায় তাকালে দেখতে পারবো আমরা এখন আমাদের তৈরি করা development realm এর ভেতরে আছি। এর নিচে আরো অনেক অপশন রয়েছে। কয়েকটায় চোখ বুলানো যাক</p><p><strong>Realm settings</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PfjkbMf1RcAp5ROfR-yr7Q.png" /></figure><p>এখানে realm এর বিভিন্ন কনিফিগারেশন রয়েছে। উপরে General, Login, Email, Themes ইত্যাদি অনেকগুলো ট্যাব দেখতে পাচ্ছি। সেগুলো একটু ঘুরে দেখতে পারেন। আমরা যেহেতু আজকে কোনো এপ বা ক্লায়েন্ট কনফিগার করছি না তাই এসবে আর যাচ্ছি না।</p><p><strong>Clients</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZXlw2iSo0qft16jj_Fehg.png" /></figure><p>কিক্লোকের সাথে আমরা আমাদের যে এপকে কানেক্ট করতে চাই কিক্লোকে তাকে ক্লায়েন্ট বলে। আমরা দেখতে পাচ্ছি ইতোমধ্যে কিছু প্রয়োজনীয় ক্লায়েন্ট তৈরি হয়েই আছে । এছাড়া আমাদের ক্লায়েন্ট তৈরি ও অন্যান্য কনফিগারেশন করতে পারি এখানে।</p><p><strong>Users</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GM7zXMUYrPtJ51vCrsNCSg.png" /></figure><p>Realm ও Client তৈরি করার পর আমরা যে জিনিসটা চাইবো তা হচ্ছে তাতে আমাদের প্রয়োজনীয় ইউজার যোগ করা। সেই সম্পর্কিত কাজগুলো আমরা এখানে করতে পারি।</p><p><strong>Realm roles</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SC3oBNs02LKAMniOnLiLeA.png" /></figure><p>এটা একটা নেমস্পেস যেখানে realm লেভেলে আমাদের তৈরি করা ইউজারদের কার কোন রোল থাকবে সেটা কনফিগার করতে পারি।</p><p><strong>Identity providers</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzpaWm6xx5T3ZFfMrwZ1_Q.png" /></figure><p>এটা বেশ ইন্টারেস্টিং একটা অংশ। আমাদের নিজেদের তৈরি করা ইউজার বাদেও আমরা OpenID Connect বা SAML ব্যবহার করতে পারি। এছাড়া বিভিন্ন সোশ্যাল মিডিয়া যেমন ফেসবুক, গুগল, গিটহাব(এবং আরো এত্তোগুলা) ব্যবহার করে আমরা ইউজারকে অথেনটিকেট করতে পারি।</p><p>ইন্টারেস্টিং, তাই না?</p><p>ইন্টারেস্টিং, তবে আগেই যেটা বলেছি, কিক্লোক অনেক বিস্তারিত একটা বিষয়। তাই আমাদের আজকের আর্টিকেলের পথ আজকে এখানেই শেষ করছি। আশা করি আরো ছোট ছোট বিষয় নিয়ে সামনে লিখবো।</p><p>পড়ার জন্য ধন্যবাদ। মূল্যবান মতামত বা পরামর্শ দিয়ে আমাকে আরো ভালো লেখার জন্য উৎসাহিত করতে পারেন। আমার লেখা অন্যান্য আর্টিকেলগুলো <a href="https://alxayeed.medium.com/">এখানে</a> পড়তে পারেন।</p><p>এছাড়া আমি আছি <a href="https://www.linkedin.com/in/alxayeed/">লিংকডইন</a> বা <a href="https://github.com/alxayeed">গিটহাবেও</a>।</p><p>আবারো ধন্যবাদ সবাইকে।</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed3e41be6da5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/hello-keycloak-ed3e41be6da5">হ্যালো কিক্লোক</a> was originally published in <a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE">প্রোগ্রামিং পাতা</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[স্প্রিংবুটের সাথে ডকারের পোস্টগ্রেস ডাটাবেজ ব্যবহার করা]]></title>
            <link>https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/%E0%A6%B8%E0%A7%8D%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A6%BF%E0%A6%82%E0%A6%AC%E0%A7%81%E0%A6%9F%E0%A7%87%E0%A6%B0-%E0%A6%B8%E0%A6%BE%E0%A6%A5%E0%A7%87-%E0%A6%A1%E0%A6%95%E0%A6%BE%E0%A6%B0%E0%A7%87%E0%A6%B0-%E0%A6%AA%E0%A7%8B%E0%A6%B8%E0%A7%8D%E0%A6%9F%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A7%87%E0%A6%B8-%E0%A6%A1%E0%A6%BE%E0%A6%9F%E0%A6%BE%E0%A6%AC%E0%A7%87%E0%A6%9C-%E0%A6%AC%E0%A7%8D%E0%A6%AF%E0%A6%AC%E0%A6%B9%E0%A6%BE%E0%A6%B0-%E0%A6%95%E0%A6%B0%E0%A6%BE-70f4d7908b41?source=rss-ca48b53a32eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/70f4d7908b41</guid>
            <category><![CDATA[bangla]]></category>
            <category><![CDATA[ডকার]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Abdullah Al Sayeed]]></dc:creator>
            <pubDate>Thu, 08 Jul 2021 12:52:53 GMT</pubDate>
            <atom:updated>2021-07-30T10:03:17.078Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZQeSD9DA9z2k_hGF-orESQ.png" /></figure><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/%E0%A6%9C%E0%A7%8D%E0%A6%AF%E0%A6%BE%E0%A6%82%E0%A6%97%E0%A7%8B-%E0%A6%AA%E0%A7%8B%E0%A6%B8%E0%A7%8D%E0%A6%9F%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A7%87%E0%A6%B8-%E0%A6%95%E0%A6%A8%E0%A7%8D%E0%A6%9F%E0%A7%87%E0%A6%87%E0%A6%A8%E0%A6%BE%E0%A6%B0-fb8640db727">আগের একটা আর্টিকেলে</a> আমরা দেখেছিলাম কীভাবে জ্যাংগোর সাথে পোস্টগ্রেস কন্টেইনারের ডাটাবেজ কানেক্ট করতে হয়। এই কুইক পোস্টে আমরা একটা স্প্রিংবুট এপ্লিকেশনের সাথে কন্টেইনারের পোস্টগ্রেস ডাটাবেজ কানেক্ট করবো।</p><p>আগের লেখায় মোটামুটি সব স্টেপ ব্যাখ্যা করা হয়েছিলো। তাই এই আর্টিকেলকে ছোট রাখতে আগের আলোচনা গুলো যথাসম্ভব বাদ দেয়া হয়েছে।</p><p>কাজেই, এখানে ধরে নেয়া হচ্ছে পাঠকের ডকারের সাথে হাই-হ্যালো আছে এবং একটা স্প্রিংবুট এপ্লিকেশন রেডি আছে যেখানে আপনি পোস্টগ্রেস ডাটাবেজ ব্যবহার করছেন, আর আগের আর্টিকেলটা পড়া আছে।</p><p>যদিও এইভাবে ডাটাবেজ রান করাটা প্রথম প্রথম আরো বেশি ঝামেলার মনে হতে পারে, কিন্তু আপনি যদি কম্পিউটারে পোস্টগ্রেস সেটাপ করার ঝক্কি সয়ে থাকেন, আর ডকারের সাথে মোটামুটি পরিচয় থাকে, তাহলে এইভাবে ডাটাবেজ সেটাপ তুলনামূলক অনেক সহজ। মাত্র কয়েকটি কমান্ড আর কয়েক মিনিটের ব্যাপার।</p><p>তাহলে চলুন শুরু করা যাক।</p><p>আশা করছি আপনার কম্পিউটারে ডকার ইন্সটল করা আছে, এবং পোস্টগ্রেস ইমেজও ডাউনলোড করা আছে। না থাকলে ডকার ইন্সটল করে ফেলুন, আর কমান্ড লাইনে লিখুন docker pull postgres</p><p>এবার ইমেজের লিস্ট দেখুন docker images দিয়ে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7f-3ptrWSDyuSdnyBD0-NA.png" /></figure><p>লিস্টে postgres ইমেজটি দেখতে পাবেন। এবার আপনার স্প্রিংবুট এপ্লিকেশনের <em>application.properties</em> ফাইলে যান, অর্থাৎ যেখানে ডাটাবেজ কানেকশনের প্রয়োজনীয় তথ্যগুলো(ডাটাবেজ নাম, ইউজারনেম, পাসওয়ার্ড) রয়েছে।</p><pre>spring.datasource.url=jdbc:postgresql://localhost:5432/<strong>DATABASE_NAME</strong><br>spring.datasource.username=<strong>USERNAME</strong><br>spring.datasource.password=<strong>PASSWORD</strong><br><br>spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect<br>...</pre><p>এই<em> DATABASE_NAME, USERNAME</em> আর <em>PASSWORD</em> আমরা ডকারে কন্টেইনার তৈরিতে ব্যবহার করবো। আপনারা এক্ষেত্রে নিজ নিজ তথ্যগুলো ব্যবহার করবেন।</p><p>তাহলে আমাদের পোস্টগ্রেস ইমেজ আছে, ডাটাবেজের ইনফর্মেশন আছে, এখন প্রয়োজন পোস্টগ্রেসের একটা কন্টেইনার তৈরি করে তার সাথে কানেক্ট করা। আমরা প্রয়োজনীয় সব তথ্য দিয়ে একটা কন্টেইনার তৈরি করবো। আপনার কম্পিউটারে আগে থেকে পোস্টগ্রেস চলমান থাকলে, কিংবা নির্দিষ্ট পোর্টে(ডিফল্ট ৫৪৩২)কোনো প্রসেস চালু থাকলে তা বন্ধ করে নিন। তারপর নিচের কমান্ড লিখুন</p><pre>docker run -d -p 5432:5432 --env POSTGRES_USER=<strong>USERNAME</strong> --env POSTGRES_PASSWORD=<strong>PASSWORD</strong> --env POSTGRES_DB=<strong>DATABASE_NAME</strong> --name <strong>spring-db</strong> postgres</pre><p>সব ঠিক ঠাক থাকলে নিচের মতো রেস্পন্স পাবেন, অর্থাৎ কন্টেইনারটি সফলভাবে তৈরী হয়েছে।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eX5jwjT3O6ukmR7JyXnhng.png" /></figure><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/%E0%A6%9C%E0%A7%8D%E0%A6%AF%E0%A6%BE%E0%A6%82%E0%A6%97%E0%A7%8B-%E0%A6%AA%E0%A7%8B%E0%A6%B8%E0%A7%8D%E0%A6%9F%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A7%87%E0%A6%B8-%E0%A6%95%E0%A6%A8%E0%A7%8D%E0%A6%9F%E0%A7%87%E0%A6%87%E0%A6%A8%E0%A6%BE%E0%A6%B0-fb8640db727">আগের আর্টিকেলের</a> কন্টেইনারের সাথে এখানে কিছুটা পার্থক্য রয়েছে। তা হচ্ছে এখানে নির্দিষ্ট ইউজারনেম, পাসওয়ার্ড আর ডাটাবেজ ব্যবহার করে কন্টেইনার তৈরি করা হয়েছে।</p><p>এই লম্বা কমান্ড দেখে ডিপ্রেশনে যাওয়ার কিছু নেই। আগের কমান্ড ভুলে গিয়ে থাকলেও এখানে আমরা আবার কমান্ডটি ভালোভাবে দেখবো</p><h4>docker run</h4><p>কন্টেইনার তৈরী এবং রান করার কমান্ড</p><h4>-d</h4><p>কন্টেইনারটি তৈরি হবার পর ডিটাচড মোডে,অর্থাৎ ব্যাকগ্রাউন্ডে স্টার্ট হবে।</p><p><strong>-p 5432:5432</strong></p><p>পোর্ট বাইন্ডিং। পোস্টগ্রেস ডিফল্টভাবে 5432 পোর্টে রান হয়। কন্টেইনারের ভেতরেও একই পোর্টে রান হবে। এখানে কন্টেইনারের ভেতরের পোর্টকে আমাদের হোস্ট মেশিন তথা কম্পিউটারের পোর্টের সাথে কানেক্ট করছি, যাতে কন্টেইনারের বাইরে থেকেও ভেতরে যোগাযোগ করা যায়।</p><p><strong>--env POSTGRES_USER=USERNAME</strong></p><p><strong>--env POSTGRES_PASSWORD=PASSWORD</strong></p><p><strong>--env POSTGRES_DB=DATABASE_NAME</strong></p><p>তিনটি এনভায়রনমেন্ট ভ্যারিয়েবল এবং তাদের ভ্যালু কন্টেইনারের ভেতরে পাঠাচ্ছি।</p><p><strong>--name springdb</strong></p><p>যে কন্টেইনারটি তৈরি করছি, ভবিষ্যত রেফারেন্সের সুবিধার্থে তার একটি নাম দিচ্ছি।</p><p><strong>posgres</strong></p><p>যে ইমেজটির ইন্সট্যান্স বা কন্টেইনার তৈরি করছি সেই ইমেজটির নাম(এক্ষেত্রে postgres)</p><p>যেহেতু আমরা ব্যাকএন্ড এপ্লিকেশনের ডাটাবেজের তথ্য দিয়ে এই কন্টেইনার তৈরি করেছি, তাই এখন এর সাথে ব্যাকএন্ডকে কানেক্ট করতে শুধু প্রয়োজন কন্টেইনারটিকে স্টার্ট করা।</p><p>যদিও কন্টেইনার তৈরির সময় তা রানিং অবস্থায় আছে, এছাড়াও পরে কন্টেইনার স্টার্ট করতে নিচের কমান্ড ব্যবহার করবো</p><p>docker start springdb</p><p>বলাই বাহুল্য, এখানে<em> springdb</em> হচ্ছে আমাদের কন্টেইনারের নাম। এবার স্প্রিংবুট এপ্লিকেশন রান করলে সঠিকভাবে রান হয়ে যাবে।</p><p>কন্টেইনারের ভেতরের ফাইল সিস্টেমে একসেস করতে লিখুন docker exec -it springdb bash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fV1jKPcm7LM7saNPoff3aQ.png" /></figure><p>এবার আপনার ডাটাবেজে একসেস করতে লিখুন psql -U YOUR_USERNAME -W YOUR_DB_NAME</p><p>এন্টার দিলে আপনার কাছে ডাটাবেজের পাসওয়ার্ড চাইবে। পাসওয়ার্ড দিয়ে ডাটাবেজে একসেস করুন।</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*Ffybnxhw79qnYztCfZq6zA.png" /></figure><p>সব টেবিল গুলো দেখতে লিখুন \dt । পোস্টগ্রেস কন্সোল থেকে বের হতে \q আর কন্টেইনারের কন্সোল থেকে বের হতে লিখুন exit । কন্টেইনার আর ব্যাকএন্ড ঠিকঠাক ভাবে রান হলে ডাটাবেজ টেবিলগুলো দেখতে পাবেন। কাজ শেষে কন্টেইনারটি স্টপ করতে লিখুন docker stop <strong>container_name</strong>(eg- springdb)</p><p>আজ এ পর্যন্তই।</p><p>ধন্যবাদ।</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70f4d7908b41" width="1" height="1" alt=""><hr><p><a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE/%E0%A6%B8%E0%A7%8D%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A6%BF%E0%A6%82%E0%A6%AC%E0%A7%81%E0%A6%9F%E0%A7%87%E0%A6%B0-%E0%A6%B8%E0%A6%BE%E0%A6%A5%E0%A7%87-%E0%A6%A1%E0%A6%95%E0%A6%BE%E0%A6%B0%E0%A7%87%E0%A6%B0-%E0%A6%AA%E0%A7%8B%E0%A6%B8%E0%A7%8D%E0%A6%9F%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A7%87%E0%A6%B8-%E0%A6%A1%E0%A6%BE%E0%A6%9F%E0%A6%BE%E0%A6%AC%E0%A7%87%E0%A6%9C-%E0%A6%AC%E0%A7%8D%E0%A6%AF%E0%A6%AC%E0%A6%B9%E0%A6%BE%E0%A6%B0-%E0%A6%95%E0%A6%B0%E0%A6%BE-70f4d7908b41">স্প্রিংবুটের সাথে ডকারের পোস্টগ্রেস ডাটাবেজ ব্যবহার করা</a> was originally published in <a href="https://medium.com/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82-%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE">প্রোগ্রামিং পাতা</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>