0Pricing
Groovy & Gradle: JVM Automation and Build Engineering · درس

كتالوجات إصدارات التبعيات والمنصات

وحّد إصدارات التبعيات وفرضها عبر عملية بناء كبيرة متعددة الوحدات باستخدام كتالوجات الإصدارات ومنصات Gradle (BOMs) لتحقيق الاتساق والحوكمة.

كتالوجات إصدارات التبعيات والمنصات درس مجاني في Groovy & Gradle: JVM Automation and Build Engineering على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Groovy & Gradle: JVM Automation and Build Engineering، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Groovy & Gradle: JVM Automation and Build Engineering 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

The Version Drift Problem

In enterprise builds with dozens of modules, the same library can end up declared with different versions, causing subtle runtime conflicts. Centralizing versions prevents this drift.

What is a Version Catalog?

A version catalog is a single typesafe list of dependencies and versions, defined in gradle/libs.versions.toml and shared across all modules.

The TOML Format

The catalog has sections for versions, libraries, and plugins.

[versions]
guava = "33.0.0-jre"

[libraries]
guava = { module = "com.google.guava:guava", version.ref = "guava" }

Using Catalog Entries

In a build script you reference the typesafe accessor, getting IDE completion and a compile error if the name is wrong.

dependencies {
    implementation(libs.guava)
}

Bundles

Group related libraries into a bundle so modules add them all at once.

[bundles]
networking = ["retrofit", "okhttp"]

Plugin Versions in the Catalog

Catalogs can also pin plugin versions, keeping the whole toolchain consistent.

[plugins]
spring = { id = "org.springframework.boot", version = "3.2.0" }

What is a Platform?

A platform (Maven BOM) constrains versions of transitive dependencies without adding them. It governs what version wins during resolution.

Applying a Platform

Import a BOM with the platform() notation; aligned dependencies inherit its managed versions.

dependencies {
    implementation(platform("org.springframework.boot:spring-boot-dependencies:3.2.0"))
    implementation("org.springframework:spring-web")
}

Publishing Your Own Platform

Large orgs publish an internal platform module so every team aligns on approved versions automatically.

plugins { id("java-platform") }
dependencies {
    constraints {
        api("com.acme:logging:2.1.0")
    }
}

Catalog vs Platform

They complement each other:

  • Catalog: what you type when declaring dependencies
  • Platform: which transitive versions are allowed at resolution

Governance Benefits

Together they give central teams control: upgrade a library once, and every module follows, with reviewable changes in version control.

Quick Check

Test your understanding of catalogs and platforms.

Recap

You learned centralized version management:

  • Catalog in libs.versions.toml gives typesafe accessors
  • Bundles group related libraries
  • Platforms (BOMs) constrain transitive versions
  • Together they enforce consistency across large builds

الأسئلة الشائعة

هل درس «كتالوجات إصدارات التبعيات والمنصات» مجاني؟

نعم — نص درس «كتالوجات إصدارات التبعيات والمنصات» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Groovy & Gradle: JVM Automation and Build Engineering، انتقل إلى CoddyKit PRO. تتضمن دورة Groovy & Gradle: JVM Automation and Build Engineering 4 دروس في المجموع.

ماذا ستتعلم في «كتالوجات إصدارات التبعيات والمنصات»؟

وحّد إصدارات التبعيات وفرضها عبر عملية بناء كبيرة متعددة الوحدات باستخدام كتالوجات الإصدارات ومنصات Gradle (BOMs) لتحقيق الاتساق والحوكمة. تتمرن على Groovy & Gradle: JVM Automation and Build Engineering مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Groovy & Gradle: JVM Automation and Build Engineering؟

لا تُشترط خبرة سابقة. Groovy & Gradle: JVM Automation and Build Engineering على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «كتالوجات إصدارات التبعيات والمنصات»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Groovy & Gradle: JVM Automation and Build Engineering هذا؟

نعم. كل درس في Groovy & Gradle: JVM Automation and Build Engineering يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. عمليات فحص Gradle Insights وBuild Scans
  2. الأمان وإدارة بيانات الاعتماد
  3. إضافات الاصطلاح ومنطق البناء
  4. كتالوجات إصدارات التبعيات والمنصات
← العودة إلى Groovy & Gradle: JVM Automation and Build Engineering