Skip to content

Conversation

ShortTimeNoSee
Copy link

This adds config_file.parentFile.mkdirs() in presentation/prebuild.gradle to prevent build failures in clean environments (like Termux, CI containers) whenever presentation/src/main/res/raw/ doesn't exist yet.

This change is platform-safe and has no effect when the directory already exists.

Adds config_file.parentFile.mkdirs() before writing auth_config_onedrive.json.
This'll prevent build failure on clean environments (Termux, CI, Docker) where presentation/src/main/res/raw doesn't exist.
Safe for all platforms. No effect when directory already exists.
Copy link

coderabbitai bot commented Oct 7, 2025

Walkthrough

The change modifies presentation/prebuild.gradle to ensure the parent directories for a target JSON configuration file are created before writing. It adds a step to create the directory path prior to file output, altering the write path logic accordingly. No other control flow or error handling adjustments are introduced.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely describes the primary change of ensuring the configuration directory exists before writing the file and directly reflects the core fix implemented in the pull request. It avoids unnecessary detail while remaining specific enough for teammates to understand the intent.
Description Check ✅ Passed The description clearly explains the addition of config_file.parentFile.mkdirs() in the specified Gradle file, the problem it addresses in clean environments, and the fact that it is platform-safe, directly matching the changes in the diff.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 137dccf and b77c5bb.

📒 Files selected for processing (1)
  • presentation/prebuild.gradle (1 hunks)
🔇 Additional comments (1)
presentation/prebuild.gradle (1)

29-29: Good safeguard before writing config file.

Creating the parent directory first prevents the clean-build failures we were seeing and is safe when the path already exists.


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.

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.

1 participant