Skip to content

2.0.0 - Rework gradle#510

Merged
rteyssandier merged 27 commits into2.0.0from
feat/2.0.0/gradle_plugin
Apr 5, 2026
Merged

2.0.0 - Rework gradle#510
rteyssandier merged 27 commits into2.0.0from
feat/2.0.0/gradle_plugin

Conversation

@rteyssandier
Copy link
Copy Markdown
Contributor

No description provided.

@rteyssandier rteyssandier self-assigned this Mar 14, 2026
@rteyssandier rteyssandier added the enhancement New feature or request label Mar 14, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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!

This pull request introduces a comprehensive rework of the project's Gradle build system by establishing a build-logic composite build. This strategic change centralizes common build configurations, such as Android library settings, Kotlin Multiplatform targets, and Maven publishing details, into reusable convention plugins. The primary goal is to eliminate redundant build script logic, enhance consistency, and simplify the maintenance of build configurations across all modules.

Highlights

  • Gradle Convention Plugins: Implemented Gradle Convention Plugins to centralize and standardize build logic across the project.
  • Build Configuration Refactoring: Refactored numerous module-level build.gradle.kts files to utilize the new convention plugins, significantly reducing boilerplate for Android, Kotlin Multiplatform, and Maven publishing configurations.
  • New Convention Plugins: Introduced dedicated convention plugins: floconAndroidLibrary for Android library modules, floconKotlinMultiplatform for Kotlin Multiplatform modules, and floconPublish for Maven publishing.
  • Development Environment Improvement: Updated .vscode/settings.json to set java.configuration.updateBuildConfiguration to automatic, streamlining Java build updates in VS Code.
Changelog
  • FloconAndroid/.vscode/settings.json
    • Updated java.configuration.updateBuildConfiguration from interactive to automatic.
  • FloconAndroid/build-logic/convention/build.gradle.kts
    • Added new Gradle build script to define and register custom convention plugins: floconAndroidLibrary, floconKotlinMultiplatform, and floconPublish.
  • FloconAndroid/build-logic/convention/src/main/kotlin/io/github/openflocon/buildlogic/AndroidConfig.kt
    • Added new Kotlin file defining common Android library configurations (compileSdk, minSdk, compileOptions).
  • FloconAndroid/build-logic/convention/src/main/kotlin/io/github/openflocon/buildlogic/FloconAndroidLibraryConventionPlugin.kt
    • Added new Kotlin file implementing a Gradle plugin for Android library modules, applying common Android and Kotlin Android configurations.
  • FloconAndroid/build-logic/convention/src/main/kotlin/io/github/openflocon/buildlogic/FloconKotlinMultiplatformConventionPlugin.kt
    • Added new Kotlin file implementing a Gradle plugin for Kotlin Multiplatform modules, configuring Android, JVM, and iOS targets with common settings.
  • FloconAndroid/build-logic/convention/src/main/kotlin/io/github/openflocon/buildlogic/FloconPublishConventionPlugin.kt
    • Added new Kotlin file implementing a Gradle plugin for Maven publishing, centralizing publication details and POM configuration.
  • FloconAndroid/build-logic/gradle.properties
    • Added new Gradle properties file to configure JVM arguments for Gradle and Kotlin daemon.
  • FloconAndroid/build-logic/settings.gradle.kts
    • Added new Gradle settings file for the build-logic composite build, defining dependency resolution and including the convention module.
  • FloconAndroid/database/core-no-op/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/database/core/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/database/room-no-op/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/database/room/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/datastores-no-op/build.gradle.kts
    • Replaced direct plugin aliases and extensive Android/Maven publishing configurations with flocon.android.library and flocon.publish convention plugins.
  • FloconAndroid/datastores/build.gradle.kts
    • Replaced direct plugin aliases and extensive Android/Maven publishing configurations with flocon.android.library and flocon.publish convention plugins.
  • FloconAndroid/deeplinks-no-op/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/deeplinks/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/flocon-no-op/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/flocon/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/gradle/libs.versions.toml
    • Added new library and plugin definitions for Gradle, Kotlin, and Maven Publish plugins used in the build logic.
  • FloconAndroid/grpc/grpc-interceptor-base/build.gradle.kts
    • Replaced direct plugin aliases and extensive Android/Maven publishing configurations with flocon.android.library and flocon.publish convention plugins.
  • FloconAndroid/grpc/grpc-interceptor-lite/build.gradle.kts
    • Replaced direct plugin aliases and extensive Android/Maven publishing configurations with flocon.android.library and flocon.publish convention plugins.
  • FloconAndroid/grpc/grpc-interceptor/build.gradle.kts
    • Replaced direct plugin aliases and extensive Android/Maven publishing configurations with flocon.android.library and flocon.publish convention plugins.
  • FloconAndroid/network/core-no-op/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/network/core/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/network/ktor-interceptor-no-op/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/network/ktor-interceptor/build.gradle.kts
    • Replaced direct plugin aliases and extensive Kotlin/Android/Maven publishing configurations with flocon.kotlin.multiplatform and flocon.publish convention plugins.
  • FloconAndroid/network/okhttp-interceptor-no-op/build.gradle.kts
    • Replaced direct plugin aliases and extensive Android/Maven publishing configurations with flocon.android.library and flocon.publish convention plugins.
  • FloconAndroid/network/okhttp-interceptor/build.gradle.kts
    • Replaced direct plugin aliases and extensive Android/Maven publishing configurations with flocon.android.library and flocon.publish convention plugins.
  • FloconAndroid/settings.gradle.kts
    • Included the new build-logic composite build.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

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.

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.

@rteyssandier rteyssandier requested a review from florent37 March 14, 2026 23:02
Copy link
Copy Markdown
Contributor

@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 introduces a significant and valuable refactoring by moving the Gradle build configuration into a build-logic module with convention plugins. This greatly reduces boilerplate code in individual module build scripts and improves consistency across the project. The implementation is well-done.

However, I've found one critical issue in the datastores module where the mandatory Android namespace has been accidentally removed, which will cause the build to fail. I've also left a medium-severity comment regarding a hardcoded future inceptionYear in the publishing configuration, which should be addressed to ensure correct metadata in published artifacts.

id("flocon.android.library")
id("flocon.publish")
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

The android block with the namespace declaration is missing. The com.android.library plugin (applied via the flocon.android.library convention plugin) requires the namespace to be set for the module. Please add it back to fix the build.

android {
    namespace = "io.github.openflocon.flocon.datastores"
}

pom {
name.set(project.name)
description.set(project.findProperty("floconDescription") as? String)
inceptionYear.set("2025")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The inceptionYear is hardcoded to a future year ("2025"). This seems incorrect and was likely copied from the old build files. It would be better to either remove this if it's not strictly required, or source it from a project property to make it more accurate and maintainable.

@rteyssandier rteyssandier added this to the 2.0.0 milestone Mar 16, 2026
@rteyssandier rteyssandier force-pushed the feat/2.0.0/gradle_plugin branch from ef16329 to 3c403c9 Compare March 25, 2026 22:03
@rteyssandier rteyssandier changed the title Rework gradle 2.0.0 - Rework gradle Mar 25, 2026
@rteyssandier rteyssandier merged commit 9bda13e into 2.0.0 Apr 5, 2026
@rteyssandier rteyssandier deleted the feat/2.0.0/gradle_plugin branch April 5, 2026 20:14
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