From a41b7b36f31ae9d5394c25144ec2dc30df1f1e01 Mon Sep 17 00:00:00 2001 From: Simon Zhong Date: Wed, 13 May 2026 14:07:15 -0700 Subject: [PATCH 1/2] Enable Sentry Size Analysis and bump gradle plugin to 6.6.0 Adds sizeAnalysis block gated on GITHUB_ACTIONS so APK/bundle uploads to Sentry only run from CI. Plugin bumped from 6.1.0 to 6.6.0, the minimum version that supports the sizeAnalysis DSL. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index a289cd6..593b345 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel plugins { - id "io.sentry.android.gradle" version "6.1.0" + id "io.sentry.android.gradle" version "6.6.0" id 'com.android.application' id 'kotlin-android' id 'com.ydq.android.gradle.native-aar.import' @@ -147,6 +147,9 @@ sentry { debug = true includeSourceContext = true additionalSourceDirsForSourceContext = ["src/main/java"] + sizeAnalysis { + enabled = providers.environmentVariable("GITHUB_ACTIONS").present + } tracingInstrumentation { enabled = true logcat { From dfc20bb6329b9f4540c833d1690411cd81e86bf2 Mon Sep 17 00:00:00 2001 From: Simon Zhong Date: Wed, 13 May 2026 14:22:03 -0700 Subject: [PATCH 2/2] Add dedicated Sentry Size Analysis workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modeled on EmergeTools/hackernews reference. Triggers on push to main (base build) and PRs against main (head build with base_sha). Runs :app:bundleRelease so size analysis uploads the AAB — what Play Store actually ships — instead of the APK that the codecov workflow happens to upload. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/sentry-size-analysis.yml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/sentry-size-analysis.yml diff --git a/.github/workflows/sentry-size-analysis.yml b/.github/workflows/sentry-size-analysis.yml new file mode 100644 index 0000000..25ad93b --- /dev/null +++ b/.github/workflows/sentry-size-analysis.yml @@ -0,0 +1,28 @@ +name: Sentry Size Analysis + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + size-analysis: + runs-on: macos-14 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build release bundle (uploads to Sentry Size Analysis) + run: ./gradlew :app:bundleRelease + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}