Skip to content

feat: add saved presets for common stacks#61

Draft
z8dn wants to merge 1 commit into
mainfrom
claude/github-issue-GpRDA
Draft

feat: add saved presets for common stacks#61
z8dn wants to merge 1 commit into
mainfrom
claude/github-issue-GpRDA

Conversation

@z8dn

@z8dn z8dn commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

Implements #30 — predefined file groups for common project stacks.

Adds a Load Preset action to the Custom File Groups toolbar in the Advanced Android Project Tree settings. Selecting it shows a two-step popup:

  1. Choose a preset — Standard Android, Kotlin Multiplatform, or Compose Multiplatform.
  2. Choose how to apply it:
    • Append — add the preset's groups, skipping any whose name already exists (case-insensitive).
    • Overwrite — replace the patterns of existing groups with the same name, append the rest.
    • Replace all — discard existing groups and use only the preset's groups.

Loaded groups are ordinary ProjectFileGroups and remain fully editable through the existing Edit dialog.

Presets

Preset Groups
Standard Android Gradle Scripts, Android Config, Documentation
Kotlin Multiplatform Gradle Scripts, Native Configs, Platform Metadata
Compose Multiplatform Compose Config, Compose Resources

Changes

  • New settings/FileGroupPresets.ktFileGroupPreset data class, PresetMergeMode enum, the built-in presets, and a non-mutating merge() helper.
  • settings/AndroidViewSettingsConfigurable.kt — wires the Load Preset extra action into the existing ToolbarDecorator; reuses the established apply/reset flow (no persistence changes).
  • messages/AndroidViewBundle.properties — new UI / preset strings.
  • New FileGroupPresetsTest.kt — covers preset structure (non-empty, valid names + inclusion patterns, unique names) and all three merge modes including source-list immutability.

Testing

⚠️ The build/test could not be run in this environment — the IntelliJ Platform Gradle Plugin cannot download the Android Studio platform dependency (2026.1.1.1) under the current network policy, and it is not cached. The logic in FileGroupPresets.merge() is covered by unit tests that should be run locally via ./gradlew test.

Closes #30

https://claude.ai/code/session_01RJzGpHgrEkpuhg1AzE7M2J


Generated by Claude Code

Add a Load Preset action to the Custom File Groups settings that
populates the list with predefined groups for Standard Android,
Kotlin Multiplatform, and Compose Multiplatform stacks.

After choosing a preset, the user picks how to apply it:
- Append (skip duplicate names)
- Overwrite groups with the same name
- Replace all existing groups

Presets and merge logic live in FileGroupPresets and are unit-tested.

Closes #30
@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 10aaf816-0e56-4b87-8a59-d867ea18db4d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/github-issue-GpRDA

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

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.

Feature: Saved Presets for Common Stacks

2 participants