Skip to content

Conversation

@VGoncharova
Copy link
Contributor

No description provided.

…ement for repository configuration, refine structure and enhance consistency with Gradle settings
@coderabbitai
Copy link

coderabbitai bot commented Nov 19, 2025

Walkthrough

Migrates Gradle repository configuration from allprojects.repositories to settings.gradle.kts-based dependencyResolutionManagement block with new gradle.settingsEvaluated gate. Restructures Node.js and Yarn repository definitions as Ivy blocks. Introduces KtorEAP repository with io.ktor content filter.

Changes

Cohort / File(s) Summary
Build Configuration Restructuring
\.teamcity/src/subprojects/train/TriggerProjectSamplesOnEAP.kt
Moves repository declarations from allprojects.repositories to settings-based dependencyResolutionManagement within new gradle.settingsEvaluated gate. Converts Node.js and Yarn repositories to Ivy blocks with matching content filters. Adds KtorEAP Maven repository with io.ktor content inclusion. Retains post-settings allprojects block for resolution strategy and reflection-based Kotlin Multiplatform JS Node.js configuration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify dependencyResolutionManagement syntax and placement within gradle.settingsEvaluated gate are correct
  • Confirm Ivy block configurations for Node.js and Yarn (patternLayout, metadataSources, content filters) match expected behavior
  • Validate KtorEAP repository content filter for io.ktor and any potential override interactions
  • Ensure timing shift from project evaluation to settings resolution time doesn't alter dependency resolution order or build behavior
  • Review reflection-based Node.js configuration in retained allprojects block for KMP JS target compatibility

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the motivation for switching to dependencyResolutionManagement and any benefits or breaking changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: migrating repository configuration to dependencyResolutionManagement and updating Gradle settings structure.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch vgoncharova/ktor-train

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
.teamcity/src/subprojects/train/TriggerProjectSamplesOnEAP.kt (3)

24-86: Reduce duplication of repository templates in EapRepositoryConfig and callers

The new EapRepositoryConfig helpers nicely centralize URLs and the maven repositories, but the NodeJS/Yarn ivy definitions are still hand‑written here and re‑encoded in the init script and root EAP override. Consider extracting an additional helper (e.g., generateIvyRepositories() or a full generateSettingsRepositories()) and reusing it in all places that emit settings/dependencyResolutionManagement blocks to avoid future drift between these definitions.


138-185: Align init‑script repositories with shared settings helpers and unify NodeJS repo name

The gradle.settingsEvaluated { settings -> settings.dependencyResolutionManagement { ... } } block looks correct and matches the intended repo set, but it now duplicates essentially the same configuration that EapRepositoryConfig.generateSettingsContent() and the root EAP override emit. To minimize divergence, consider driving this block from the same helpers (at least for the repository body). Also, the NodeJS ivy repo is named "Node.js" here while it is "NodeJS" elsewhere; renaming it for consistency will make logs and diagnostics easier to correlate.

Example for the naming tweak:

-            ivy {
-                name = "Node.js"
+            ivy {
+                name = "NodeJS"

377-451: Consider reusing generateSettingsContent() in root EAP override and watch for duplicate dependencyResolutionManagement blocks

The eap-settings.gradle.kts content in modifyRootSettingsForEAP is almost identical to EapRepositoryConfig.generateSettingsContent(), which means you now have two parallel copies of the same dependencyResolutionManagement block. To avoid divergence, you can generate the root override from the same helper you already use in createEAPSampleSettings:

-            cat > "${'$'}EAP_SETTINGS_FILE" << 'EOF'
-dependencyResolutionManagement {
-    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
-    repositories {
-        mavenCentral()
-        google()
-        maven("${EapRepositoryConfig.COMPOSE_DEV_URL}") {
-            content {
-                excludeGroup("org.nodejs")
-            }
-        }
-        maven {
-            name = "KtorEAP"
-            url = uri("${EapRepositoryConfig.KTOR_EAP_URL}")
-            content {
-                includeGroup("io.ktor")
-            }
-        }
-        ivy {
-            name = "NodeJS"
-            url = uri("https://nodejs.org/dist")
-            patternLayout {
-                artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]")
-            }
-            metadataSources {
-                artifact()
-            }
-            content {
-                includeModule("org.nodejs", "node")
-            }
-        }
-        ivy {
-            name = "Yarn"
-            url = uri("https://github.com/yarnpkg/yarn/releases/download")
-            patternLayout {
-                artifact("v[revision]/[artifact]-v[revision].tar.gz")
-            }
-            metadataSources {
-                artifact()
-            }
-            content {
-                includeModule("com.yarnpkg", "yarn")
-            }
-        }
-    }
-}
-EOF
+            cat > "${'$'}EAP_SETTINGS_FILE" << 'EOF'
+${EapRepositoryConfig.generateSettingsContent()}
+EOF

Also, since this override introduces its own dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) ... }, please verify behaviour on any projects whose existing settings.gradle.kts already declare a dependencyResolutionManagement block to ensure Gradle is happy with both blocks being applied.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8da7c8e and c720d43.

📒 Files selected for processing (1)
  • .teamcity/src/subprojects/train/TriggerProjectSamplesOnEAP.kt (1 hunks)
🔇 Additional comments (3)
.teamcity/src/subprojects/train/TriggerProjectSamplesOnEAP.kt (3)

18-22: Verify new BOM‑scoped Ktor EAP metadata URL

KTOR_EAP_METADATA_URL now points to the BOM artifact metadata (.../io/ktor/ktor-bom/maven-metadata.xml) and is used in the “Fetch Latest EAP Framework Version” step. That’s a reasonable scope change, but if this endpoint is unavailable or lacks <latest>/matching -eap- versions, the resolver build will start failing at runtime. Please confirm this URL works from your agents (e.g., rerun the resolver build or a quick curl check) and returns the expected EAP versions.

Also applies to: 664-678


186-252: EAP version forcing via allprojects remains consistent with new settings configuration

The allprojects block still forces io.ktor dependencies to the KTOR_VERSION environment value and logs the chosen version, while the new settings‑time repository configuration only changes where dependencies are resolved from. This separation of concerns (repos in settings, version override in allprojects) looks coherent and should preserve existing behaviour.


304-321: Good reuse of EapRepositoryConfig.generateSettingsContent() for sample settings

Having createEAPSampleSettings write settings.gradle.kts via EapRepositoryConfig.generateSettingsContent() centralizes the full dependencyResolutionManagement definition for samples. That should make future repo tweaks much safer, since there’s now a single canonical source for the sample settings template.

@VGoncharova VGoncharova merged commit 96a2e01 into master Nov 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants