Skip to content

RulesEngine: Maven Central publishing wiring#3488

Draft
ajpallares wants to merge 2 commits into
pallares/rules-engine-skeletonfrom
pallares/rules-engine-distribution
Draft

RulesEngine: Maven Central publishing wiring#3488
ajpallares wants to merge 2 commits into
pallares/rules-engine-skeletonfrom
pallares/rules-engine-distribution

Conversation

@ajpallares
Copy link
Copy Markdown
Member

@ajpallares ajpallares commented May 14, 2026

Resolves SDK-4338

Stacked on top of: #3478 — :rules-engine: internal skeleton module.

Description

This PR flips on every Maven Central publishing piece for the :rules-engine module:

  • Drops the :rules-engine short-circuit in ConfigureConditionalPublishing so com.vanniktech.maven.publish gets applied again.
  • Adds the mavenPublishing { … } block (AndroidSingleVariantLibrary("defaultsRelease", …)), gated by plugins.withId("com.vanniktech.maven.publish") { … } so the custom-entitlement-computation deploy lane keeps working.
  • Adds :rules-engine:metalavaGenerateSignatureDefaultsRelease to scripts/api-dump.sh so CI catches API drift in rules-engine/api.txt.
  • Adds the dokkaHtmlPartial suppression so the published multi-module dokka site doesn't include an empty rules-engine page.
  • Re-adds the api(project(":rules-engine")) constraint in :bom.

The metalava { … } config + the committed rules-engine/api.txt baseline already live in the skeleton PR (#3478) — they're standard hygiene for every revenuecat.public.library module — so this PR just wires them into CI enforcement.

Why a separate PR?

The skeleton itself (#3478) ships a kotlin android library gated by @InternalRulesEngineAPI with no functionality and no consumer. We deliberately split publishing wiring out so the skeleton can land independently and we don't start publishing empty purchases-rules-engine versions to Maven Central on every SDK release (Maven Central versions are immutable, so once 10.7.0 exists we're committed to keeping it published forever).

This PR is kept open as a draft and will be merged alongside (or just before) the first PR that introduces a real consumer of :rules-engine. Until then, the skeleton compiles, runs tests, and gets detekt'd on every PR without producing any external artifact.

Flip on every distribution-related piece for the `:rules-engine`
module so that, once a real consumer of the engine ships, releasing
it is just a matter of merging this PR alongside the skeleton:

- Drop the `:rules-engine` short-circuit from
  `ConfigureConditionalPublishing` so the `com.vanniktech.maven.publish`
  plugin gets applied to the module again.
- Add the `mavenPublishing { … }` block (`AndroidSingleVariantLibrary`
  on `defaultsRelease`) inside a `plugins.withId("com.vanniktech.maven.publish")`
  block so the custom-entitlement-computation deploy lane keeps working.
- Restore the `metalava { … }` configuration (hidden annotations) and
  the committed `rules-engine/api.txt` baseline, and add the matching
  `metalavaGenerateSignatureDefaultsRelease` task to `scripts/api-dump.sh`
  so CI catches API drift.
- Restore the `dokkaHtmlPartial` suppression so the published
  multi-module dokka site doesn't include an empty
  `rules-engine` page.
- Re-add the `api(project(":rules-engine"))` constraint in `:bom`.

This stays a draft until the engine has functionality and a consumer
so we don't push empty `purchases-rules-engine` versions to Maven
Central. Stacked on top of the `pallares/rules-engine-skeleton`
branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.89%. Comparing base (aed6e2f) to head (19bdc99).

Additional details and impacted files
@@                       Coverage Diff                       @@
##           pallares/rules-engine-skeleton    #3488   +/-   ##
===============================================================
  Coverage                           79.89%   79.89%           
===============================================================
  Files                                 369      369           
  Lines                               14871    14871           
  Branches                             2048     2048           
===============================================================
  Hits                                11881    11881           
  Misses                               2157     2157           
  Partials                              833      833           

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant