agentleFS
garfiecgarfiec/Librechat-Mobile/build-logic/CLAUDE.md

Librechat-Mobile / build-logic

CLAUDE.md149 starsChanged 7 days agoApache-2.0View on GitHub

Convention plugins that apply consistent Gradle configuration across all modules. Convention plugin apply() MUST use: Do NOT use override fun apply(target: Project) = with(target) { ... } -- that returns the with result instead of Unit, which causes a Gradle error. All dependency versions live in gradle/libs.versions.toml. Never hardcode versions in build.gradle.kts files. Use libs. accessors (e.g., libs.koin.android, libs.ktor.client.core). Feature modules use id("librechat.kmp.feature") (KMP) or id("librechat.mobile.feature") (Android-only) which auto-applies library, compose, koin, serialization, and Nav 3. They only need to…

The file

We split this CLAUDE.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do NOT use override fun apply(target: Project) = with(target) { ...

    line 40
  2. Very specific:

    All dependency versions live in gradle/libs.versions.toml.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Build Logic

Convention plugins that apply consistent Gradle configuration across all modules.

Convention Plugins (13 total)

Android

Plugin IDClassWhat it does
librechat.mobile.applicationAndroidApplicationConventionPluginAGP application plugin, compileSdk 37, minSdk 26, JDK 17
librechat.mobile.libraryAndroidLibraryConventionPluginAGP library plugin, same SDK/JDK config
librechat.mobile.composeAndroidComposeConventionPluginCompose compiler, Compose BOM, Material 3
librechat.mobile.koinAndroidKoinConventionPluginKoin core + Android dependencies
librechat.mobile.featureAndroidFeatureConventionPluginAuto-applies: library + compose + koin + serialization + Nav 3
librechat.mobile.roomAndroidRoomConventionPluginRoom + KSP, schema export config
librechat.detektDetektConventionPluginDetekt static analysis (cross-platform, applied to all modules)

KMP

Plugin IDClassWhat it does
librechat.kmp.libraryKmpLibraryConventionPluginKMP library setup (Android + iOS targets)
librechat.kmp.composeKmpComposeConventionPluginCompose Multiplatform + Material 3
librechat.kmp.koinKmpKoinConventionPluginKoin multiplatform dependencies
librechat.kmp.featureKmpFeatureConventionPluginAuto-applies: kmp library + compose + koin + serialization + Nav 3
librechat.kmp.roomKmpRoomConventionPluginRoom multiplatform + KSP

Shared

Plugin IDClassWhat it does
librechat.kotlin.serializationKotlinSerializationConventionPluginKotlinx Serialization plugin + JSON dependency

Critical: apply() Signature

Convention plugin apply() MUST use:

override fun apply(target: Project) {
    with(target) { ... }
}

Do NOT use override fun apply(target: Project) = with(target) { ... } -- that returns the with result instead of Unit, which causes a Gradle error.

Version Catalog

All dependency versions live in gradle/libs.versions.toml. Never hardcode versions in build.gradle.kts files. Use libs. accessors (e.g., libs.koin.android, libs.ktor.client.core).

Feature Module Convention

Feature modules use id("librechat.kmp.feature") (KMP) or id("librechat.mobile.feature") (Android-only) which auto-applies library, compose, koin, serialization, and Nav 3. They only need to add feature-specific dependencies. Feature modules depend on :core:* only, never on other feature modules.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.