Skip to content

Fixed supersededBy call#376

Merged
gmazzo merged 1 commit intogmazzo:mainfrom
jonapoul:forClass-in-test
Mar 6, 2026
Merged

Fixed supersededBy call#376
gmazzo merged 1 commit intogmazzo:mainfrom
jonapoul:forClass-in-test

Conversation

@jonapoul
Copy link
Copy Markdown
Contributor

@jonapoul jonapoul commented Mar 6, 2026

I got a build regression failure from the bump to v6.0.8, see here if you're interested in the details. Key part:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':aktual-app:android:generateDebugLintReportModel'.
> Could not create task ':aktual-app:android:generateTestBuildConfigClasses'.
   > Cannot add a DefaultBuildConfigClassSpec with name 'Resources' as a DefaultBuildConfigClassSpec with that name already exists.

Apparently triggered when configuring with a forClass call within the test buildconfig source set like this:

extensions.configure(BuildConfigExtension::class) {
  sourceSets.named("test") {
    forClass("Resources") {
      // config
    }
  }
}

Added a fix plus a regression test - turns out the call to supersededBy was calling itself before which was apparently causing some recursive(?) behaviour between related source sets.

@jonapoul jonapoul marked this pull request as ready for review March 6, 2026 19:18
@gmazzo gmazzo enabled auto-merge (squash) March 6, 2026 19:34
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.23%. Comparing base (1436383) to head (dd1fd0c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #376      +/-   ##
==========================================
+ Coverage   60.02%   60.23%   +0.21%     
==========================================
  Files          26       26              
  Lines         948      948              
  Branches      220      220              
==========================================
+ Hits          569      571       +2     
+ Misses        316      314       -2     
  Partials       63       63              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmazzo gmazzo merged commit 9ac1e0c into gmazzo:main Mar 6, 2026
5 checks passed
@jonapoul jonapoul deleted the forClass-in-test branch March 6, 2026 19:48
@gmazzo
Copy link
Copy Markdown
Owner

gmazzo commented Mar 6, 2026

Thanks for the fix! I'm going to iterate the whole thing

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