Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gradle files to work in both app-services and mozilla-central #6550

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mhammond
Copy link
Member

@mhammond mhammond commented Jan 7, 2025

Newer version of #6530

There are 3 commits here, mainly as some might be more controversial than others:

  • first commit is use appServicesRootDir rather than rootDir; no real functionality changes just a way so gradle works roughly the same in both places.
  • second commit moves app-services to use the same shaped Config object as m-c. When app-services is in m-c, we end up using the Config object from m-c - the app-services version of this object is just for use in app-services so the same gradle code works in both places. Given some comments in the source it appears we maybe used to do that?
  • Last commit is where some behaviour changes are implemented depending on whether we are in m-c or app-services. In particular, the code checks gradle.hasProperty("mozconfig") if it needs to do something different based on the location. For now, that means things like disabling the cargo-gradle plugin and changing how uniffi-bindgen is run, etc. The implemented behaviour should be correct in app-services, but might be less so in m-c for now (eg, currently we just disable uniffi-bindgen, whereas ultimately we obviously still need to run it, once I work out how!)

@mhammond mhammond force-pushed the monorepo-wips branch 2 times, most recently from 535d001 to 24044d0 Compare January 16, 2025 16:09
@ncalexan
Copy link
Member

Nothing here looks particularly likely to cause pain in the future.

I'm generally concerned that we don't have a lot of high-level oversight of the Gradle build system, and that's causing slow builds and awkward development experiences (that look to get worse before they get much better), but that's the world we're in right now and nothing here is likely to make that more than linearly worse.

@mhammond
Copy link
Member Author

Awesome, thanks Nick! I guess I might as well open this for review then!

@mhammond mhammond marked this pull request as ready for review January 20, 2025 21:52
…of rootDir.

The intent is that this will be the same as `rootDir` when in app-services, but magically
turn into the root of the app-services tree once in mozilla-central.
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