جولة في المجلدات المُنشأة
الغرض من كل وحدة ودليل في القالب
جولة في المجلدات المُنشأة درس مجاني في Kotlin Multiplatform Academy على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Kotlin Multiplatform Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Kotlin Multiplatform Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Know Where Things Live
The template looks busy at first. Once you learn what each folder is for, you will always know where your code belongs. 🗺️
The shared Module
The shared module is the heart of KMP. The Kotlin you write here is reused by both the Android and iOS apps.
commonMain
Inside shared, commonMain holds platform-independent Kotlin. Code here must compile for every target you chose.
androidMain
androidMain is for shared code that needs Android-only APIs. It is your place for platform-specific actual implementations.
iosMain
iosMain mirrors androidMain for the Apple side. It holds Kotlin that touches iOS-only frameworks and platform details.
The Android App Module
The androidApp module is a normal Android project. It depends on the shared module and contains the Android UI and entry point.
The iOS App Folder
The iosApp folder is an Xcode project. You open it in Xcode, and it links the framework built from your shared module.
Gradle Files
The build.gradle.kts files configure each module. The shared one declares your targets and dependencies, so you will edit it often.
settings.gradle.kts
settings.gradle.kts lists which modules belong to the build. It is how Gradle knows shared and androidApp are part of one project.
gradle.properties
gradle.properties holds project-wide flags, like JVM memory and KMP options. Small tweaks here affect the whole build.
A Mental Map
Shared code goes in the shared module, platform UI lives in the app modules, and Gradle files glue it all together. That map carries you far.
Quick Check
Where should you put Kotlin code that must work on every target?
Recap
You toured the layout: the shared module with commonMain, androidMain and iosMain, the two app modules, and the Gradle files that bind them. ✅
الأسئلة الشائعة
هل درس «جولة في المجلدات المُنشأة» مجاني؟
نعم — نص درس «جولة في المجلدات المُنشأة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Kotlin Multiplatform Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Kotlin Multiplatform Academy 4 دروس في المجموع.
ماذا ستتعلم في «جولة في المجلدات المُنشأة»؟
الغرض من كل وحدة ودليل في القالب تتمرن على Kotlin Multiplatform Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Kotlin Multiplatform Academy؟
لا تُشترط خبرة سابقة. Kotlin Multiplatform Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.
كم من الوقت يستغرق درس «جولة في المجلدات المُنشأة»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Kotlin Multiplatform Academy هذا؟
نعم. كل درس في Kotlin Multiplatform Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- JDK وAndroid Studio وKMP Plugin
- Xcode وCocoaPods لجزء iOS
- إنشاء مشروع باستخدام KMP Wizard
- جولة في المجلدات المُنشأة