Skip to content

Select the full-megazord libsForTests variant by capability - #7833

Merged
ahochheiden merged 1 commit into
mozilla:mainfrom
rvandermeulen:libsfortests-capability
Nov 25, 2026
Merged

ahochheiden merged 1 commit into
mozilla:mainfrom
rvandermeulen:libsfortests-capability

Conversation

@rvandermeulen

@rvandermeulen rvandermeulen commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Give the libsForTests variant a Java runtime usage attribute and the org.mozilla.appservices:full-megazord-libsForTests capability, and have component tests depend on it with testImplementation instead of implementation. This keeps the desktop test libraries off the components' runtime classpath, and lets mozilla-central's in-tree build select the variant through dependency substitution, which cannot select a configuration by name.

copyMegazordNative now depends on the desktop cargo build itself; the implementation edge used to trigger that build as a side effect of packaging libsForTests.

Firefox try push with this change vendored, covering the in-tree application-services builds: https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=124973

@rvandermeulen
rvandermeulen force-pushed the libsfortests-capability branch from 39b7a0b to 4a699b1 Compare November 24, 2026 02:08
Give the libsForTests variant a Java runtime usage attribute and a capability, and have component tests depend
on it with testImplementation instead of implementation. This keeps the desktop test libraries off the
components' runtime classpath, and lets mozilla-central's in-tree build pick the variant through dependency
substitution, which cannot select a configuration by name.

copyMegazordNative now depends on the desktop cargo build itself; the implementation edge used to trigger that
build as a side effect of packaging libsForTests.
@rvandermeulen
rvandermeulen force-pushed the libsfortests-capability branch from 4a699b1 to 30b4d2d Compare November 25, 2026 01:43
@rvandermeulen rvandermeulen changed the title Select the full-megazord libsForTests variant by capability [ci full] Select the full-megazord libsForTests variant by capability Nov 25, 2026
@rvandermeulen
rvandermeulen marked this pull request as ready for review November 25, 2026 01:58

@bendk bendk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes some sense to me, although I don't know enough about gradle to really understand it. I think @ahochheiden's opinion is the important one.

@ahochheiden ahochheiden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@ahochheiden
ahochheiden added this pull request to the merge queue Nov 25, 2026
Merged via the queue into mozilla:main with commit 1b41f95 Nov 25, 2026
65 checks passed
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.

3 participants