Skip to content

fix: R8 AutoValue suppressions + Huawei release in CI#2592

Merged
abdulraqeeb33 merged 1 commit intomainfrom
fix/r8-otel-autovalue-huawei-ci
Mar 24, 2026
Merged

fix: R8 AutoValue suppressions + Huawei release in CI#2592
abdulraqeeb33 merged 1 commit intomainfrom
fix/r8-otel-autovalue-huawei-ci

Conversation

@abdulraqeeb33
Copy link
Copy Markdown
Contributor

Summary

  • OTel consumer-rules: Add -dontwarn for com.google.auto.value.AutoValue, AutoValue$Builder, and AutoValue$CopyAnnotations so R8 no longer fails on missing Auto Value types referenced by OpenTelemetry / disk buffering (e.g. Huawei minified release).
  • Demo proguard: Align examples/demo with the same Auto Value suppressions (plus existing Jackson lines).
  • CI: Run :app:assembleHuaweiRelease alongside :app:assembleGmsRelease in the existing demo minified-release step (from OneSignalSDK composite :app).

Verification

  • Local: ./gradlew :app:assembleGmsRelease :app:assembleHuaweiRelease from OneSignalSDK succeeded.

Made with Cursor

- Add consumer ProGuard rules for com.google.auto.value.* so minified apps
  do not fail on missing OTel transitive references.
- Align demo proguard with AutoValue + Builder suppressions.
- Extend CI demo build to run :app:assembleHuaweiRelease alongside GMS.

Made-with: Cursor
Copilot AI review requested due to automatic review settings March 24, 2026 18:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent R8 minified-release failures caused by missing optional transitive classes referenced by OpenTelemetry (notably AutoValue), and to ensure the demo app’s Huawei minified release is built in CI.

Changes:

  • Add -dontwarn suppressions for com.google.auto.value.AutoValue* in the OTel module consumer ProGuard rules.
  • Align the demo app ProGuard rules with the same AutoValue suppressions.
  • Update CI to attempt building both GMS and Huawei minified release variants for the demo app.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
examples/demo/app/proguard-rules.pro Adds AutoValue -dontwarn lines for demo minified builds.
OneSignalSDK/onesignal/otel/consumer-rules.pro Adds AutoValue -dontwarn lines to avoid R8 missing-class errors for SDK consumers.
.github/workflows/ci.yml Updates CI to include Huawei release assembly in the demo minified build job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +44 to +47
- name: "[Build] Demo app (minified GMS + Huawei release)"
working-directory: OneSignalSDK
run: |
./gradlew :app:assembleGmsRelease --console=plain
./gradlew :app:assembleGmsRelease :app:assembleHuaweiRelease --console=plain
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

The demo app conditionally applies either com.google.gms.google-services or com.huawei.agconnect based on gradle.startParameter.taskRequests (it uses an if (...) { } else if (...) { }), so invoking :app:assembleGmsRelease and :app:assembleHuaweiRelease in the same Gradle run will only apply the first-matched plugin (likely google-services). That can cause the Huawei release build to be built without the intended Huawei plugin/config, or fail depending on the build. Consider running these as two separate Gradle invocations (or separate steps), so each build config is exercised with the correct plugin applied.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

📊 Diff Coverage Report

✓ Coverage check passed (no source files changed)

📥 View workflow run

@abdulraqeeb33 abdulraqeeb33 changed the title fix(otel): R8 AutoValue suppressions + Huawei release in CI fix: R8 AutoValue suppressions + Huawei release in CI Mar 24, 2026
@abdulraqeeb33 abdulraqeeb33 merged commit b164424 into main Mar 24, 2026
12 checks passed
@abdulraqeeb33 abdulraqeeb33 deleted the fix/r8-otel-autovalue-huawei-ci branch March 24, 2026 18:23
abdulraqeeb33 added a commit that referenced this pull request Mar 24, 2026
Co-authored-by: AR Abdul Azeez <abdul@onesignal.com>
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