build: move baseline profiles to the plugin's default source dir (#3931)
Part of the AGP 9 upgrade pre-work: removes a config that breaks library
release builds under AGP 9.
- `baselineProfileOutputDir = "."` on `:purchases` and
`:ui:revenuecatui` made the baseline-profile plugin register `src/main`
itself as a profile source dir; AGP 9's `ProcessLibraryArtProfileTask`
parses every file there (no `.txt` filter) and crashes on
`res/values/styles.xml`.
- Fix: drop the override, let profiles land in the plugin's default
`src/main/generated/baselineProfiles/` dir instead, `git mv` the two
committed profile files there.
- Updates the two hardcoded old paths in `fastlane/Fastfile` and
`.circleci/config.yml`
### Checklist
- [ ] If applicable, unit tests
- [ ] If applicable, create follow-up issues for `purchases-ios` and
hybrids
<details>
<summary>Agent description</summary>
### Motivation
Both public library modules set `baselineProfileOutputDir = "."` in
their `baselineProfile { }`
block. This makes the `androidx.baselineprofile` plugin register
`src/main` (the module root) as
a baseline-profile source directory. Harmless under AGP 8. Under AGP 9,
`ProcessLibraryArtProfileTask` parses *every* file in a registered
profile source dir with no
`.txt` filter, and chokes on `res/values/styles.xml`, breaking every
library **release** build.
This is one item pulled out of a broader AGP 9 upgrade reconnaissance
pass, landed standalone
since it's AGP-8-safe and has no dependency on anything else in that
upgrade.
### Description
- `purchases/build.gradle.kts`, `ui/revenuecatui/build.gradle.kts`:
removed
`baselineProfileOutputDir = "."`. The plugin's default,
`generated/baselineProfiles` under `src/<variant>/`, is used instead
(confirmed from
`androidx.baselineprofile`'s own `BaselineProfileConsumerExtension.kt`
source).
- `purchases/src/main/baseline-prof.txt` and
`ui/revenuecatui/src/main/baseline-prof.txt` moved
(`git mv`) to
`.../src/main/generated/baselineProfiles/baseline-prof.txt`.
- `fastlane/Fastfile` (`generate_baseline_profiles` lane) and
`.circleci/config.yml`
(`generate-baseline-profiles` job) updated to the new paths; both
hardcode the profile file
locations for the biweekly regeneration lane and would otherwise break
on the next scheduled
run.
Tested by diffing the baseline-profile entry inside the built
`purchases` and `ui:revenuecatui`
release AARs before and after the change: byte-identical content and
size in both, confirming the
relocation doesn't change what ships.
</details>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Build and path configuration only; shipped baseline profile content is
unchanged and safe on AGP 8.
>
> **Overview**
> **AGP 9 prep:** stops overriding baseline profile output so library
release builds won’t fail when `ProcessLibraryArtProfileTask` scans all
of `src/main`.
>
> Removes `baselineProfileOutputDir = "."` from `:purchases` and
`:ui:revenuecatui`, so profiles live under
`src/main/generated/baselineProfiles/` instead of
`src/main/baseline-prof.txt`. The committed `baseline-prof.txt` files
are relocated accordingly.
>
> **CI/automation:** `.circleci/config.yml` artifact paths and the
`generate_baseline_profiles` Fastlane lane now point at the new
locations so biweekly regeneration keeps working.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
43609fcec0b6ab63d06689f1fd7872b7e65a72ae. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY --> Á
Álvaro Brey committed
4d97e6edaa3c421e303fda7c8c8980836b8a2e97
Parent: 00193f5
Committed by GitHub <noreply@github.com>
on 8/13/2026, 7:38:18 PM