Skip to content

KTOR-7743 Make projects isolated #4740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 19, 2025
Merged

Conversation

osipxd
Copy link
Member

@osipxd osipxd commented Mar 17, 2025

Subsystem
Build Infrastructure

Motivation
KTOR-7743 Refactor Gradle configuration to use precompiled script plugins
KTOR-8336 Remove empty artifacts from publication

Solution

Removed cross-project configuration. Plugins are applied in the project build script instead, so projects are self-content. This change removes coupling between projects and allows us to use configuration on demand (now) and isolated projects (in the future).

Changed dependency declaration syntax to use KotlinMultiplatformSourceSetConventions introduced in Kotlin 1.9.20.

// Old style
kotlin.sourceSets {
    commonMain {
        dependencies {
            implementation(libs.kotlin.stdlib)
        }
    }
    commonTest {
        dependencies {
            implementation(libs.kotlin.test)
        }
    }
}

// New style
kotlin {
    sourceSets {
        commonMain.dependencies {
            implementation(libs.kotlin.stdlib)
        }
        commonTest.dependencies {
            implementation(libs.kotlin.test)
        }
    }
}

The new style is the same in terms of maximum nesting, but it has two advantages:

  1. We can configure other kotlin-related settings (like C-interop) without need to add one more level of nesting
  2. This style is more compact in vertical

Refactored aggregating projects to use Lazy APIs.
We have aggregating projects - projects using outputs of all other projects. As soon as our projects became independent, we should explicitly declare that evaluation of these projects depends on evaluation of all other projects. Moreover, evaluation should be done lazily, otherwise all projects might be evaluated without need.

I've introduced ProjectTagService as a point of synchronization between "aggregating projects" and ordinary projects.
(Thanks to kotlin-wrappers and @adam-enko for the idea).

It's better review commit-by-commit.

@osipxd osipxd self-assigned this Mar 17, 2025
Copy link

coderabbitai bot commented Mar 17, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

44 files out of 158 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes update the project’s Gradle build scripts across multiple modules—including build-logic, client, server, and shared components. New dependencies and plugins (e.g., Kotlin serialization, ktorbuild.project.library/client-plugin/server-plugin) are introduced, along with a refactoring of the Kotlin DSL syntax for source set and dependency declarations. Property access is now improved via Gradle’s providers API, and obsolete configurations, files, and module includes have been removed. Copyright notices and naming conventions have been updated consistently throughout, resulting in a more streamlined, standardized build configuration.

Changes

File(s) Change Summary
build-logic/ Updated dependencies, imports, and property access; introduced a new ProjectTagsService, DSL extensions (e.g. in Collections.kt and KotlinSourceSets.kt), and refined target configuration.
build.gradle.kts (root), buildSrc/, settings.gradle.kts, gradle/artifacts.txt Removed deprecated configurations (e.g. internalProjects, subprojects block), deleted obsolete buildSrc scripts and settings files, and eliminated outdated artifact entries.
ktor-bom/, ktor-client/ Added new plugin declarations (e.g. ktorbuild.project.library, ktorbuild.project.client-plugin), streamlined Kotlin DSL for source sets by directly declaring dependencies, and updated copyright notices.
ktor-server/ Integrated server plugin declarations (e.g. ktorbuild.project.server-plugin and internal variants), restructured source set dependency syntax, enforced naming conventions, and applied copyright updates.
ktor-shared/, ktor-websockets, ktor-test-dispatcher, ktor-utils Refactored source set configurations with library plugin declarations and updated dependency management to improve clarity and consistency.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@osipxd osipxd changed the title Osipxd/precompiled script plugins KTOR-7743 Make projects isolated Mar 17, 2025
@osipxd osipxd force-pushed the osipxd/precompiled-script-plugins branch from deef566 to 63abd23 Compare March 17, 2025 16:31
@@ -1339,8 +1331,6 @@ ktor-server-websockets-watchosarm64
ktor-server-websockets-watchosdevicearm64
ktor-server-websockets-watchossimulatorarm64
ktor-server-websockets-watchosx64
ktor-shared
ktor-shared-jvm
Copy link
Member Author

Choose a reason for hiding this comment

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

These artifacts were empty, but I'm a bit worried that it is a potentially breaking change and it doesn't fit a patch release.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems that it would only break project that are explicitly importing it, which wouldn't make any sense...

@osipxd osipxd marked this pull request as ready for review March 17, 2025 17:03
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: 1

🧹 Nitpick comments (22)
ktor-server/ktor-server-plugins/ktor-server-forwarded-header/build.gradle.kts (1)

5-6: Empty Description Notice
The description property is currently an empty string. Consider adding a brief module description to improve clarity and documentation.

ktor-server/ktor-server-plugins/ktor-server-cors/build.gradle.kts (1)

5-6: Missing Module Description
The description property is currently left empty. Adding a short description could help future maintainers understand the module’s purpose.

ktor-server/ktor-server-plugins/ktor-server-http-redirect/build.gradle.kts (1)

5-6: Module Description Enhancement Suggestion
The description field is empty. Providing a concise summary for the module could be beneficial for documentation purposes.

ktor-server/ktor-server-plugins/ktor-server-double-receive/build.gradle.kts (1)

5-6: Consider Adding Module Description
The description property is empty. For better clarity and maintainability, consider providing a brief description of the module.

ktor-server/ktor-server-plugins/ktor-server-compression/build.gradle.kts (1)

5-6: Empty Description Warning

The description field is currently an empty string. Providing a clear, meaningful description (e.g., "Compression plugin for Ktor Server") would improve maintainability and clarity.

ktor-server/ktor-server-plugins/ktor-server-method-override/build.gradle.kts (1)

5-6: Proposal for a Meaningful Description

The description is currently an empty string. It is recommended to provide a concise description (e.g., "Method Override plugin for Ktor Server") to improve module clarity.

ktor-server/ktor-server-plugins/ktor-server-i18n/build.gradle.kts (1)

5-6: Consider Improving Description Grammar

The current description reads "I18n support to Ktor". For clarity and better readability, consider changing it to "I18n support for Ktor".

ktor-client/build.gradle.kts (1)

10-13: Simplified Dependency Declaration
Restructuring the commonMain.dependencies block to directly declare api(project(":ktor-client:ktor-client-core")) improves readability and reduces nesting. Verify that there are no unintended side effects from flattening this block.

ktor-server/ktor-server-plugins/ktor-server-swagger/build.gradle.kts (1)

9-15: Streamlined Dependency Declaration for jvmMain
By modifying the source set to use a flattened dependency declaration for jvmMain (lines 11-13), the build script becomes less nested and more maintainable. Confirm that the dependency on ktor-server-html-builder is correct and that no additional configuration is needed.

build-logic/src/main/kotlin/ktorbuild.project.library.gradle.kts (1)

5-6: Wildcard Import from ktorbuild Module.
The new import statement import ktorbuild.* grants access to required utilities. Consider refining this to a more specific import in the future to minimize namespace pollution if only a subset of the package is needed.

ktor-client/ktor-client-android/build.gradle.kts (1)

27-29: Verification of JVM Test Task Settings
The configuration of the jvmTest task with a JVM argument (-Dhttp.maxConnections=32) is maintained. It might be worthwhile to verify that this setting remains optimal given the isolated project environment.

ktor-server/ktor-server-plugins/ktor-server-html-builder/build.gradle.kts (1)

5-7: Plugin Declaration Simplification

The addition of the ktorbuild.project.server-plugin in this file helps standardize the server configuration across modules. Please ensure that documentation and related module setup align with this plugin’s behavior.

ktor-client/ktor-client-plugins/ktor-client-call-id/build.gradle.kts (1)

23-25: Test Tasks Configuration

Disabling the jsBrowserTest and wasmJsBrowserTest tasks acknowledges the current dependency on the server environment for tests. Consider adding a more detailed comment or documentation note to explain why these tests are conditionally disabled, to assist future maintainers.

ktor-client/ktor-client-plugins/ktor-client-websockets/build.gradle.kts (1)

9-15: Refactored Kotlin DSL Configuration
The updated kotlin block now explicitly defines the sourceSets and its dependencies. This streamlined syntax reduces vertical nesting and improves readability. Please ensure that the dependency on the logging plugin (defined in line 12) resolves correctly in the new structure.

ktor-shared/ktor-resources/build.gradle.kts (1)

12-20: Kotlin SourceSets Restructuring
The Kotlin DSL now nests the sourceSets block and declares dependencies directly
under commonMain.dependencies. This flattening improves readability and maintains
consistency with similar changes in other modules.

ktor-server/ktor-server-jetty/ktor-server-jetty-test-http2/build.gradle.kts (1)

11-21: Kotlin DSL SourceSets Update for jvmTest
The restructuring of the kotlin block—with the nested sourceSets for jvmTest
dependencies—provides a cleaner, more maintainable declaration of module dependencies.
This streamlined structure is in line with the PR objectives.

build-logic/src/main/kotlin/ktorbuild.base.gradle.kts (1)

5-6: Wildcard Import Usage
Switching to a wildcard import (import ktorbuild.*) simplifies the inclusion of all
public members from the package. Confirm that this change adheres to the project’s
import style guidelines, as wildcard imports can sometimes lead to namespace pollution.

ktor-client/ktor-client-darwin/build.gradle.kts (1)

5-8: Plugin Configuration Review

The addition of id("ktorbuild.project.library") is consistent with the refactoring objectives. However, please verify that including id("test-server") in a client module is intentional—as its naming suggests a server-related function—and document its purpose if necessary.

ktor-server/ktor-server-servlet/build.gradle.kts (1)

7-10: Plugin Selection Verification

The file applies the ktorbuild.project.library plugin. Please confirm that this choice is deliberate for the ktor-server-servlet module—considering that other server modules sometimes use the server-plugin—so that the distinction between library and server modules remains clear.

ktor-client/ktor-client-mock/build.gradle.kts (1)

10-29: Updated Source Set Dependencies Syntax.
The new structure under the kotlin { sourceSets { ... } } block removes unnecessary nesting by directly declaring dependencies for each source set. This improves clarity and maintainability and is consistent with the unified configuration approach outlined in the PR objectives.

ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-json/build.gradle.kts (1)

12-33: Streamlined Source Set Declarations with Minor Inconsistency.
While the updated syntax for declaring dependencies under commonMain and commonTest enhances readability, the jvmTest block still uses a nested dependencies { ... } construct (with an accompanying suppression annotation). If the suppression is necessary, it’s acceptable; otherwise, consider aligning it with the direct declaration style for consistency.

build-logic/src/main/kotlin/ktorbuild/ProjectTagsService.kt (1)

115-127: Clear enumeration of project tags

The ProjectTag enum provides a good categorization with informative comments about hierarchical relationships between tags.

Consider adding validation to ensure that projects with Library tag also have Published tag (since the comment states Library implies Published). Similarly for Jvm implying Library. This would help maintain tag consistency:

