Skip to content

Adapt AGENTS.md for CMP needs - #3461

Merged
Oleksandr Karpovich (eymar) merged 12 commits into
jb-mainfrom
ok/adapt_agents_md
Oct 1, 2026
Merged

Oleksandr Karpovich (eymar) merged 12 commits into
jb-mainfrom
ok/adapt_agents_md

Conversation

@eymar

Copy link
Copy Markdown
Member

Release Notes

N/A

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Most often, we work in `./compose/ui/ui` and `./compose/foundation/foundation`.
Also, we publish klibs for some other libraries: `./navigation`, `./navigation3`.

In this fork, we apply fork-specific gradle files: `./gradle/libs-fork.versions.toml`, and `build-fork.gradle` in the modules, which co-exist with the upstream gradle files.

@igordmn Igor Demin (igordmn) Sep 25, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
In this fork, we apply fork-specific gradle files: `./gradle/libs-fork.versions.toml`, and `build-fork.gradle` in the modules, which co-exist with the upstream gradle files.
The repo contains both the original AOSP code and additional fork-only code.
The repo supports two modes: the original AOSP mode (`aospComposeProject.sh`), with the original set of modules, and fork mode, with a much smaller set of modules and its own build infrastructure. Fork mode is the primary mode and is used by default; AOSP mode is rarely needed.
- Common code, used by both modes:
- `commonMain`, `commonTest`, and other source sets defined both in `build.gradle` and `build-fork.gradle` files
- Received from the upstream AOSP repo
- Fork-only code:
- Independent build infrastructure: `settings-fork.gradle`, `buildSrc-fork`, `build-fork.gradle`, and `./gradle/libs-fork.versions.toml`
- if modules exists only in `settings-fork.gradle`, but not in `settings.gradle`, it may just contain `build.gradle` without `build-fork.gradle`
- iOS, desktop, JS, and WasmJS source sets, their combinations, and their corresponding test source sets
- AOSP-only code:
- Independent build infrastructure: `settings.gradle`, `buildSrc`, `build.gradle`, and `./gradle/libs.versions.toml`
- `androidMain` and its corresponding test source sets
- `*StubsMain` source sets - created in the upstream AOSP repo to ensure `commonMain` compilation on the all Kotlin targets
- iOS, desktop, JS, and WasmJS source sets for libraries and targets developed in AOSP

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I applied your suggstion. But have a question.

Fork mode is the primary mode and is used by default; AOSP mode is rarely needed.

Is it worth to add it in AGENTS.md instructions if most of the time we work in the fork mode, making AOSP-only details irrelevant?

Also about redirects - most of the times, when itroducing changes / making fixes in the fork we don't bother with redicrects. I believe this information might be a noise for the agents in most cases. WDYT?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this worth it. If we don't mention different modes, the files are not differentiated. Adding "AOSP mode is rarely needed" we say that associated with it files should be not touched in most cases.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also about redirects

Probably, let's remove lines redirectversions.toml, libraryversions.toml

@eymar Oleksandr Karpovich (eymar) Oct 1, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Probably, let's remove lines redirectversions.toml, libraryversions.toml

Fixed.

Adding "AOSP mode is rarely needed" we say that associated with it files should be not touched in most cases.

Such an instruction is quite vague - it might make the agent wonder if/when it's applicable - Is the "rarely needed" applicable for the particular case?

But the models improve, and I'm fine to try it and see how it goes.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread compose/AGENTS.md Outdated
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
@eymar
Oleksandr Karpovich (eymar) merged commit 17b7308 into jb-main Oct 1, 2026
26 checks passed
@eymar
Oleksandr Karpovich (eymar) deleted the ok/adapt_agents_md branch October 1, 2026 12:27
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