مسارات CI لـ Android وiOS
ابنِ التطبيقين واختبرهما وجهّزهما تلقائيًا.
مسارات CI لـ Android وiOS درس مجاني في Kotlin Multiplatform Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Kotlin Multiplatform Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Kotlin Multiplatform Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
One Codebase, Two Pipelines
KMP shares code but still ships two apps. Good CI builds, tests and packages both Android and iOS automatically on every push.
Tests Run on the Shared Layer
Your biggest win is shared logic. Run the commonTest suite in CI so a broken rule is caught once, before it reaches either app.
./gradlew allTestsBuild the Android App
For Android, CI assembles the APK or bundle. The assembleRelease task produces the artifact your release step will later upload.
./gradlew assembleReleaseBuild the iOS App
iOS jobs must run on a macOS runner with Xcode. Linux cannot compile the Kotlin/Native framework or build the iOS app.
Cache Gradle Between Runs
Fresh runners are slow. Caching the Gradle home and Kotlin/Native dependencies across jobs avoids redownloading the world each time.
Cache CocoaPods Too
If iOS uses pods, cache the Pods folder. Skipping a full pod install on every run shaves real minutes off the iOS job.
Separate Jobs, Shared Triggers
Keep Android and iOS as separate jobs so one failing platform does not hide the other, yet both fire from the same push.
Sign Builds with Secrets
Release builds need keys. Store the keystore and certificates as encrypted secrets, never committed in the repository.
Fail Fast on Lint
Run lint and formatting checks early. Catching style and obvious bugs up front saves expensive build minutes on doomed runs.
./gradlew lint detektPublish Artifacts
Save the APK and iOS artifact from each run. Testers can grab a build directly instead of waiting for a manual export.
Branch and PR Rules
Run the full suite on every pull request and block merges until it is green, so main stays releasable at all times.
Quick Check
Recall the runner requirement for the iOS pipeline.
Recap
You ran shared tests in CI, built both apps with Android on Linux and iOS on macOS, cached dependencies, signed with secrets, and gated merges on green. ✅
تعلم Kotlin مع معلم ذكاء اصطناعي — مجانًا
اكتب وقم بتشغيل أكوادك الفعلية في المتصفح، واحصل على مساعدة فورية من معلم ذكاء اصطناعي متاح 24/7، واستمر من حيث توقفت على الويب أو في التطبيق.
- الدورات
- 30
- الدروس
- 120
الأسئلة الشائعة
هل درس «مسارات CI لـ Android وiOS» مجاني؟
نعم — نص درس «مسارات CI لـ Android وiOS» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Kotlin Multiplatform Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Kotlin Multiplatform Academy 4 دروس في المجموع.
ماذا ستتعلم في «مسارات CI لـ Android وiOS»؟
ابنِ التطبيقين واختبرهما وجهّزهما تلقائيًا. تتمرن على Kotlin Multiplatform Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Kotlin Multiplatform Academy؟
لا تُشترط خبرة سابقة. Kotlin Multiplatform Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «مسارات CI لـ Android وiOS»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Kotlin Multiplatform Academy هذا؟
نعم. كل درس في Kotlin Multiplatform Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- تسريع عمليات بناء Gradle وiOS
- تحليل إطار iOS وتقليص حجمه
- مسارات CI لـ Android وiOS
- الإبلاغ عن الأعطال وإصدار التطبيق