Skip to content

Migrate gradle configuration to kotlin#236

Merged
rashidi merged 3 commits intomasterfrom
gradle/groovy-to-kotlin
May 18, 2025
Merged

Migrate gradle configuration to kotlin#236
rashidi merged 3 commits intomasterfrom
gradle/groovy-to-kotlin

Conversation

@rashidi
Copy link
Copy Markdown
Owner

@rashidi rashidi commented May 18, 2025

No description provided.

@rashidi rashidi added the enhancement New feature or request label May 18, 2025
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @rashidi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

Hello team, gemini-code-assist here with a summary of this pull request. This PR focuses on migrating the Gradle build configuration files from the Groovy DSL (.gradle) to the Kotlin DSL (.gradle.kts). This change affects the root project and all subprojects, providing the benefits of Kotlin's static typing and IDE support for build scripts.

Highlights

  • Gradle Kotlin DSL Migration: The primary change is the conversion of all .gradle files to .gradle.kts files, adopting the Kotlin DSL for Gradle build scripts.
  • Syntax Updates: The build scripts have been updated to use Kotlin syntax for plugin declarations, dependency management, task configuration, and other Gradle features.
  • Root Build Script Enhancements: The root build.gradle.kts includes updates to the JaCoCo report task definition and SonarQube property configuration, leveraging Kotlin DSL features like tasks.register and property accessors (layout.buildDirectory.get()). Subproject test task configuration was also updated.
  • jOOQ Plugin Configuration: The jooq/build.gradle.kts file's jOOQ plugin configuration has been translated to the Kotlin DSL, including setting version and edition, and configuring the code generation tool.

Changelog

Click here to see the changelog
  • batch-rest-repository/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • batch-rest-repository/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • batch-skip-step/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • batch-skip-step/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • build.gradle.kts
    • Migrated root Gradle build script from Groovy to Kotlin DSL.
    • Added JaCoCo plugin.
    • Updated JaCoCo report task definition using tasks.register.
    • Updated SonarQube property path using Kotlin DSL accessors.
    • Updated subprojects test task configuration.
  • cloud-jdbc-env-repo/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • cloud-jdbc-env-repo/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-domain-events/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-domain-events/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-envers-audit/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-envers-audit/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-jdbc-audit/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-jdbc-audit/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-jdbc-schema-generation/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-jdbc-schema-generation/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-jpa-audit/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-jpa-audit/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-jpa-event/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-jpa-event/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-jpa-filtered-query/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-jpa-filtered-query/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-mongodb-audit/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-mongodb-audit/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-mongodb-full-text-search/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-mongodb-full-text-search/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-mongodb-tc-data-load/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-mongodb-tc-data-load/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-mongodb-transactional/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-mongodb-transactional/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-repository-definition/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-repository-definition/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • data-rest-validation/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • data-rest-validation/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • graphql/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • graphql/settings.gradle.kts
    • Migrated Gradle settings script from Groovy to Kotlin DSL.
  • jooq/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
    • Updated jOOQ plugin configuration syntax for Kotlin DSL.
  • settings.gradle.kts
    • Migrated root Gradle settings script from Groovy to Kotlin DSL.
  • test-execution-listeners/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • test-rest-assured/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • test-slice-tests-rest/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
  • web-rest-client/build.gradle.kts
    • Migrated Gradle build script from Groovy to Kotlin DSL.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Groovy scripts now take flight,
Kotlin DSL shines so bright.
Type-safe and clean,
A build system keen,
Making everything feel right.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown
Contributor

Job Summary for Gradle

Gradle Build :: gradle-build
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
spring-boot-tutorials build 8.14 Build Scan published

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the Gradle configuration from Groovy (.gradle) to Kotlin DSL (.gradle.kts). The conversion to Kotlin syntax, including plugin application, dependency declaration, and task configuration, has been consistently applied across the project. While the migration is largely well-executed, there are a few points that need to be addressed to ensure the build's functional correctness.

Summary of Findings

  • JaCoCo Aggregation Configuration: The current JaCoCo setup in the root build.gradle.kts is unlikely to correctly aggregate code coverage reports from subprojects, which is critical for SonarQube integration. It's recommended to use the jacoco-report-aggregation plugin.
  • jOOQ Generated Package Name: The package name for jOOQ generated classes has changed in jooq/build.gradle.kts. This needs confirmation as it could impact existing code.
  • Clarity of Task Finalization: The finalizedBy configuration in the root build.gradle.kts for subproject test tasks could be made more direct and clearer.
  • Missing Newline at End of File (Low Severity): Multiple .gradle.kts files are missing a newline character at the end of the file. While this doesn't affect functionality, it's a common convention to include one. This was not commented on individually due to review settings.
  • Potentially Unused Import (Low Severity): The import org.jooq.meta.kotlin.* in jooq/build.gradle.kts might be unused and could be removed if confirmed. This was not commented on individually due to review settings.

Merge Readiness

The pull request involves a significant and largely well-executed migration to Gradle Kotlin DSL. However, due to the critical issue identified with JaCoCo report aggregation, which impacts code coverage reporting and SonarQube integration, I recommend that these changes not be merged until this critical issue is addressed. The medium-severity issues regarding jOOQ configuration and task finalization clarity should also be reviewed and resolved.

As a reviewer, I am not authorized to approve pull requests. Please ensure the identified issues are resolved and further reviews are conducted if necessary before merging.

@rashidi rashidi merged commit b00705d into master May 18, 2025
5 checks passed
@rashidi rashidi deleted the gradle/groovy-to-kotlin branch May 18, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant