ADFA-3431: (fix) Release build broken due to missing core.cgt file#1113
ADFA-3431: (fix) Release build broken due to missing core.cgt file#1113Daniel-ADFA wants to merge 3 commits into
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated asset resolution in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/build.gradle.kts (1)
546-548: Consider improving the error message to include both checked paths.The fallback logic correctly checks both
assets/<fileName>andassets/release/<fileName>. However, when both paths fail, the exception message only mentions the first path, which could be confusing during debugging.Suggested improvement for clearer error messaging
- val filePath = sourceDir.resolve(fileName).takeIf { it.exists() } - ?: project.rootDir.resolve("assets/release/$fileName").takeIf { it.exists() } - ?: throw FileNotFoundException(sourceDir.resolve(fileName).absolutePath) + val primaryPath = sourceDir.resolve(fileName) + val fallbackPath = project.rootDir.resolve("assets/release/$fileName") + val filePath = primaryPath.takeIf { it.exists() } + ?: fallbackPath.takeIf { it.exists() } + ?: throw FileNotFoundException( + "Asset '$fileName' not found at ${primaryPath.absolutePath} or ${fallbackPath.absolutePath}" + )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/build.gradle.kts` around lines 546 - 548, The FileNotFoundException thrown when neither path exists only includes the primary path; update the fallback logic that computes filePath (the expression using sourceDir.resolve(fileName) and project.rootDir.resolve("assets/release/$fileName")) to throw an exception that includes both checked absolute paths (e.g., the source path and the fallback assets/release path) so the error message clearly reports both candidates when neither exists.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/build.gradle.kts`:
- Around line 546-548: The FileNotFoundException thrown when neither path exists
only includes the primary path; update the fallback logic that computes filePath
(the expression using sourceDir.resolve(fileName) and
project.rootDir.resolve("assets/release/$fileName")) to throw an exception that
includes both checked absolute paths (e.g., the source path and the fallback
assets/release path) so the error message clearly reports both candidates when
neither exists.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f96bf171-4075-4f76-af77-a9dfe69ad19a
📒 Files selected for processing (1)
app/build.gradle.kts
|
Fixed elsewhere by Joel |
No description provided.