Skip to content

feat(ADFA-3712): Save unmodified files before running Gradle tasks#1343

Merged
dara-abijo-adfa merged 2 commits into
stagefrom
ADFA-3712-save-files-before-running-tasks
Jun 1, 2026
Merged

feat(ADFA-3712): Save unmodified files before running Gradle tasks#1343
dara-abijo-adfa merged 2 commits into
stagefrom
ADFA-3712-save-files-before-running-tasks

Conversation

@dara-abijo-adfa
Copy link
Copy Markdown
Contributor

Save unmodified before running Gradle tasks

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4b95f70d-8700-4ead-a9c5-e6e540b98e36

📥 Commits

Reviewing files that changed from the base of the PR and between 99d896f and 0bf513c.

📒 Files selected for processing (1)
  • app/src/main/java/com/itsaky/androidide/actions/build/RunTasksAction.kt

📝 Walkthrough

Release Notes

  • Saves all pending edits before running Gradle tasks — Added automatic file save functionality to RunTasksAction.execAction() that triggers saveAll(requestSync = false) before displaying the Run Tasks dialog, ensuring all unsaved editor changes are persisted prior to executing Gradle build operations

Considerations

  • Async save without error handling — The saveAll() call does not check the result or handle save failures; the Run Tasks dialog will proceed regardless of whether file saves succeed or fail
  • Follows existing patterns — Implementation is consistent with similar pre-execution save logic used in ProjectSyncAction, suggesting this is an established pattern in the codebase

Walkthrough

RunTasksAction.execAction adds a non-blocking save call to persist pending editor changes before initiating Gradle task execution, preventing data loss during the build workflow.

Changes

Edit save before task execution

Layer / File(s) Summary
Save pending edits on task run
app/src/main/java/com/itsaky/androidide/actions/build/RunTasksAction.kt
Before running Gradle tasks, the action now calls saveAll(requestSync = false) to asynchronously persist any unsaved editor changes without blocking the task startup flow.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • Daniel-ADFA
  • jomen-adfa
  • itsaky-adfa
  • jatezzz

Poem

🐰 A save before the tasks take flight,
No edits lost in build's tight race,
One line ensures your code's alright,
As Gradle tasks find their place! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: saving files before running Gradle tasks, which aligns with the changeset that adds a saveAll() call before executing Gradle tasks.
Description check ✅ Passed The description is directly related to the changeset, stating 'Save unmodified before running Gradle tasks' which matches the core functionality being implemented.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ADFA-3712-save-files-before-running-tasks

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.

@dara-abijo-adfa dara-abijo-adfa merged commit 4f206c6 into stage Jun 1, 2026
2 checks passed
@dara-abijo-adfa dara-abijo-adfa deleted the ADFA-3712-save-files-before-running-tasks branch June 1, 2026 10:49
@dara-abijo-adfa dara-abijo-adfa changed the title feat(ADFA-3712): Save unmodified before running Gradle tasks feat(ADFA-3712): Save unmodified files before running Gradle tasks Jun 1, 2026
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