fun Project.addProjectTag(tag: ProjectTag) {
+    // Ensure implied tags are also added
+    when (tag) {
+        ProjectTag.Library -> addProjectTag(ProjectTag.Published)
+        ProjectTag.Jvm -> {
+            addProjectTag(ProjectTag.Library)
+            // Published is added transitively by Library
+        }
+        else -> { /* no implied tags */ }
+    }
    projectTagsService.addTag(this, tag)
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc0fc4f and 63abd23.

📒 Files selected for processing (151)
  • build-logic/build.gradle.kts (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild.base.gradle.kts (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild.doctor.gradle.kts (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild.kmp.gradle.kts (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild.project.client-plugin.gradle.kts (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild.project.library.gradle.kts (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild.project.server-plugin.gradle.kts (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild.publish.gradle.kts (2 hunks)
  • build-logic/src/main/kotlin/ktorbuild.publish.verifier.gradle.kts (2 hunks)
  • build-logic/src/main/kotlin/ktorbuild/ProjectTagsService.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/dsl/Collections.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/dsl/KotlinSourceSets.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/internal/Train.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/internal/Version.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/internal/gradle/NamedDomainObjectCollection.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/internal/gradle/Property.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/internal/publish/PublishTasks.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/internal/publish/ValidatePublishedArtifactsTask.kt (3 hunks)
  • build-logic/src/main/kotlin/ktorbuild/targets/JsConfig.kt (1 hunks)
  • build-logic/src/main/kotlin/ktorbuild/targets/JvmConfig.kt (3 hunks)
  • build-logic/src/main/kotlin/ktorbuild/targets/KtorTargets.kt (2 hunks)
  • build.gradle.kts (1 hunks)
  • buildSrc/build.gradle.kts (0 hunks)
  • buildSrc/settings.gradle.kts (0 hunks)
  • buildSrc/src/main/kotlin/KotlinExtensions.kt (0 hunks)
  • buildSrc/src/main/kotlin/NamedDomainObjectCollection.kt (0 hunks)
  • gradle/artifacts.txt (0 hunks)
  • ktor-bom/build.gradle.kts (2 hunks)
  • ktor-client/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-android/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-apache/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-apache5/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-cio/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-core/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-curl/build.gradle.kts (2 hunks)
  • ktor-client/ktor-client-darwin-legacy/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-darwin/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-ios/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-java/build.gradle.kts (2 hunks)
  • ktor-client/ktor-client-jetty-jakarta/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-jetty/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-js/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-mock/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-okhttp/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/build.gradle.kts (0 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-auth/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-bom-remover/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-call-id/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-content-negotiation/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-content-negotiation/ktor-client-content-negotiation-tests/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-encoding/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-json/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-gson/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-jackson/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-serialization/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-logging/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-resources/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-tracing/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-plugins/ktor-client-websockets/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-test-base/build.gradle.kts (1 hunks)
  • ktor-client/ktor-client-tests/build.gradle.kts (4 hunks)
  • ktor-client/ktor-client-winhttp/build.gradle.kts (2 hunks)
  • ktor-dokka/build.gradle.kts (2 hunks)
  • ktor-http/build.gradle.kts (1 hunks)
  • ktor-http/ktor-http-cio/build.gradle.kts (1 hunks)
  • ktor-io/build.gradle.kts (1 hunks)
  • ktor-java-modules-test/build.gradle.kts (3 hunks)
  • ktor-network/build.gradle.kts (1 hunks)
  • ktor-network/ktor-network-tls/build.gradle.kts (1 hunks)
  • ktor-network/ktor-network-tls/ktor-network-tls-certificates/build.gradle.kts (1 hunks)
  • ktor-server/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-cio/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-config-yaml/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-core/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-host-common/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-jetty-jakarta/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-jetty/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-jetty/ktor-server-jetty-test-http2/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-netty/build.gradle.kts (3 hunks)
  • ktor-server/ktor-server-plugins/build.gradle.kts (0 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-auth-jwt/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-auth-ldap/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-auth/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-auto-head-response/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-body-limit/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-caching-headers/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-call-id/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-call-logging/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-compression/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-conditional-headers/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-content-negotiation/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-cors/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-csrf/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-data-conversion/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-default-headers/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-double-receive/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-forwarded-header/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-freemarker/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-hsts/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-html-builder/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-http-redirect/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-i18n/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-jte/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-method-override/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-metrics-micrometer/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-metrics/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-mustache/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-openapi/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-partial-content/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-pebble/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-rate-limit/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-request-validation/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-resources/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-sessions/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-sse/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-status-pages/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-swagger/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-thymeleaf/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-velocity/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-webjars/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-plugins/ktor-server-websockets/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-servlet-jakarta/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-servlet/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-test-base/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-test-host/build.gradle.kts (2 hunks)
  • ktor-server/ktor-server-test-suites/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-tests/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-tomcat-jakarta/build.gradle.kts (1 hunks)
  • ktor-server/ktor-server-tomcat/build.gradle.kts (1 hunks)
  • ktor-shared/build.gradle.kts (0 hunks)
  • ktor-shared/ktor-call-id/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-events/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-resources/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-gson/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-jackson/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-kotlinx/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-cbor/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-json/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-protobuf/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-tests/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-xml/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-serialization/ktor-serialization-tests/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-sse/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-test-base/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-websocket-serialization/build.gradle.kts (1 hunks)
  • ktor-shared/ktor-websockets/build.gradle.kts (1 hunks)
  • ktor-test-dispatcher/build.gradle.kts (1 hunks)
  • ktor-utils/build.gradle.kts (2 hunks)
  • settings.gradle.kts (0 hunks)
💤 Files with no reviewable changes (9)
  • buildSrc/settings.gradle.kts
  • ktor-shared/build.gradle.kts
  • ktor-server/ktor-server-plugins/build.gradle.kts
  • settings.gradle.kts
  • buildSrc/src/main/kotlin/NamedDomainObjectCollection.kt
  • buildSrc/build.gradle.kts
  • ktor-client/ktor-client-plugins/build.gradle.kts
  • gradle/artifacts.txt
  • buildSrc/src/main/kotlin/KotlinExtensions.kt
🔇 Additional comments (366)
build-logic/src/main/kotlin/ktorbuild/internal/gradle/NamedDomainObjectCollection.kt (1)

5-5: Updated Package Declaration
The package declaration has been updated to ktorbuild.internal.gradle, which clearly reflects its new internal gradle grouping. This change improves the modular organization of the build-logic code.

ktor-shared/ktor-websockets/build.gradle.kts (2)

5-7: Standardized Plugin Application
The new plugins block applying ktorbuild.project.library is correctly configured. This adheres to the new isolated project approach and simplifies dependency management.


9-16: Clear Source Set Configuration
The Kotlin DSL block under kotlin { sourceSets { ... } } cleanly declares the dependencies for commonMain (with API exposures to :ktor-utils and :ktor-http). This concise and consistent configuration improves readability and maintainability.

ktor-shared/ktor-call-id/build.gradle.kts (1)

2-7: Updated Build Script for Consistency
The copyright notice has been updated and the introduction of the
ktorbuild.project.library plugin aligns this module with the new project standards.
Make sure the description accurately reflects the module’s purpose.

ktor-test-dispatcher/build.gradle.kts (2)

5-7: Proper Plugin Integration
The plugins block now includes ktorbuild.project.library, which standardizes the build configuration across modules. This promotes consistency and isolation in the project builds.


10-16: Streamlined Source Sets Declaration
The restructuring of the sourceSets block, where dependencies for commonMain and posixMain are now declared directly, enhances clarity. The use of direct dependency configuration avoids unnecessary nesting and improves overall readability.

ktor-shared/ktor-serialization/ktor-serialization-jackson/build.gradle.kts (3)

2-3: Updated Copyright Notice
The copyright year has been updated to "2014-2025", ensuring the legal headers are current.


7-7: Consistent Plugin Declaration
The addition of the ktorbuild.project.library plugin in the plugins block brings this module in line with the new isolated project structure.


11-27: Refined Dependency Configuration in Source Sets
The sourceSets configuration now directly declares dependencies for both jvmMain and jvmTest using a flattened syntax. This not only simplifies the build script but also enhances maintainability by reducing vertical nesting. All dependency declarations remain intact and correctly reference the necessary projects and libraries.

build-logic/src/main/kotlin/ktorbuild/targets/JsConfig.kt (1)

8-8: Updated import for maybeNamed function.
The import has been switched from the old package to ktorbuild.internal.gradle.maybeNamed in order to align with the refactored module structure. Verify that all usages of maybeNamed now resolve correctly.

ktor-network/ktor-network-tls/ktor-network-tls-certificates/build.gradle.kts (3)

2-3: Update copyright header.
The copyright header has been updated to reflect the new range (2014-2025).


5-7: Add ktorbuild.project.library plugin.
Introducing the new library plugin standardizes the build configuration across modules. Ensure that downstream configurations adapt to this change if needed.


9-17: Streamline dependency declarations in sourceSets.
The dependency blocks for jvmMain and jvmTest have been simplified using direct assignment of dependencies. This enhances readability without altering functionality.

ktor-client/ktor-client-darwin-legacy/build.gradle.kts (3)

2-3: Update copyright header.
The header update to 2025 is consistent with other modules and reflects current copyright information.


5-8: Add ktorbuild.project.library plugin.
Adding this plugin helps streamline the library project configurations. Ensure any custom logic provided by the previous configuration is properly migrated if applicable.


12-19: Refactor dependency declarations for Darwin source sets.
The syntax for declaring dependencies in darwinMain and darwinTest has been refactored to directly assign dependencies. This promotes clarity and consistency across the build scripts.

ktor-network/build.gradle.kts (4)

9-11: Add ktorbuild.project.library plugin.
The new plugin is now applied to the project, aligning it with the overall strategy to modularize and isolate configurations across the repository.


20-22: Simplify dependency declaration for commonMain.
Directly assigning dependencies (i.e. api(project(":ktor-utils"))) reduces nested block complexity while maintaining the intended behavior.


24-26: Simplify dependency declaration for commonTest.
Switching to a direct assignment style enhances readability and consistency across source sets.


28-30: Simplify dependency declaration for jvmTest.
The refactored syntax here minimizes nesting and aligns with best practices as observed in other modules.

ktor-io/build.gradle.kts (3)

8-10: Add ktorbuild.project.library plugin.
The inclusion of the new library project plugin furthers the goal of standardized and isolated project configurations.


16-18: Refactor dependency declaration for commonMain.
Using a direct dependency assignment (api(libs.kotlinx.io.core)) streamlines the configuration and increases maintainability.


19-21: Refactor dependency declaration for commonTest.
Reducing nesting by directly assigning api(project(":ktor-test-dispatcher")) promotes better clarity in the DSL configuration.

ktor-network/ktor-network-tls/build.gradle.kts (3)

2-2: Updated Copyright Header
The copyright notice has been updated to include the current year range (2014-2025). This update is consistent with the overall project maintenance.


5-7: Adoption of Library Plugin
The new plugins block applying ktorbuild.project.library is correctly introduced. This refactoring aligns with the objective of isolating project configurations.


9-23: Kotlin DSL Configuration Enhancements
The restructured Kotlin DSL block—defining source sets and dependencies (for both commonMain and jvmTest)—is clean and consistent with the updated Gradle conventions. Please verify that all dependent projects and modules are adjusted accordingly.

ktor-server/ktor-server-plugins/ktor-server-forwarded-header/build.gradle.kts (2)

2-2: Updated Copyright Information
The file’s header has been updated to reflect the current range (2014-2025).


7-9: Server Plugin Integration
The newly introduced plugins block applying ktorbuild.project.server-plugin is correctly implemented. Ensure that its usage remains consistent across all server modules for uniformity.

ktor-server/ktor-server-plugins/ktor-server-cors/build.gradle.kts (2)

2-2: Updated Copyright Notice
The copyright header is updated to “2014-2025”, which keeps the file current and consistent with project standards.


7-9: Server Plugin Declaration
The addition of the ktorbuild.project.server-plugin in the plugins block is well executed. This change supports the modular plugin management strategy adopted across the project.

ktor-server/ktor-server-plugins/ktor-server-http-redirect/build.gradle.kts (2)

2-2: Updated Copyright Information
The header now correctly reflects “2014-2025”, keeping the file up-to-date with the current standards.


7-9: Server Plugin Setup Verification
The new plugins block with ktorbuild.project.server-plugin is correctly added. This update is consistent with similar changes made in other server plugin modules.

ktor-server/ktor-server-plugins/ktor-server-double-receive/build.gradle.kts (2)

2-2: Updated Copyright Notice
The copyright header now reflects the current range (2014-2025), which aligns with the project’s standards.


7-9: Server Plugin Declaration Confirmation
The inclusion of ktorbuild.project.server-plugin in the plugins block is properly implemented. This change supports the new isolated and modular project structure.

ktor-server/ktor-server-plugins/ktor-server-body-limit/build.gradle.kts (2)

1-3: Updated Copyright Notice

The copyright header has been updated to "2014-2025", which correctly reflects the current licensing period.


7-9: New Server Plugin Declaration

The addition of the plugin declaration

id("ktorbuild.project.server-plugin")

aligns with the objective to isolate projects and streamline build configuration. Please ensure that this plugin is used consistently across all server modules.

ktor-server/ktor-server-plugins/ktor-server-compression/build.gradle.kts (2)

1-3: Updated Copyright Notice

The updated copyright header now correctly uses "2014-2025".


7-9: Server Plugin Inclusion

The inclusion of ktorbuild.project.server-plugin is consistent with the refactoring goals for project isolation. Ensure that this approach is uniformly applied across related modules.

ktor-client/ktor-client-plugins/ktor-client-auth/build.gradle.kts (2)

1-3: Updated Copyright Notice

The copyright header has been updated to "2014-2025", which is correct.


7-10: Client Plugin Declaration

The new plugin declaration

id("ktorbuild.project.client-plugin")

fits well with the project’s move towards isolated builds and simplified dependency management. Additionally, please verify that existing plugins (like test-server) are not unintentionally affected by this change.

ktor-server/ktor-server-plugins/ktor-server-method-override/build.gradle.kts (2)

1-3: Updated Copyright Notice

The header now correctly reflects the period "2014-2025".


7-9: Server Plugin Inclusion

The added plugin declaration

id("ktorbuild.project.server-plugin")

is appropriate for aligning this module with the new isolated project setup. Confirm that this change is compatible with existing build scripts.

ktor-server/ktor-server-plugins/ktor-server-i18n/build.gradle.kts (2)

1-3: Updated Header Information

The file header has been updated with the correct copyright details ("2014-2025") and license information.


7-9: Server Plugin Declaration

The inclusion of the plugin

id("ktorbuild.project.server-plugin")

correctly integrates this module into the new isolated project structure. This is in line with the overall refactoring objectives.

ktor-server/ktor-server-plugins/ktor-server-hsts/build.gradle.kts (2)

2-2: Update Copyright Year
The copyright notice has been updated from 2014-2020 to 2014-2025, ensuring the file’s license header reflects the current year.


7-9: Add Server Plugin Declaration
The new declaration of the ktorbuild.project.server-plugin within the plugins block aligns this module with the refactoring for isolated projects and simplifies the build configuration.

ktor-server/ktor-server-plugins/ktor-server-auto-head-response/build.gradle.kts (2)

2-2: Update Copyright Year
Updating the copyright header to "2014-2025" keeps the license information current and consistent with the rest of the project.


7-9: Add Server Plugin Declaration
Introducing the ktorbuild.project.server-plugin here modernizes the build script by leveraging the new isolated project approach and lazy evaluation.

ktor-server/ktor-server-plugins/ktor-server-caching-headers/build.gradle.kts (2)

2-2: Update Copyright Year
The header now correctly reflects "2014-2025", ensuring legal and documentation consistency across the project files.


7-9: Add Server Plugin Declaration
Adding the ktorbuild.project.server-plugin declaration standardizes this module’s build configuration, contributing to the overall build infrastructure improvements.

ktor-client/ktor-client-plugins/ktor-client-bom-remover/build.gradle.kts (2)

2-2: Update Copyright Year
The license header is updated to "2014-2025", keeping the legal information up-to-date and consistent with the other modules.


7-9: Add Client Plugin Declaration
The inclusion of ktorbuild.project.client-plugin in the plugins block simplifies the dependency declaration and aligns this client module with the new isolated plugin strategy.

ktor-server/ktor-server-plugins/ktor-server-conditional-headers/build.gradle.kts (2)

2-2: Update Copyright Year
The file header now uses the updated range "2014-2025" which is consistent across all project files.


7-9: Add Server Plugin Declaration
Adding the ktorbuild.project.server-plugin declaration ensures that this module benefits from the refactored build process aimed at isolated and lazily evaluated configurations.

build-logic/build.gradle.kts (1)

9-13: New Kotlin Serialization Dependency Added
The addition of implementation(libs.kotlin.serialization) (line 11) correctly introduces the Kotlin serialization library as a dependency. Ensure that the version defined in your version catalog (libs.kotlin.serialization) is consistent with the rest of the project’s dependencies.

ktor-client/build.gradle.kts (2)

1-3: Updated Copyright Notice
The copyright header has been updated to "2014-2025." This ensures that the file’s legal notice is current. Verify that similar updates were applied consistently across the project.


5-7: Addition of Project Library Plugin
The new plugins { id("ktorbuild.project.library") } block (lines 5-7) standardizes the configuration across modules. Confirm that the ktorbuild.project.library plugin is available and correctly configured in your build logic.

ktor-server/ktor-server-plugins/ktor-server-rate-limit/build.gradle.kts (2)

1-3: Updated Copyright and Licensing
The copyright header now reflects "2014-2025." This update is in line with keeping the legal notices current across the repository.


5-8: New Server Plugin Declaration
The inclusion of id("ktorbuild.project.server-plugin") within the plugins block (lines 6-8) sets up this module to use the standardized server plugin configuration. This change enhances consistency in how server plugins are managed.

ktor-shared/ktor-events/build.gradle.kts (3)

1-4: Updated Copyright Notice
As with other files, updating to "2014-2025" ensures the file’s licensing is current.


5-7: Application of the Library Plugin
The newly added plugins { id("ktorbuild.project.library") } block is correctly placed. This aligns with the broader project effort to standardize build configurations across shared modules.


9-15: Flattened Dependency Configuration for commonMain
Flattening the dependency declaration (lines 11-12) to directly include api(project(":ktor-utils")) improves clarity and reduces unnecessary nesting. This modernized approach should help maintain consistency across modules.

ktor-server/ktor-server-plugins/ktor-server-swagger/build.gradle.kts (2)

1-3: Updated Copyright Notice
The file’s copyright header has been updated to "2014-2025," ensuring legal consistency across modules.


5-7: New Server Plugin Declaration
The addition of the plugins block with id("ktorbuild.project.server-plugin") (lines 5-7) correctly integrates the standardized server plugin configuration. Ensure that this change is mirrored across similar server plugin modules within the project.

ktor-server/ktor-server-plugins/ktor-server-data-conversion/build.gradle.kts (2)

1-3: Updated Copyright Notice.
The copyright notice has been extended to 2025, which aligns with current legal guidelines and project messaging.


7-9: Server Plugin Declaration Added.
The added plugin declaration id("ktorbuild.project.server-plugin") standardizes the configuration across server modules. This supports the new isolated project model.

build-logic/src/main/kotlin/ktorbuild.project.library.gradle.kts (1)

13-14: Tagging as a Library Project.
The addition of addProjectTag(ProjectTag.Library) effectively categorizes this module as a library, which will help in project aggregation and dependency management.

ktor-client/ktor-client-ios/build.gradle.kts (3)

1-4: Updated File Header.
The header now reflects the correct copyright range (2014-2025), ensuring that legal information remains current.


5-7: Library Plugin Inclusion.
Adding id("ktorbuild.project.library") aligns this module with the new standardized configuration for library projects, promoting consistency across client modules.


11-12: Streamlined Dependency Declaration for darwinMain.
Directly configuring darwinMain.dependencies simplifies the dependency declaration and removes unnecessary nesting, contributing to a cleaner Gradle script.

ktor-server/ktor-server-plugins/ktor-server-csrf/build.gradle.kts (2)

1-3: Updated Copyright Notice.
The copyright notice update to 2025 reflects current standards and ensures consistency across server modules.


7-9: Server Plugin Declaration Confirmed.
The inclusion of id("ktorbuild.project.server-plugin") is consistent with the refactoring objectives to isolate project configurations and modernize plugin usage across the Ktor server ecosystem.

build-logic/src/main/kotlin/ktorbuild.kmp.gradle.kts (1)

7-9: Refined Import for Internal API.
The import change from ktorbuild.maybeNamed to ktorbuild.internal.gradle.maybeNamed clarifies that the function is now part of the internal Gradle utilities. Make sure that all references to maybeNamed elsewhere are updated accordingly.

ktor-server/ktor-server-host-common/build.gradle.kts (3)

1-4: License Header Update:
The updated license header reflects the new year range (2014-2025) and is correctly applied.


7-9: Plugin Declaration – Library Module:
The addition of the ktorbuild.project.library plugin standardizes the configuration for library projects. This change aids in decoupling cross-project configuration and aligns with the PR's objective of project isolation.


13-14: Streamlined Dependency Declaration:
Refactoring the commonMain.dependencies block to directly declare the dependency (using api(project(":ktor-server:ktor-server-core"))) simplifies the build script by removing an unnecessary nesting level.

ktor-server/ktor-server-plugins/ktor-server-velocity/build.gradle.kts (3)

2-3: License Header Update:
The header now reflects the updated copyright (2014-2025), ensuring consistency with other files.


5-7: Plugin Addition – Server Plugin:
Introducing the ktorbuild.project.server-plugin here aligns with the broader refactoring effort for Ktor server plugins. This change supports isolated project evaluation and lazy configuration, as outlined by the PR objectives.


11-19: Direct Dependency Blocks for JVM Source Sets:
The restructuring of the jvmMain.dependencies and jvmTest.dependencies blocks to directly declare the required dependencies (including libraries such as libs.velocity and related projects) improves clarity and maintainability.

build-logic/src/main/kotlin/ktorbuild.project.server-plugin.gradle.kts (3)

1-4: License Header Update:
The updated copyright header is correctly applied and
reflects the current standards.


5-7: Plugin Configuration for Build Logic:
The file applies the ktorbuild.project.library plugin, which is consistent with the new strategy for modular and isolated projects within the Ktor ecosystem.


9-18: Kotlin SourceSets and Dependency Management:
The configuration of the commonMain and commonTest source sets with their respective dependencies (i.e., core server functionality and test base libraries) is well structured and supports modular development.

ktor-server/ktor-server-plugins/ktor-server-content-negotiation/build.gradle.kts (3)

2-3: License Header Update:
The updated license header with the correct date range (2014-2025) is now in place.


7-9: Plugin Declaration – Server Plugin:
The inclusion of the ktorbuild.project.server-plugin is consistent with the other server plugin modules, promoting uniformity across the project.


13-16: Simplified Dependency Structure:
Refactoring the commonTest.dependencies block to directly list the dependency (ktor-server-double-receive) enhances readability and reduces nesting complexity.

ktor-server/ktor-server-plugins/ktor-server-request-validation/build.gradle.kts (3)

2-3: License Header Update:
The updated header is consistent with the new standards (2014-2025) and correctly reflects current information.


7-9: Plugin Addition – Server Plugin:
Adding the ktorbuild.project.server-plugin here reinforces the updated, decoupled build configuration approach and aligns with the refactoring efforts across server plugin modules.


13-16: Direct Declaration of Test Dependency:
The restructuring of the commonTest.dependencies block to directly declare the dependency on ktor-server-status-pages streamlines the build script and is consistent with similar changes in other modules.

ktor-server/ktor-server-plugins/ktor-server-call-id/build.gradle.kts (4)

2-2: Update Copyright Notice
The updated copyright header now reflects the range "2014-2025", which is in line with the project's current timeline.


7-9: Apply Server Plugin Declaration
The addition of the ktorbuild.project.server-plugin plugin clearly signals project isolation and aligns with the PR’s objective for decoupled configuration.


13-14: Simplify commonMain Dependency Declaration
Flattening the dependency block for commonMain improves readability and reduces nesting. This change is consistent with the broader effort to streamline Gradle build scripts.


17-18: Streamline jvmMain Dependencies
The updated configuration that directly assigns dependencies in jvmMain eliminates unnecessary nesting and maintains clarity in the build script.

ktor-client/ktor-client-plugins/ktor-client-encoding/build.gradle.kts (3)

2-2: Update Copyright Notice
Updating the copyright year to "2014-2025" is appropriate and consistent with recent changes across the project.


6-6: Introduce Client Plugin Declaration
The new declaration of ktorbuild.project.client-plugin is consistent with the new modular and isolated configuration approach. This change simplifies dependency management for client plugins.


10-12: Restructure Kotlin SourceSets
The updated Kotlin block now directly declares the jvmTest.dependencies within the sourceSets block. This flattening reduces vertical nesting and makes the configuration more succinct.

ktor-server/ktor-server-plugins/ktor-server-partial-content/build.gradle.kts (3)

2-2: Update Copyright Notice
The header now correctly reflects the updated time span until 2025, maintaining consistency across modules.


7-9: Standardize Server Plugin Usage
Adding the ktorbuild.project.server-plugin plugin ensures uniformity across server modules and supports the isolated configuration model introduced in this PR.


13-14: Flatten commonMain Dependency Block
By directly applying the dependency configuration to commonMain, the build script is simplified and becomes easier to maintain.

ktor-http/build.gradle.kts (4)

2-2: Update Copyright Notice
The adjusted copyright range to "2014-2025" aligns with current project standards and is correctly propagated in the file.


6-6: Introduce Library Plugin
The addition of the ktorbuild.project.library plugin supports the modular build structure improvements, enhancing clarity and project isolation.


12-15: Refine commonMain Dependencies Structure
Flattening the commonMain.dependencies block to directly include dependency declarations (using api(...)) reduces unnecessary nesting and enhances readability.


16-19: Restructure jvmTest Dependency Block
Directly declaring dependencies in the jvmTest.dependencies block simplifies the script. Please verify that the scopes for these dependencies remain correct.

build-logic/src/main/kotlin/ktorbuild/internal/publish/PublishTasks.kt (1)

8-8: Clarify Import Path for maybeNamed
Updating the import from ktorbuild.maybeNamed to ktorbuild.internal.gradle.maybeNamed provides a more explicit reference to the internal package. This change improves maintainability by clarifying the origin of the maybeNamed function.

ktor-server/ktor-server-plugins/ktor-server-status-pages/build.gradle.kts (3)

2-2: Updated Copyright Notice
The copyright notice has been updated to “2014-2025”, ensuring that the header remains accurate and current.


7-9: Introduce Server Plugin
Adding the plugins block with id("ktorbuild.project.server-plugin") centralizes the build configuration for server modules and aligns with the overall initiative for project isolation.


13-14: Simplify CommonTest Dependency Declaration
Refactoring the commonTest source set to directly access the dependencies (via commonTest.dependencies { ... }) improves readability by removing unnecessary nesting. Ensure that the dependency on ktor-server-call-id remains intact.

ktor-server/ktor-server-plugins/ktor-server-metrics/build.gradle.kts (4)

2-2: Updated Copyright Notice
The header has been updated to reflect the new range (2014-2025), keeping the legal boilerplate consistent across modules.


7-9: Apply Unified Server Plugin
The addition of the plugins block applying ktorbuild.project.server-plugin is consistent with the refactor to isolate projects. This change helps standardize the plugin configuration across server modules.


13-16: Refined jvmMain Dependency Layout
The jvmMain.dependencies block is now clearly defined, listing required Dropwizard libraries. The flattening of the dependency configuration improves clarity without changing functionality.


17-21: Updated jvmTest Dependencies
The dependencies for jvmTest have been updated to directly reference required modules and libraries. This straightforward declaration aligns with the new build style and should be verified to ensure all modules are correctly resolved.

ktor-server/ktor-server-plugins/ktor-server-pebble/build.gradle.kts (5)

2-2: Updated Copyright Notice
The copyright header now reflects “2014-2025,” which maintains consistency with other modules in the project.


5-7: Add Server Plugin Declaration for Pebble Module
Inserting the plugins block with id("ktorbuild.project.server-plugin") promotes a unified plugin strategy across the server modules and aids in isolating project configurations.


10-11: Restructure Kotlin Source Sets
The reorganization within the kotlin { sourceSets { ... } } block simplifies dependency declarations and improves overall readability.


11-13: jvmMain Dependency Declaration
The jvmMain source set now lists api(libs.pebble) directly. This concise syntax aligns with the project’s updated dependency management style.


14-18: jvmTest Dependency Declaration
Dependencies under jvmTest are now clearly declared. Ensure that the various module dependencies (for conditional headers, compression, and content negotiation) are correctly resolved after this refactor.

ktor-server/ktor-server-plugins/ktor-server-openapi/build.gradle.kts (2)

5-7: Enforce Consistent Server Plugin Usage
The new plugins block with id("ktorbuild.project.server-plugin") is now applied. This helps standardize the Gradle configuration across server plugins and supports the new isolated project approach.


16-22: Streamlined jvmMain Dependency Declaration
The dependencies for the jvmMain source set are declared in a flattened and concise manner. This change simplifies maintenance while retaining all necessary dependencies, including Swagger Codegen and parser libraries.

ktor-server/ktor-server-config-yaml/build.gradle.kts (3)

2-2: Updated Copyright Notice
The file’s header now correctly reflects the 2014-2025 period, keeping the legal header consistent with recent updates across modules.


5-7: Introduce Library Plugin
Using the new plugins block with id("ktorbuild.project.library") aligns this module with the updated project structure for libraries. This helps isolate library-specific configurations and enhances clarity.


9-16: Restructured Kotlin Source Set Configuration
The simplification of the dependency declarations within commonMain—now directly mapping to api(project(":ktor-server:ktor-server-core")) and api(libs.yamlkt.serialization)—is beneficial for maintainability. Ensure that this restructuring doesn’t inadvertently alter the dependency resolution.

build-logic/src/main/kotlin/ktorbuild/internal/Version.kt (1)

18-19: Improved property access using Gradle Provider API

This change refactors property retrieval from likely using findProperty() to using the more modern providers.gradleProperty().orNull approach. This is a good improvement because:

  1. It uses Gradle's Provider API, which enables lazy evaluation
  2. It integrates better with Gradle's configuration avoidance features
  3. It's more explicit about the source of the property

The change aligns with the PR objective of making projects isolated by ensuring properties are evaluated only when needed.

ktor-shared/ktor-websocket-serialization/build.gradle.kts (3)

2-2: Updated copyright year

The copyright year has been updated to reflect the current timeframe.


7-9: Added project library plugin

The addition of the ktorbuild.project.library plugin encapsulates common configuration for library projects. This is a good practice that:

  1. Reduces duplication across build scripts
  2. Centralizes common configuration
  3. Makes the build system more maintainable

This change supports the PR objective of implementing precompiled script plugins to enhance build infrastructure.


11-15: Simplified Kotlin source sets configuration

The Kotlin source sets configuration has been restructured with a flatter hierarchy for dependencies. This change:

  1. Improves readability by reducing nesting levels
  2. Aligns with Kotlin 1.9.20's KotlinMultiplatformSourceSetConventions mentioned in the PR objectives
  3. Makes build scripts more maintainable

The dependencies themselves remain unchanged, preserving the existing functionality.

ktor-server/ktor-server-tomcat-jakarta/build.gradle.kts (2)

7-9: Added project library plugin

The addition of the ktorbuild.project.library plugin encapsulates common configuration for library projects. This standardizes the build configuration across different modules in the project.


16-29: Simplified Kotlin source sets configuration

The source sets configuration has been improved by:

  1. Flattening the dependency declaration structure
  2. Using the direct sourceSets.jvmMain.dependencies syntax
  3. Maintaining the same dependencies while improving readability

This change reduces vertical nesting in the build scripts, as mentioned in the PR objectives.

ktor-server/ktor-server-plugins/ktor-server-webjars/build.gradle.kts (4)

1-3: Added copyright notice

Added standard copyright header to maintain consistency across project files.


7-9: Added server plugin

The addition of the ktorbuild.project.server-plugin plugin (different from the library plugin in other files) indicates a type-specific approach to project configuration. This plugin likely encapsulates common configuration specific to server plugin projects.

This change supports the PR objective of implementing precompiled script plugins and demonstrates a nuanced approach to different project types.


13-15: Simplified dependency declaration for jvmMain

The dependency structure has been simplified by directly accessing the dependencies property of jvmMain, reducing unnecessary nesting. The dependencies themselves remain unchanged.


16-20: Simplified dependency declaration for jvmTest

Similarly, the test dependencies structure has been simplified by using the direct jvmTest.dependencies syntax, which improves readability while maintaining the same dependencies.

ktor-server/ktor-server-jetty/build.gradle.kts (3)

7-9: Plugin Addition for Project Isolation
The inclusion of id("ktorbuild.project.library") ensures that the module adheres to the new isolated configuration model. This change simplifies project settings consistently with the PR objectives.


13-22: Streamlined jvmMain Dependency Declaration
Refactoring the jvmMain dependencies to the concise .dependencies { ... } syntax minimizes nesting and enhances readability while retaining the original dependency list.


23-29: Consistent jvmTest Dependency Format
Updating the jvmTest block to use the new DSL format improves consistency across modules and simplifies maintenance of test dependencies.

ktor-server/ktor-server-cio/build.gradle.kts (3)

7-9: Plugin Injection for Modular Configuration
The newly added id("ktorbuild.project.library") plugin correctly initiates the self-contained project setup, aligning with the goal to decouple project configurations.


11-18: Direct Dependency Declaration in commonMain
Utilizing commonMain.dependencies { ... } eliminates unnecessary nesting while declaring dependencies, which enhances clarity and adherence to the updated Gradle script style.


19-23: Clean commonTest Dependency Block
The refactored commonTest.dependencies { ... } maintains dependency consistency and improves readability, perfectly fitting the isolated projects objective.

ktor-client/ktor-client-apache5/build.gradle.kts (3)

7-10: Enhanced Plugin Configuration
Adding the ktorbuild.project.library plugin alongside the existing test-server plugin reinforces the module’s build isolation and modernizes the dependency management.


12-16: Concise jvmMain Dependency Setup
Switching to a direct jvmMain.dependencies { ... } syntax reduces verbosity and aligns this module with the updated DSL conventions seen in other modules.


18-20: Refactored Test Dependency Declaration
The streamlined declaration for jvmTest.dependencies enhances clarity and maintains consistency with the overall refactor approach for dependency management.

ktor-server/ktor-server-plugins/ktor-server-thymeleaf/build.gradle.kts (3)

5-7: Server Plugin Integration
Introducing the ktorbuild.project.server-plugin is appropriate for this module. It clearly demarcates server-side plugin functionality and promotes isolated project configuration.


9-13: Refined jvmMain Dependency Listing
The direct configuration under jvmMain.dependencies { ... } minimizes nesting while preserving the intended dependencies, resulting in a cleaner build script.


14-18: Unified jvmTest Dependency Structure
The updated block for jvmTest.dependencies { ... } follows the same concise style as the main source set, ensuring consistency across the project and easier maintenance.

ktor-shared/ktor-serialization/build.gradle.kts (2)

7-9: Library Plugin Application
The addition of id("ktorbuild.project.library") reinforces the concept of self-contained modules. This change is consistent with the overall strategy for isolating projects in the build configuration.


11-17: Simplified commonMain Dependencies
Moving to a direct commonMain.dependencies { ... } structure reduces complexity in the DSL and aligns with the new streamlined approach applied across the project.

ktor-client/ktor-client-plugins/ktor-client-tracing/build.gradle.kts (2)

5-7: Plugin Declaration for Isolation
The plugins block now adds ktorbuild.project.client-plugin correctly. This adheres to the new isolated project configuration strategy and is consistent with the broader PR objectives.


9-18: Streamlined SourceSets Configuration
The kotlin { sourceSets { ... } } block is reorganized to define dependencies directly inside commonMain and jvmTest. The direct declaration (without extra nesting) improves clarity and maintainability while preserving the intended dependency relationships.

ktor-client/ktor-client-js/build.gradle.kts (2)

5-7: Library Plugin Usage
The file now applies the ktorbuild.project.library plugin. This change is appropriate given the refactoring goals of isolating project configurations and aligning with the new dependency declaration syntax.


10-19: Simplified Dependency Declarations
The kotlin { sourceSets { ... } } configuration for both jsMain and wasmJsMain has been simplified by removing the extra nested blocks. Declaring dependencies directly within the source sets is aligned with the PR’s objective to reduce nesting and enhance readability.

ktor-shared/ktor-serialization/ktor-serialization-gson/build.gradle.kts (2)

7-9: Consistent Application of the Library Plugin
The addition of the ktorbuild.project.library plugin ensures that this module now follows the standardized configuration. This change is in line with other modules and supports the isolation strategy proposed in the PR.


11-26: Refined Kotlin SourceSets Structure
The restructured kotlin { sourceSets { ... } } block now directly declares dependencies for jvmMain and jvmTest, which reduces vertical nesting and simplifies the script. This improved readability and maintainability meets the PR’s goals, and the dependency mappings (e.g., using api(project(...)) and api(libs.gson)) remain correct.

ktor-client/ktor-client-android/build.gradle.kts (2)

7-10: Enhanced Plugin and Test Configuration
Adding ktorbuild.project.library alongside test-server in the plugins block supports both the new isolated project configuration and the testing infrastructure. This clear separation of concerns is a positive step forward.


12-23: Streamlined SourceSets with Direct Dependency Declarations
The new structure for kotlin { sourceSets { ... } } simplifies dependency declarations for jvmMain and jvmTest. This change reduces unnecessary nesting while preserving all intended project dependencies, which is in line with the PR objectives.

build-logic/src/main/kotlin/ktorbuild.publish.verifier.gradle.kts (4)

5-8: Updated Imports for Publish Verification
The updated import section (lines 5–8) now clearly brings in the necessary components from ktorbuild and its internal publish packages. This aligns with the new logic that focuses on published projects.


10-12: Clean Test Repository Setup
The task registration for cleanTestRepository is maintained properly. The use of locateTestRepository() in the delete directive remains clear and consistent with the testing requirements.


14-15: Introduction of Published Projects Variable
The new variable publishedProjects (lines 14–15) retrieves projects tagged with ProjectTag.Published. This targeted approach is an effective refactoring to limit validations and configurations to only the necessary subset of projects.


16-28: Validation Task Refactoring for Published Projects
The ValidatePublishedArtifactsTask is now configured to depend on cleanTestRepository and iterates over publishedProjects to configure the test repository and publish task dependencies. This refactoring streamlines the publish verification process by focusing only on projects marked as published, which is a key improvement promoting project isolation.

ktor-server/ktor-server-plugins/ktor-server-auth/build.gradle.kts (4)

2-2: Copyright Notice Updated.
The copyright header now reflects "2014-2025", ensuring the file is up to date.


8-8: Server Plugin Declaration Added.
The addition of id("ktorbuild.project.server-plugin") aligns with the project isolation goals and standardizes the plugin usage across the server modules.


14-17: Simplified CommonMain Dependencies.
Defining dependencies directly via commonMain.dependencies improves readability by reducing nested blocks. Confirm that the referenced projects and libraries (such as ktor-client-core, ktor-server-sessions, and libs.kotlinx.serialization.json) are accurate across modules.


19-21: Streamlined jvmTest Dependencies.
The refactored jvmTest block now cleanly lists dependencies, which helps maintain consistency with other modules. Ensure that the dependency targets are current and correctly configured.

ktor-client/ktor-client-plugins/ktor-client-content-negotiation/build.gradle.kts (3)

2-2: License Year Updated.
The header now uses "2014-2025" to correctly reflect the current copyright period.


8-8: Client Plugin Declaration Added.
Introducing id("ktorbuild.project.client-plugin") is consistent with the shift toward isolated and self-contained module configurations.


14-15: Refined CommonMain Dependency Configuration.
Moving to a direct dependency declaration (commonMain.dependencies) simplifies the build script. Verify that the dependency on :ktor-shared:ktor-serialization meets the new configuration standards.

build.gradle.kts (1)

12-12: Kotlin Version Print Statement Simplified.
The print statement is now concise—displaying "Kotlin version: ${libs.versions.kotlin.get()}" instead of the earlier verbose message. This change enhances clarity while preserving functionality.

ktor-server/ktor-server-plugins/ktor-server-call-logging/build.gradle.kts (4)

2-2: Copyright Update.
The copyright header has been updated to "2014-2025," aligning with the current standards.


7-9: Server Plugin Applied.
The new plugins block now cleanly applies the ktorbuild.project.server-plugin, reinforcing the refactoring effort toward project isolation.


13-16: Clear jvmMain Dependencies.
Dependencies for jvmMain are now declared directly, improving the script’s readability. Ensure that libraries (like libs.jansi and libs.kotlinx.coroutines.slf4j) are at the correct versions.


18-21: Updated jvmTest Dependency Declarations.
Directly setting dependencies for jvmTest streamlines this section; check that the project references for ktor-server-call-id and ktor-server-status-pages accurately reflect the current module structure.

ktor-shared/ktor-sse/build.gradle.kts (3)

2-2: License Header Revised.
The copyright notice has been updated to "2014-2025," ensuring the file is current.


7-9: Library Plugin Declaration Introduced.
Adding id("ktorbuild.project.library") signals that this module is now managed as a library, which helps standardize the build configuration across the project.


11-16: Streamlined SourceSet Dependency Definition.
Defining dependencies directly within commonMain.dependencies reduces nesting and enhances clarity. Verify that the dependency on :ktor-utils is correctly maintained in the new setup.

ktor-server/ktor-server-plugins/ktor-server-html-builder/build.gradle.kts (1)

9-18: Updated Kotlin DSL Structure

Moving the source set configuration into the dedicated kotlin { sourceSets { … } } block improves readability and maintainability. Confirm that the dependency declarations (such as api(libs.kotlinx.html) for commonMain and the status pages project dependency in commonTest) are fully validated with the new project isolation approach.

ktor-server/ktor-server-plugins/ktor-server-mustache/build.gradle.kts (2)

5-7: Consistent Plugin Declaration

The inclusion of ktorbuild.project.server-plugin is consistent with the server module refactoring. This reinforces the shared configuration structure among the server plugins.


9-20: Refactored SourceSet Structure

The restructuring of the Kotlin DSL into a clear kotlin { sourceSets { … } } block enhances clarity. Double-check that all inter-project dependencies (e.g., those for Mustache, Compression, Conditional Headers, and Content Negotiation) continue to resolve correctly under the new configuration scheme.

ktor-client/ktor-client-plugins/ktor-client-call-id/build.gradle.kts (2)

7-9: Client Plugin Declaration

The new application of ktorbuild.project.client-plugin is appropriate for this module. Ensure that its semantics and configuration requirements are well-documented, matching the expectations across similar client projects.


11-21: Refactored Kotlin DSL for SourceSets

Refactoring the source sets to the streamlined Kotlin DSL format clarifies dependency management. It’s important to verify that the dependency references (like project(":ktor-shared:ktor-call-id") in commonMain and the server-related dependencies in commonTest) accurately reflect the intended modular boundaries.

ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-tests/build.gradle.kts (2)

5-8: Internal Plugin Update and Serialization

The addition of the ktorbuild.project.internal plugin alongside kotlinx-serialization reinforces a clear separation for internal project components. Ensure that this internal plugin’s configuration does not inadvertently expose settings outside the intended scope.


10-23: Streamlined SourceSets Configuration

Reorganizing the sourceSets block into the new Kotlin DSL format simplifies dependency management. Validate that dependencies for both commonMain (including test annotations and primary serialization libraries) and jvmMain (with logging frameworks) function as expected in the isolated project structure.

ktor-client/ktor-client-apache/build.gradle.kts (2)

7-10: Library Plugin Consistency

The switch to using ktorbuild.project.library marks this module as a library, and its combination with the test-server plugin should be reviewed to ensure clear separation of library code and test configurations. Verify that both plugins’ responsibilities are well-documented.


12-22: Updated Dependency Management in SourceSets

The refactored Kotlin DSL for defining sourceSets consolidates dependency configuration, making it more legible. Confirm that the dependencies under jvmMain (for the client core and Apache HTTP async client) and jvmTest are correctly scoped and that no transitive dependency conflicts arise from this restructuring.

ktor-client/ktor-client-plugins/ktor-client-websockets/build.gradle.kts (2)

1-3: Updated Copyright Notice
The header now correctly reflects the new copyright range ("2014-2025") in line with the update.


5-7: Added Client Plugin Declaration
The newly added plugin ktorbuild.project.client-plugin clearly signals the module’s role as a client component and supports the goal of making projects isolated.

ktor-server/ktor-server-plugins/ktor-server-sessions/build.gradle.kts (3)

1-3: Updated Copyright Notice
The updated header with "2014-2025" is consistent with current policy and reflects the necessary update.


7-10: Added Server Plugin and Organized Plugins
Introducing the ktorbuild.project.server-plugin (line 8) helps in isolating and standardizing the server module. The inclusion of kotlinx-serialization immediately afterwards is clear and appropriate.


12-22: Streamlined Dependency Declaration
The configuration within the kotlin block now directly assigns dependencies to commonMain and jvmTest, eliminating extra nesting. This simplification should improve maintainability while keeping functionality intact.

ktor-client/ktor-client-jetty/build.gradle.kts (3)

1-3: Updated Copyright Notice
The copyright header now reflects "2014-2025", which is appropriate for the current version.


7-9: New Library Plugin Declaration
Adding the ktorbuild.project.library plugin isolates the configuration for the Jetty client engine and supports the overall modularization goals.


11-24: Refactored Kotlin DSL Dependency Blocks
The new kotlin block structure cleanly segregates the jvmMain and commonTest dependencies, making the script more readable and easier to maintain.

ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-gson/build.gradle.kts (3)

1-3: Updated Copyright Notice
The header reflects the updated copyright period ("2014-2025"), which is consistent throughout the repository.


5-7: Client Plugin Added
The declaration of ktorbuild.project.client-plugin at the top aligns with the new isolated project approach. This change simplifies the configuration and maintains consistency with other client modules.


9-20: Streamlined Kotlin DSL Structure
The simplified kotlin block now defines source set dependencies directly under jvmMain and jvmTest. This more concise declaration aids in clarity and maintainability. Double-check that all declared dependencies (e.g., for Gson and related modules) resolve correctly with the new syntax.

ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-jackson/build.gradle.kts (3)

1-3: Updated Copyright Notice
The updated header is correct and now reflects the new copyright period ("2014-2025").


5-7: Consistent Plugin Declaration
The addition of ktorbuild.project.client-plugin is consistent with other client modules and supports the isolation of project configurations.


9-23: Optimized Kotlin DSL Dependency Configuration
The refactoring of the kotlin block simplifies dependency declarations across jvmMain and jvmTest. This cleaner approach enhances readability and maintains consistency. Please verify that all dependencies (like Jackson libraries and the testing modules) integrate as expected in the new structure.

ktor-shared/ktor-resources/build.gradle.kts (1)

1-10: Plugin Addition & Copyright
The top of the file now includes an updated copyright notice and adds the
ktorbuild.project.library plugin in the plugins block. This clearly aligns
with the PR objective of isolating project configurations. Ensure that this
plugin is used consistently across modules.

ktor-server/ktor-server-jetty/ktor-server-jetty-test-http2/build.gradle.kts (1)

7-9: Internal Plugin Introduction
The introduction of the ktorbuild.project.internal plugin in the plugins block helps
differentiate the internal project artifacts. Verify that this usage does not conflict
with plugins in aggregating projects and aligns with the lazy evaluation strategy.

ktor-shared/ktor-test-base/build.gradle.kts (3)

7-9: Internal Plugin Application
The use of the ktorbuild.project.internal plugin is applied here, which reinforces
internal build configurations consistently across the Ktor modules.


11-17: Enhancement of commonMain Dependencies
Adding api(project(":ktor-utils")) to the commonMain.dependencies block enriches
the module’s modularity by ensuring shared utilities are available. Confirm that
this addition does not introduce any circular dependency issues.


19-24: Clear JVM Main Dependency Declarations
Splitting out dependencies for jvmMain into its own block enhances the configurability
and clarity of module-specific dependencies. This approach is consistent with similar refactors.

ktor-client/ktor-client-cio/build.gradle.kts (5)

1-3: Copyright Update
Updating the copyright year to 2025 correctly reflects the current timeline of
the project’s development.


7-10: Plugin Declaration Consistency
The inclusion of ktorbuild.project.library in the plugins block helps standardize
library project configurations. This change follows the broader effort across the modules.


14-19: Refactored commonMain Dependencies
The dependency declarations under commonMain.dependencies are now more concise.
Ensure that the reordering or flattening does not affect dependency resolution.


20-22: commonTest Dependencies Restructuring
Flattening the dependency declaration within commonTest.dependencies makes the DSL
easier to scan and consistent with the overall approach.


23-27: jvmTest Dependencies Refinement
The reorganization of jvmTest.dependencies into a more structured format improves
readability and maintainability. Verify that all required test dependencies are present
and correctly configured.

build-logic/src/main/kotlin/ktorbuild.base.gradle.kts (1)

10-11: ProjectTagsService Registration
Registering the project with ProjectTagsService.register(project) is a key addition that
supports the lazy evaluation and synchronizes project tags as outlined in the PR objectives.
This setup should be monitored to ensure that it integrates seamlessly with the existing
build lifecycle.

ktor-client/ktor-client-winhttp/build.gradle.kts (3)

8-8: Consistent Library Plugin Addition
The new plugin declaration id("ktorbuild.project.library") is added as intended to help isolate the project. This aligns well with the PR objectives.


17-20: Streamlined Dependency Declaration for windowsMain
The refactored dependency block for windowsMain now directly uses the dot notation. The dependencies remain unchanged and the syntax is much clearer.


21-25: Clean Dependency Block for windowsTest
The changes refactor the windowsTest dependency declarations into a concise form. All references to projects are preserved, and the structure is consistent with similar modules.

ktor-server/ktor-server-plugins/ktor-server-auth-jwt/build.gradle.kts (2)

5-7: Appropriate Server Plugin Usage
The addition of the server plugin id("ktorbuild.project.server-plugin") is consistent with the PR’s goal to isolate project configurations.


9-19: Concise SourceSets and Dependency Blocks
The updated Kotlin DSL for the sourceSets (both for jvmMain and jvmTest) is clear and simplifies dependency declarations. Dependency references (including libs.java.jwt and libs.jwks.rsa) are maintained correctly.

ktor-http/ktor-http-cio/build.gradle.kts (4)

7-9: Plugin Declaration for Library Module
The new ktorbuild.project.library plugin is added to this module to ensure its configuration is isolated. This change is consistent with similar updates across the project.


11-16: Simplified CommonMain Dependencies
The block for commonMain.dependencies now uses a cleaner dot notation. The dependencies on project(":ktor-http") and project(":ktor-io") appear correct. It might be beneficial to quickly verify that these project paths still resolve as expected.


18-20: Clear jvmMain Dependency Specification
The jvmMain.dependencies block is refactored effectively with a concise syntax (declaring the dependency on project(":ktor-network")).


22-24: Clean and Concise jvmTest Dependencies
The dependency declaration for jvmTest is straightforward and maintains the intended dependency on libs.kotlinx.coroutines.test.

ktor-server/ktor-server-plugins/ktor-server-auth-ldap/build.gradle.kts (3)

5-7: Server Plugin Applied Correctly
The file now explicitly applies the ktorbuild.project.server-plugin, which is in line with establishing isolated project configurations for server components.


9-13: Refined jvmMain Dependency Declaration
The jvmMain.dependencies block is streamlined, and the dependency on project(":ktor-server:ktor-server-plugins:ktor-server-auth") remains intact. Verify that this module reference is still correct within the overall project structure.


14-17: Consistent jvmTest Dependencies for LDAP Authentication
The jvmTest.dependencies block clearly lists the required ApacheDS libraries. The structure and dependencies are consistent with expectations.

ktor-server/ktor-server-servlet-jakarta/build.gradle.kts (3)

7-9: Library Plugin Application for Servlet Module
The new plugin declaration id("ktorbuild.project.library") is now applied for this module. This ensures isolation and standardizes the build configuration across modules.


11-13: Preserved JVM Toolchain Configuration
The ktorBuild block specifying jvmToolchain(11) remains unchanged and correctly supports the module’s requirements.


15-29: Refactored and Readable Kotlin SourceSets Block
The transformation of the sourceSets block into a concise structure for both jvmMain and jvmTest is clear and improves readability. Notably, the jvmMain block correctly includes an API dependency on ":ktor-server:ktor-server-core" and marks libs.jakarta.servlet as compileOnly, which is typical for servlet APIs provided at runtime. Meanwhile, the jvmTest block properly lists implementation dependencies.

ktor-server/ktor-server-test-host/build.gradle.kts (4)

7-9: Plugin Configuration Update:
The introduction of id("ktorbuild.project.library") in the plugins block clearly aligns with the PR objective by enabling isolated, self-contained project setups through precompiled script plugins.


11-18: Streamlined CommonMain Dependencies:
Restructuring the Kotlin DSL to declare commonMain.dependencies directly inside the sourceSets block reduces unnecessary nesting and improves readability. This change simplifies maintenance and preserves clarity in dependency declaration.


20-34: Updated jvmMain Dependencies Block:
The revised formatting for the jvmMain.dependencies block aligns with the new streamlined structure. The inline comment regarding the inclusion of the websockets artifact is informative. Consider exploring alternatives in the future if the trade-off regarding artifact size becomes a concern.


36-39: Modernized jvmTest Dependencies:
The simplified declaration for the jvmTest.dependencies block enhances consistency within the build script. The dependency configuration is now clear and concise.

ktor-client/ktor-client-plugins/ktor-client-resources/build.gradle.kts (2)

7-10: Client Plugin Update:
Adding the id("ktorbuild.project.client-plugin") to the plugins block precisely categorizes this module as a client plugin. This change supports decoupled, isolated configurations as envisioned in the PR objectives.


12-18: Simplified Kotlin Configuration:
The restructuring of the Kotlin DSL to directly nest commonMain.dependencies reduces vertical nesting and declutters the build script. This improved layout makes the dependency declarations easier to follow and maintain.

ktor-client/ktor-client-test-base/build.gradle.kts (2)

7-9: Internal Plugin Addition:
The new plugins block inclusion of id("ktorbuild.project.internal") clearly distinguishes internal modules and standardizes dependency management, which is beneficial for isolated project builds.


11-18: Flattened SourceSet Structure:
The refactoring of the Kotlin DSL by flattening the source set definitions (i.e. commonMain.dependencies directly within sourceSets) eliminates extra nesting levels and leads to clearer, more maintainable build scripts.

build-logic/src/main/kotlin/ktorbuild.doctor.gradle.kts (1)

26-26: Robust Property Access:
Switching from a direct findProperty approach to using providers.gradleProperty("doctor.enableTaskMonitoring").orNull.toBoolean() leverages Gradle’s Providers API, making property retrieval more robust and aligned with best practices.

ktor-server/ktor-server-plugins/ktor-server-resources/build.gradle.kts (2)

7-10: Server Plugin Configuration:
The addition of id("ktorbuild.project.server-plugin") in the plugins block unmistakably designates this module as part of the server plugin set. This explicit declaration supports modular configuration and consistent build practices across projects.


12-18: Optimized Kotlin DSL Structure:
Reformatting the Kotlin DSL to access commonMain.dependencies directly simplifies the dependency declaration process. This refined structure promotes clarity and reduces redundancy in the build script.

ktor-server/ktor-server-plugins/ktor-server-sse/build.gradle.kts (3)

1-4: Updated Header Information
The updated copyright notice now reflects the correct year range (2014–2025) and license information. This keeps the metadata consistent with project standards.


7-10: Addition of Server Plugin
Introducing id("ktorbuild.project.server-plugin") in the plugins block is key for isolating the module configuration. This aligns well with the PR’s objective of decoupling projects.


12-22: Streamlined SourceSets Configuration
Flattening the source set structure into direct dependency declarations (for both commonMain and commonTest) reduces nesting and improves readability. Verify that all dependency paths still resolve correctly.

ktor-server/ktor-server-core/build.gradle.kts (2)

9-12: Incorporation of Library Plugin
The new plugin declaration with id("ktorbuild.project.library") clearly signals that this module is self-contained. This change is consistent with the overall strategy to isolate individual projects.


17-43: Enhanced Dependency Declaration in SourceSets
Refactoring the dependency declarations for commonMain, jvmMain, commonTest, and jvmTest simplifies maintenance and aligns with Kotlin DSL best practices. Confirm that the reorganized dependencies continue to cover all required modules.

ktor-server/ktor-server-test-base/build.gradle.kts (2)

7-10: Utilization of Internal Plugin for Test Base
Applying id("ktorbuild.project.internal") in the plugins block correctly categorizes this module as internal. This is in line with the intended refactoring to further isolate project configurations.


11-28: Simplified SourceSets for Testing Dependencies
The consolidation of dependencies within the commonMain and jvmMain source sets reduces unnecessary nesting. This makes the configuration easier to read and maintain without altering dependency semantics.

ktor-server/ktor-server-plugins/ktor-server-jte/build.gradle.kts (2)

5-8: Server Plugin Integration for JTE Module
Adding id("ktorbuild.project.server-plugin") ensures that the server JTE module adheres to the isolated project model. This change is aligned with the refactoring goals.


14-27: Refined Kotlin DSL for Dependency Management
The restructured kotlin { sourceSets { ... } } block—covering both jvmMain and jvmTest—offers a cleaner, more maintainable way to declare dependencies. All dependencies remain present and correctly grouped.

ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-serialization/build.gradle.kts (3)

1-4: Updated Copyright Metadata
The header now properly reflects the current copyright timeline (2014–2025), ensuring all files are up-to-date.


5-9: Addition of Client Plugin Declaration
Introducing id("ktorbuild.project.client-plugin") in the plugins block properly categorizes this module as a client-specific component. This aligns with the overall refactoring toward isolated, self-contained project configurations.


10-17: Optimized SourceSet Dependency Declaration
The updated Kotlin DSL structure with kotlin { sourceSets { ... } } removes extra nesting and clarifies dependency references (e.g., libs.kotlinx.serialization.json and the relevant project dependency). This contributes to improved readability and maintainability.

ktor-server/ktor-server-test-suites/build.gradle.kts (3)

7-9: Added appropriate plugin for internal project structure

This addition of the ktorbuild.project.internal plugin aligns with the PR objective of implementing precompiled script plugins for better build infrastructure and project isolation.


11-13: Improved source sets configuration structure

The new structure for Kotlin source sets follows the updated syntax pattern introduced in Kotlin 1.9.20, reducing vertical nesting and making the build script more concise.


22-22: Simplified dependency declaration for jvmMain

The restructured jvmMain dependencies block follows the same improved pattern, enhancing readability while maintaining the same dependency relationships.

ktor-client/ktor-client-plugins/ktor-client-content-negotiation/ktor-client-content-negotiation-tests/build.gradle.kts (2)

8-8: Added ktorbuild.project.internal plugin

This addition enforces consistent project structure and configuration, supporting the PR goal of making projects more isolated and self-contained.


12-23: Restructured sourceSets configuration for better readability

The change adopts the new pattern for Kotlin multiplatform source set configuration that reduces nesting and improves readability while maintaining the same dependencies. This is consistent with the changes made in other module build scripts.

build-logic/src/main/kotlin/ktorbuild/internal/gradle/Property.kt (3)

7-12: Added necessary imports for file provider utilities

These imports support the new directory and file provider extension functions, which are essential for the implementation of lazy evaluation mentioned in the PR objectives.


16-18: Added directoryProvider extension function

This function creates a Provider<Directory> from a file provider lambda, enabling lazy resolution of directory references. This supports the PR goal of refactoring aggregating projects to utilize Lazy APIs.


19-20: Added regularFileProvider extension function

Similar to the directoryProvider function, this utility creates a Provider<RegularFile> from a file provider lambda, furthering the implementation of lazy evaluation for file references.

build-logic/src/main/kotlin/ktorbuild.publish.gradle.kts (2)

5-6: Updated import statements for better organization

Changed from a specific import to a wildcard import for the ktorbuild package while maintaining a specific import for the internal gradle findByName function, improving code organization.


17-17: Implemented project tagging for published projects

This addition integrates with the new ProjectTagService mentioned in the PR objectives, which synchronizes evaluation between aggregating and ordinary projects. Tagging this script as "Published" ensures proper coordination with other tagged projects.

ktor-server/ktor-server-jetty-jakarta/build.gradle.kts (3)

7-9: Plugin Addition for Isolation
The addition of the ktorbuild.project.library plugin helps to isolate this module’s configuration and enforces a consistent build setup across projects.


18-27: Streamlined jvmMain Dependency Declaration
The dependencies under jvmMain are now declared directly via the dependencies property. This flattening of the structure improves clarity and aligns with the objective of reducing vertical nesting in build scripts.


28-35: Consistent jvmTest Dependency Configuration
Defining the jvmTest dependencies directly supports a more readable and uniform configuration. All declared dependencies appear consistent with other modules in the project.

ktor-client/ktor-client-curl/build.gradle.kts (3)

7-11: Unified Plugin Configuration
The plugin block now includes ktorbuild.project.library alongside other plugins. This change enforces consistent project configuration isolation across modules while retaining essential functionality (e.g., kotlinx-serialization and test-server).


20-23: Refined Dependency Declaration for desktopMain
The direct declaration of dependencies in the desktopMain source set (using its dependencies property) simplifies the configuration. The referenced projects and libraries are correctly declared.


24-29: Consistent Dependency Declaration for desktopTest
The desktopTest source set now declares dependencies directly, ensuring clarity. The mix of implementation and api configurations appears properly set up as per the project’s dependency requirements.

ktor-bom/build.gradle.kts (5)

5-6: Importing Custom Build Logic
Importing all definitions from ktorbuild.* ensures that custom Gradle extensions and helper functions are available. This change supports the new dependency constraint features introduced later in the file.


7-11: Base Plugin Integration for BOM Configuration
The inclusion of the ktorbuild.base plugin standardizes the build infrastructure for the BOM module. Combined with java-platform and maven-publish, it modernizes the project configuration.


19-21: Deferred Publication Plugin Application
Applying the ktorbuild.publish plugin after the publications are configured (as noted by the inline comment) is a correct approach. It ensures that the publishing process can accurately reference the complete configuration.


22-28: Dynamic Collection of Library Publications
The new allPublications declaration uses projectsWithTag(ProjectTag.Library) to collect, filter, and transform library project publications. This refactoring simplifies dependency constraint management and reduces manual upkeep.


30-32: Lazy Addition of Dependency Constraints
Using dependencyConstraints.addAllLater(allPublications) allows for a lazy and dynamic configuration of API constraints. This approach improves build time determinism and modularity.

ktor-shared/ktor-serialization/ktor-serialization-tests/build.gradle.kts (2)

5-8: Internal Plugin for Test Modules
The addition of the ktorbuild.project.internal plugin indicates this module is intended for internal use. This aids in isolating implementation details while still supporting necessary functionalities like Kotlin serialization.


10-19: Refined Dependency Declaration in Source Sets
Restructuring the kotlin block to directly use sourceSets (with jvmMain.dependencies) creates a cleaner and more maintainable configuration. The dependencies, including the newly added test integration for content-negotiation, align with the new build configuration strategy.

ktor-server/ktor-server-plugins/ktor-server-default-headers/build.gradle.kts (4)

9-11: Server Plugin Integration
Introducing the ktorbuild.project.server-plugin plugin in this module centralizes server-specific configurations. This makes the module more self-contained and adheres to the isolated projects objective.


15-17: Streamlined CommonMain Dependency Declaration
The update to define dependencies directly via commonMain.dependencies enhances readability and consistency with other modules. The inclusion of libs.kotlinx.datetime is correctly positioned and requires no further changes.


21-52: Version File Generation Task Remains Consistent
The generateKtorVersionFile task is well defined and leverages dynamic properties (such as the current year) to keep version information current. The use of lazy task registration and dependency on prepareKotlinIdeaImport follows best practices.


53-59: Dynamic Source Directory Inclusion for Generated Code
Adding the generated sources directory to the commonMain source set via kotlin.srcDir(generateKtorVersionFile) ensures that the dynamically generated version file is included in the compilation process. This integration is clean and follows established conventions.

ktor-server/build.gradle.kts (2)

7-9: Improved project isolation with library plugin

The addition of the ktorbuild.project.library plugin aligns with the PR objective of making projects isolated and self-contained. This standard plugin application replaces custom configuration code that was likely previously scattered throughout the build scripts.


11-18: Simplified source set configuration

The updated syntax for Kotlin source set configuration is cleaner and more concise. This change:

  1. Removes nested block structure
  2. Uses the .dependencies property directly
  3. Maintains the same dependency relationships

This aligns with the PR objective of reducing vertical nesting in build scripts while making each project self-contained.

ktor-server/ktor-server-tomcat/build.gradle.kts (2)

7-9: Standardized plugin application

The addition of the ktorbuild.project.library plugin standardizes this module's configuration with the rest of the project, supporting better project isolation.


11-24: Improved DSL structure for source sets

The refactored source set configuration uses a more concise syntax while maintaining the same dependencies. This aligns with the PR's goal of simplifying configuration and reducing nesting in build scripts.

ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-xml/build.gradle.kts (3)

2-2: Updated copyright year

The copyright year has been updated to 2025, keeping the license notice current.


5-8: Added library plugin while preserving serialization plugin

The ktorbuild.project.library plugin has been added while maintaining the existing kotlinx-serialization plugin. This ensures standardized project configuration without losing specialized functionality.


10-22: Streamlined source set configuration

The Kotlin source set configuration has been refactored to use direct dependency declaration syntax, which is more concise and consistent with the other modules. This supports the PR's goal of standardizing build configuration across the project.

ktor-client/ktor-client-jetty-jakarta/build.gradle.kts (2)

7-9: Standardized project configuration

The addition of the ktorbuild.project.library plugin brings this module in line with the standardized build configuration, supporting project isolation.


16-28: Simplified source set DSL

The refactored Kotlin DSL syntax for source sets is more concise while maintaining the same dependencies. This change supports the PR's goal of simplifying build configuration and reducing nesting.

build-logic/src/main/kotlin/ktorbuild/targets/JvmConfig.kt (3)

7-8: Added imports for project tagging

These imports support the new project tagging feature, which is essential for the PR's goal of implementing isolated projects and enabling configuration on demand.


22-22: Added JVM project tagging

This line registers the project with the ProjectTag.Jvm tag, which enables the ProjectTagService to track and synchronize evaluation between projects with different roles (e.g., aggregating vs. ordinary projects). This is a key part of the PR's objective to implement isolated projects with proper evaluation ordering.


105-109: Stricter module naming convention enforcement

The implementation has been improved to:

  1. Strictly enforce that project names must start with "ktor-" prefix using check
  2. Simplify the module name generation logic

This change ensures consistent naming conventions across the project, which is important for module resolution and compatibility.

ktor-shared/ktor-serialization/ktor-serialization-kotlinx/build.gradle.kts (2)

7-10: Refined Plugin Declaration.
The addition of id("ktorbuild.project.library") alongside the existing kotlinx-serialization plugin supports the new isolated project strategy and correctly marks this module as a library.


12-19: Modernized Source Sets Configuration.
Refactoring the source sets into the kotlin { sourceSets { ... } } block improves clarity and consistency with the new Kotlin DSL guidelines adopted across the project.

ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/build.gradle.kts (2)

7-9: Updated Internal Plugin Usage.
The declaration of id("ktorbuild.project.internal") is appropriate for this module, reinforcing the isolation mechanism for internal configurations within the project.


16-26: Cleaned Kotlin DSL for Test Dependencies.
The restructuring of the jvmTest source set dependencies under the kotlin { sourceSets { ... } } block enhances readability and maintainability, making the dependencies explicit and neatly organized.

ktor-utils/build.gradle.kts (2)

7-10: Consolidated Plugin and Serialization Declarations.
Adding id("ktorbuild.project.library") together with id("kotlinx-serialization") ensures this module aligns with the project’s new isolated structure and continues to support serialization functionality effectively.


26-37: Streamlined Dependency Declarations in Source Sets.
The updated structure for commonMain, commonTest, and jvmTest dependencies under the sourceSets block is clear and consistent with the new DSL style, reducing nesting and potential confusion.

ktor-client/ktor-client-okhttp/build.gradle.kts (3)

2-3: Updated Copyright Notice.
The copyright header has been updated to 2025, ensuring that the file's attribution information stays current.


5-8: Consistent Library Plugin Integration.
The addition of id("ktorbuild.project.library") in the plugin block supports the refactoring objectives by clearly delineating this module as a library project, while the inclusion of the test-server plugin remains intact.


10-22: Simplified Kotlin Source Sets Configuration.
Transitioning to the concise kotlin { sourceSets { ... } } DSL structure for declaring dependencies in jvmMain and jvmTest helps reduce vertical complexity and enhances overall readability.

ktor-client/ktor-client-plugins/ktor-client-logging/build.gradle.kts (3)

2-3: Updated Copyright Notice.
The copyright header is now updated for 2025, keeping the license information accurate and current.


5-7: Appropriate Client Plugin Declaration.
Switching to the ktorbuild.project.client-plugin for this module aligns with the architectural changes intended for client plugins, enhancing modularity and consistency across the Ktor client modules.


9-24: Refined Source Sets Structure for Dependencies.
The restructuring of dependency declarations for jvmMain, commonTest, and jvmTest under a unified sourceSets block improves clarity, reduces nesting, and follows the updated Kotlin DSL syntax—this promotes better maintainability and consistency.

ktor-server/ktor-server-plugins/ktor-server-metrics-micrometer/build.gradle.kts (2)

1-7: License and Plugin Declaration Approved

The updated license header and the application of the ktorbuild.project.server-plugin in the plugins block are correct and align with the standardized build configuration.


11-16: Streamlined Dependency Declarations

The dependency block within the kotlin { sourceSets { ... } } section is clear and concise. Both jvmMain and jvmTest dependencies are declared appropriately using the new DSL style.

ktor-client/ktor-client-darwin/build.gradle.kts (1)

12-20: Clear Dependency Setup

The dependency declarations under the darwinMain and darwinTest source sets are streamlined and correctly reference the intended projects. The new syntax enhances readability and maintains consistency across modules.

ktor-server/ktor-server-servlet/build.gradle.kts (1)

11-24: Efficient Dependency Declarations

The dependencies for both jvmMain and jvmTest are organized well under the Kotlin DSL block. The use of direct dependency declaration (e.g., api vs. compileOnly/implementation) is clear and adheres to the refactoring goals.

build-logic/src/main/kotlin/ktorbuild.project.client-plugin.gradle.kts (2)

1-9: Good File Structure and Plugin Application

The file demonstrates proper structure with an updated license header and correct application of the ktorbuild.project.library plugin. This is consistent with the overall refactoring across the project.


31-35: JS Target Dependency Declaration

The conditional block for JS targets properly adds the required runtime-only dependency for the client JS module. This ensures clear separation of platform-specific dependencies.

ktor-server/ktor-server-plugins/ktor-server-freemarker/build.gradle.kts (2)

1-7: License and Plugin Configuration Approved

The file correctly includes the updated license header and applies the ktorbuild.project.server-plugin, which fits the conventions for server plugin modules.


9-21: Streamlined Source Set Dependency Declarations

The dependencies within the kotlin { sourceSets { ... } } block are clearly and efficiently declared. The simplified structure improves readability without altering the intended functionality.

ktor-client/ktor-client-mock/build.gradle.kts (1)

6-8: Streamlined Plugin Configuration.
The addition of the ktorbuild.project.library plugin aligns with the new isolated project configuration strategy, and retaining the kotlinx-serialization plugin is appropriate.

ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-json/build.gradle.kts (1)

8-10: New Plugin Integration.
The introduction of the ktorbuild.project.library plugin is correctly applied here and supports the unified build configuration across modules.

ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-protobuf/build.gradle.kts (2)

8-10: Consistent Plugin Setup.
The use of the ktorbuild.project.library plugin alongside kotlinx-serialization is consistent with the newer configuration strategy adopted throughout the project.


12-25: Optimized Source Set Configuration.
The updated source set syntax simplifies dependency declarations for commonMain, jvmTest, and commonTest, mirroring the approach in other modules and thus improving maintainability.

ktor-server/ktor-server-netty/build.gradle.kts (2)

9-12: Plugin Consistency and Minimalism.
Adding the ktorbuild.project.library plugin here streamlines the configuration and is in line with the project’s goal to achieve isolated builds. The concise plugin block contributes to a cleaner setup.


26-50: Refactored Kotlin Source Sets.
The transition to using direct dependency blocks (e.g., jvmMain.dependencies { ... }) improves readability. The conditional logic for adding native dependencies is clear and correctly positioned within the new structure.

ktor-client/ktor-client-java/build.gradle.kts (2)

6-8: Updated Plugin Declarations.
The introduction of the ktorbuild.project.library plugin here is consistent with its use in other modules, thereby supporting a unified and isolated project build configuration approach.


15-25: Streamlined Kotlin Source Sets.
The revised source set configuration, which uses direct dependency declarations for jvmMain and jvmTest, simplifies the build script and enhances its clarity without altering dependency functionality.

build-logic/src/main/kotlin/ktorbuild/internal/Train.kt (3)

56-57: Good refactoring to use Gradle's providers API!

Using providers.gradleProperty("DeployVersion").orNull instead of findProperty is a better approach as it leverages Gradle's lazy property evaluation. This supports the project isolation goals by enabling more efficient Configuration Cache usage.


59-63: Clean implementation with the new skipSnapshotChecks variable

Good extraction of the boolean condition into a descriptively named variable that makes the code more readable and maintainable.


67-67: Consistent use of providers API

The change to use providers.gradleProperty("build_snapshot_train").orNull.toBoolean() brings consistency to how properties are accessed throughout the codebase and improves Configuration Cache compatibility.

ktor-client/ktor-client-plugins/ktor-client-json/build.gradle.kts (4)

2-2: Updated copyright year to 2025

Keeping copyright notices current is good practice.


8-8: Good addition of precompiled plugin

Adding the ktorbuild.project.client-plugin aligns with the PR goal of enhancing build infrastructure with precompiled script plugins, making the project more self-contained.


15-17: Clean dependency declaration

The simplified dependency declaration improves readability and maintainability by directly specifying project dependencies.


18-20: Consistent approach to dependency management

This follows the same pattern as the commonTest dependencies, creating a consistent approach throughout the build files.

ktor-client/ktor-client-tests/build.gradle.kts (5)

8-8: Good addition of internal project plugin

Adding the ktorbuild.project.internal plugin supports the PR goal of enhancing build infrastructure with precompiled script plugins.


13-31: Improved source set configuration structure

The refactored Kotlin source sets use a cleaner, more direct syntax that improves readability and maintainability. This structure reduces nesting and provides a more consistent pattern across build files.


43-56: Simplified dependency declarations

Maintaining the same structure for dependency declarations across different source sets creates consistency throughout the build system.


67-69: Consistent formatting for darwinTest dependencies

The simplified, properly indented dependency declarations for darwinTest improve readability.


71-73: Consistent formatting for windowsTest dependencies

The simplified, properly indented dependency declaration for windowsTest follows the same pattern as other source sets.

ktor-dokka/build.gradle.kts (5)

5-5: Simplified imports

Updating to use the wildcard import for ktorbuild.* makes the code cleaner.


32-32: Updated path resolution method

Using resolve instead of dir aligns with standard path handling conventions in Gradle.


36-38: Simplified dependency declaration

The cleaner dependency declaration for dokkaHtmlPlugin improves readability and follows modern Gradle conventions.


40-44: Excellent use of project tags and lazy dependency management

Great implementation using project tags to collect library projects and lazily adding them to the Dokka configuration. This aligns perfectly with the PR goal of using Lazy APIs for aggregating projects and leveraging the new ProjectTagService.


46-49: Improved property resolution with providers API

Changing to use providers.gradleProperty().orNull instead of findProperty is consistent with changes in other files and leverages Gradle's Configuration Cache capabilities. The return type change from Directory? to File? makes the function more compatible with standard Java/Kotlin file APIs.

build-logic/src/main/kotlin/ktorbuild/internal/publish/ValidatePublishedArtifactsTask.kt (3)

7-8: Added Gradle provider-based utilities for better lazy evaluation

These imports introduce utilities that will help implement lazy evaluation with Gradle's Provider API, which aligns with the PR objective of improving project isolation and build infrastructure.


58-62: Improved task property configuration with Gradle providers

The code now uses directoryProvider and regularFileProvider to configure task properties, which provides better lazy evaluation and aligns with Gradle's Provider API best practices. This refactoring supports the PR objective of implementing lazy evaluation for project settings.


134-135:

✅ Verification successful

Changed return type from Provider to File

The locateTestRepository() function now returns a File instead of a Provider<Directory>. This simplifies the API but changes how the function is consumed. This change appears to be part of a larger refactoring to use provider wrappers at the call site (as seen in line 59) rather than having the function itself return providers.


🏁 Script executed:

#!/bin/bash
# Check for other usages of locateTestRepository() to verify they've all been updated
rg "locateTestRepository\(\)" --type kotlin -A 2 -B 2

Length of output: 2388


Refactoring verified: File return type is consistently applied

The change to return a File from locateTestRepository() is consistently reflected throughout the codebase. All call sites—such as in the Gradle script (using delete(locateTestRepository())) and within ValidatePublishedArtifactsTask.kt (wrapped in directoryProvider { locateTestRepository() } and passed to setUrl(...))—have been updated to accommodate the new return type. This confirms that the API simplification is correctly implemented as part of the broader refactoring.

ktor-client/ktor-client-core/build.gradle.kts (3)

2-2: Updated copyright year to 2025

Simple update to the copyright year.


7-9: Added ktorbuild.project.library plugin

This plugin likely encapsulates common configuration for library projects, reducing duplication across build scripts. This change aligns with the PR objective of enhancing build infrastructure and improving project isolation.


11-39: Restructured Kotlin source sets for better readability

The Kotlin source sets configuration has been significantly simplified, replacing nested blocks with a more direct approach where dependencies are specified directly under each source set. This change improves readability and maintainability of the build script while keeping the same functional dependencies.

The new syntax leverages the KotlinMultiplatformSourceSetConventions from Kotlin 1.9.20 as mentioned in the PR objectives.

build-logic/src/main/kotlin/ktorbuild/dsl/Collections.kt (4)

1-7: New Kotlin utility file with appropriate header and suppression

This new file includes the proper copyright header and uses @file:Suppress("PackageDirectoryMismatch") to ensure these utility functions are available without explicit imports, which is a common pattern for DSL utility functions.


12-14: Added maybeRegister utility function for NamedDomainObjectContainer

This utility function provides conditional registration for named domain objects, allowing code to either get an existing object or create a new one if it doesn't exist. This simplifies configuration code and reduces boilerplate, supporting the PR goal of enhancing build infrastructure.


16-18: Added mapValue extension for Provider<Iterable>

This extension function enhances the Provider API by allowing transformations of iterable values within providers. This utility makes it easier to work with Gradle's provider API and supports the lazy evaluation model, aligning with the PR objective of implementing Lazy APIs.


19-20: Added flatMapValue extension for Provider<Iterable>

Similar to mapValue, this extension function supports flattening transformations of iterable values within providers. This is a useful addition to the Provider API that contributes to the goal of enhancing build infrastructure with better lazy evaluation support.

ktor-server/ktor-server-tests/build.gradle.kts (2)

8-8: Added ktorbuild.project.internal plugin

This plugin likely encapsulates common configuration for internal projects, which helps standardize build configuration across the codebase. This change supports the PR objective of enhancing build infrastructure and improving project isolation.


12-25: Restructured Kotlin source sets configuration

Similar to the changes in other build scripts, the Kotlin source sets configuration has been simplified to use a more direct approach where dependencies are defined directly under each source set. This improves readability and maintainability while keeping the same functional dependencies.

This consistent restructuring across build scripts ensures a standardized approach to project configuration.

ktor-java-modules-test/build.gradle.kts (6)

5-5: Updated imports to use Kotlin DSL-style import

The import has been modernized to use the Kotlin DSL-style wildcard import for ktorbuild, making it cleaner and more idiomatic.


8-11: Migrated to precompiled script plugin architecture

The build script now uses the ktorbuild.base plugin instead of directly applying configuration, in line with the PR objective to enhance build infrastructure with precompiled script plugins.


15-15: Improved project filtering using tag-based selection

Replacing direct filtering with the tag-based project selection mechanism improves maintainability and aligns with the PR goal of making projects more isolated.


17-19: Enhanced task input handling with Provider API

The task now uses Gradle's Provider API through mapValue, which ensures proper task input tracking and supports Gradle's configuration caching capabilities.


30-35: Improved file writing with correct Provider API usage

The code now correctly uses modules.get() to retrieve values from the Provider at execution time rather than configuration time, which is important for Gradle's execution model.


55-57: Refactored dependency configuration with Lazy APIs

Dependencies are now added using Gradle's Lazy APIs (addAllLater) along with mapValue, replacing manual iteration over subprojects. This improves build performance by deferring dependency resolution until necessary.

ktor-server/ktor-server-plugins/ktor-server-websockets/build.gradle.kts (3)

2-2: Updated copyright year

Copyright notice has been updated to 2025.


7-9: Added server plugin configuration through precompiled script plugin

Added the ktorbuild.project.server-plugin for standardized server plugin configuration, eliminating the need for repetitive boilerplate across server plugin modules.


11-27: Simplified Kotlin source set configuration

The build script has been restructured to use a flatter, more concise Kotlin DSL syntax for source set and dependency declarations. This modernizes the build script and reduces nesting, making it easier to read and maintain.

build-logic/src/main/kotlin/ktorbuild/targets/KtorTargets.kt (7)

5-6: Added suppression for UnstableApiUsage

Added the @file:Suppress("UnstableApiUsage") annotation to silence warnings about using unstable Gradle APIs, which is appropriate for build infrastructure code.


14-19: Added imports for Gradle Problem API

Added imports for Gradle's Problem API, which is used to provide better error reporting for source set validation issues.


233-233: Added source set freezing mechanism

Added call to freezeSourceSets() to ensure source sets are consistent after target configuration, preventing unexpected source set additions.


237-245: Added constants and problem definitions for source set validation

Defined constants and problem identifiers to support the source set validation mechanism, making error reporting more structured and consistent.


246-272: Implemented source set freezing functionality

Added the freezeSourceSets() function which prevents unauthorized additions of source sets after initial configuration. This enforces a more structured approach to project configuration and avoids accidental source set creation, supporting the PR's goal of enhancing build infrastructure.

The implementation properly handles both error and warning cases based on property configuration.


274-278: Added warning reporting for extra source sets

Added extension function to report warnings when extra source sets are detected but ignored due to the property setting.


279-308: Added comprehensive error reporting for extra source sets

Implemented detailed error reporting with context information, possible causes, and suggested solutions when unauthorized source sets are detected. This significantly improves the developer experience by providing actionable guidance rather than cryptic error messages.

ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-cbor/build.gradle.kts (4)

1-3: Good addition of copyright notice

The addition of the copyright notice is consistent with good practices for file headers.


8-8: Migration to precompiled script plugin

Using the ktorbuild.project.library plugin aligns with the PR objective of implementing precompiled script plugins to make projects self-contained. This should help with configuration isolation and better build performance.


12-14: Simplified Kotlin source set configuration

The new syntax for Kotlin source sets is more concise and reduces nesting, aligning with the PR objective of utilizing the Kotlin 1.9.20's KotlinMultiplatformSourceSetConventions. This improves readability of the build script.


18-18: Consistent source set configuration style

This change applies the same simplified syntax to the commonTest source set, maintaining consistency throughout the file.

build-logic/src/main/kotlin/ktorbuild/dsl/KotlinSourceSets.kt (2)

1-14: Well-structured header and type aliases

Good use of file-level documentation, experimental API opt-in, and clear type aliases that improve code readability.


16-24:

❓ Verification inconclusive

Good extension of Kotlin multiplatform source set conventions

The additional accessors for platform-specific source sets (posix, darwin, desktop, windows) nicely complement the built-in conventions from KotlinMultiplatformSourceSetConventions. Using the KotlinSourceSetConvention delegate provides a consistent and maintainable approach.

It's worth verifying that these source set conventions are used consistently across the project. Consider running a simple check:


🏁 Script executed:

#!/bin/bash
# Check for usage of these source set conventions across the project
rg -l "\.posixMain|\.darwinMain|\.desktopMain|\.windowsMain" --type kotlin

Length of output: 138


Verify consistent usage of platform-specific source sets

The extension accessors defined in build-logic/src/main/kotlin/ktorbuild/dsl/KotlinSourceSets.kt are well implemented, and the use of the KotlinSourceSetConvention delegate is a clean and maintainable approach. However, our repository-wide search confirms that these accessors (e.g. .posixMain, .darwinMain, .desktopMain, .windowsMain) currently appear only in this declaration file. If these properties are meant to be consumed indirectly through the DSL or build configurations, then this behavior is expected. Otherwise, you might want to ensure that their usage is consistent across relevant modules.

  • Action: Please verify that the DSL or build scripts correctly utilize these accessors as intended.
build-logic/src/main/kotlin/ktorbuild/ProjectTagsService.kt (5)

1-61: Well-designed ProjectTagsService implementation

The ProjectTagsService is well-implemented with clear internal API for tag management. The service pattern with registration through the Gradle shared services is appropriate. Good use of MapProperty for storing project tags and proper finalization before access in getTagged().


63-66: Clean extension function for tag addition

Simple and effective extension function that makes tag assignment more concise.


68-91: Excellent documentation for projectsWithTag function

The documentation clearly explains the function's purpose and, most importantly, highlights the distinction between eager and lazy APIs with practical examples. This helps prevent potential build performance issues.


93-104: Good use of laziness for project evaluation

The implementation properly postpones project evaluation using the provider API, which supports the PR objective of making projects isolated and efficient with configuration-on-demand.


106-113: Clever approach to ensuring project evaluation

The ensureAllProjectsEvaluated method intelligently ensures that non-meta projects are evaluated when needed, while avoiding circular evaluation dependencies between meta projects.

Copy link
Contributor

@bjhham bjhham left a comment

Choose a reason for hiding this comment

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

Is there validation for new libraries where the corresponding plugin is missing?

*/

plugins {
id("ktorbuild.project.library")
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if we had some helpers in buildSrc to simplify this expression since it's everywhere. Like fun library() = plugins { id("ktorbuild.project.library") }. I'm guessing there's reasons that make this impossible or undesirable though...

Copy link
Member Author

Choose a reason for hiding this comment

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

It think we could introduce accessors for plugins, like this:

plugins {
    ktorbuild.project.library
}

I don't want to hide plugins block behind shortcut because projects can have more than one plugin applied.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah. I forgot that plugins {} block is very special. Gradle extracts it from build script and compiles separately, so it has some limitations. Extension-functions declared in build-logic aren't available in this block.

@bjhham
Copy link
Contributor

bjhham commented Mar 18, 2025

Can you merge main into 3.2.0-eap after this is merged? I think it'll need a bit of resolving.

@osipxd
Copy link
Member Author

osipxd commented Mar 18, 2025

Is there validation for new libraries where the corresponding plugin is missing?

Projects without plugins won't compile as ktorbuild.project.library applies KMP configurations, publishing, etc.

@osipxd osipxd force-pushed the osipxd/precompiled-script-plugins branch from 63abd23 to 8921e78 Compare March 19, 2025 10:18
@osipxd osipxd force-pushed the osipxd/precompiled-script-plugins branch from 8921e78 to 0e02db3 Compare March 19, 2025 10:23
@osipxd osipxd enabled auto-merge (squash) March 19, 2025 10:25
@osipxd osipxd disabled auto-merge March 19, 2025 10:36
@osipxd osipxd enabled auto-merge (squash) March 19, 2025 10:37
@osipxd osipxd merged commit 6e31697 into main Mar 19, 2025
16 of 18 checks passed
@osipxd osipxd deleted the osipxd/precompiled-script-plugins branch March 19, 2025 11:43
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