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…
In this repository13 other files it gives its agents.
- app/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- fastlane/CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- shared/CLAUDE.mdCLAUDE.md
- audit-depsSkill
- audit-i18nSkill
- audit-paritySkill
- marketing-refreshSkill
- release-highlightsSkill
- small-screensSkill
- sync-upstreamSkill
- update-web-assetsSkill
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
- Very specific: line 40
Do NOT use override fun apply(target: Project) = with(target) { ...
- Very specific: line 45
All dependency versions live in gradle/libs.versions.toml.
≈ “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.
Files
Build Logic
Convention plugins that apply consistent Gradle configuration across all modules.
Convention Plugins (13 total)
Android
| Plugin ID | Class | What it does |
librechat.mobile.application | AndroidApplicationConventionPlugin | AGP application plugin, compileSdk 37, minSdk 26, JDK 17 |
librechat.mobile.library | AndroidLibraryConventionPlugin | AGP library plugin, same SDK/JDK config |
librechat.mobile.compose | AndroidComposeConventionPlugin | Compose compiler, Compose BOM, Material 3 |
librechat.mobile.koin | AndroidKoinConventionPlugin | Koin core + Android dependencies |
librechat.mobile.feature | AndroidFeatureConventionPlugin | Auto-applies: library + compose + koin + serialization + Nav 3 |
librechat.mobile.room | AndroidRoomConventionPlugin | Room + KSP, schema export config |
librechat.detekt | DetektConventionPlugin | Detekt static analysis (cross-platform, applied to all modules) |
KMP
| Plugin ID | Class | What it does |
librechat.kmp.library | KmpLibraryConventionPlugin | KMP library setup (Android + iOS targets) |
librechat.kmp.compose | KmpComposeConventionPlugin | Compose Multiplatform + Material 3 |
librechat.kmp.koin | KmpKoinConventionPlugin | Koin multiplatform dependencies |
librechat.kmp.feature | KmpFeatureConventionPlugin | Auto-applies: kmp library + compose + koin + serialization + Nav 3 |
librechat.kmp.room | KmpRoomConventionPlugin | Room multiplatform + KSP |
Shared
| Plugin ID | Class | What it does |
librechat.kotlin.serialization | KotlinSerializationConventionPlugin | Kotlinx 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.
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
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.

