Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6d17252
fix(android): Switch from Roborazzi to Paparazzi for snapshot testing
runningcode Mar 18, 2026
4b65f59
fix(android): Update SAGP to 6.3.0-alpha.02
runningcode Mar 18, 2026
f3e2489
fix(android): Wire snapshotsPath to Paparazzi test task output
runningcode Mar 18, 2026
e6704f3
fix(android): Revert SAGP to 6.3.0-alpha.01
runningcode Mar 19, 2026
4e847e8
fix(android): Switch snapshot workflow from Roborazzi to Paparazzi
runningcode Mar 19, 2026
2173ed5
fix(android): Upgrade Gradle wrapper from 8.14.4 to 9.1.0
runningcode Mar 19, 2026
b1aae4b
fix(android): Use Paparazzi's named output property for snapshots path
runningcode Mar 19, 2026
dffcc59
fix(android): Revert snapshots path lookup to original approach
runningcode Mar 19, 2026
c0dc8e3
fix(android): Upgrade SAGP and configure debug variant for CI
runningcode Mar 27, 2026
c9dbe2f
fix(android): Use debug variant for snapshot upload in CI
runningcode Mar 27, 2026
f9297bc
fix(android): Wire Paparazzi snapshots path to debug upload task
runningcode Mar 27, 2026
27aca01
fix(android): Simplify upload task to only depend on recordPaparazziD…
runningcode Mar 27, 2026
58bf55d
fix(android): Wire snapshotsPath and bump SAGP to 6.4.0-alpha.3
runningcode Mar 30, 2026
e14cbbb
fix(android): Bump SAGP to 6.4.0-alpha.4
runningcode Mar 31, 2026
6d06280
fix(android): Remove Emerge snapshots job and bump SAGP to alpha.6
runningcode Apr 2, 2026
a89319a
fix(android): Use SAGP snapshots block and remove manual task wiring
runningcode Apr 2, 2026
6a0e416
fix(android): Remove mavenLocal from plugin repositories
runningcode Apr 2, 2026
e016669
fix(android): Add back Emerge snapshots job
runningcode Apr 2, 2026
adc49e5
fix(android): Replace Emerge snapshots with Paparazzi on Emerge
runningcode Apr 8, 2026
d32c041
fix(android): Keep emerge-snapshots-runtime for compilation
runningcode Apr 8, 2026
a86adbe
fix(android): Add snapshot tag and update app name to Hacker News
runningcode Apr 8, 2026
01a60c9
fix(android): Include private previews in snapshot tests
runningcode Apr 8, 2026
d13a077
fix(android): Update sentry-android-gradle-plugin to 6.4.0
runningcode Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 8 additions & 30 deletions .github/workflows/android_emerge_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,7 @@ on:
paths: [android/**]

jobs:
emerge:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./android

steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: "21"
distribution: "temurin"
- name: Setup Gradle build action
uses: gradle/actions/setup-gradle@v6
- name: Emerge snapshots
run: ./gradlew :app:bundleDebug :app:emergeUploadSnapshotBundleDebug
env:
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}

roborazzi:
paparazzi:
runs-on: ubuntu-latest

defaults:
Expand Down Expand Up @@ -62,19 +38,21 @@ jobs:
- name: Setup gems
run: gem install emerge

- name: Generate Roborazzi snapshots
run: ./gradlew :app:recordRoborazziDebug :app:sentryUploadSnapshotsRelease
- name: Generate Paparazzi snapshots
run: ./gradlew :app:recordPaparazziDebug :app:sentryUploadSnapshotsDebug
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}
SENTRY_DONT_IGNORE_DEBUG: true
Comment on lines +42 to +45
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The CI workflow relies on an undocumented environment variable SENTRY_DONT_IGNORE_DEBUG to upload debug snapshots, which are explicitly ignored by ignoredVariants in the Gradle configuration.
Severity: MEDIUM

Suggested Fix

Either confirm with the Sentry team that SENTRY_DONT_IGNORE_DEBUG is a supported feature for SAGP 6.4.0 or remove the debug variant from the ignoredVariants list in build.gradle.kts. Alternatively, if debug snapshots are not needed, remove the corresponding CI step.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/android_emerge_snapshots.yml#L42-L45

Potential issue: The CI workflow is configured to run `./gradlew ...
:app:sentryUploadSnapshotsDebug` to upload Paparazzi snapshots for the "debug" build
variant. However, the Sentry configuration in `build.gradle.kts` explicitly excludes
this variant via `ignoredVariants.set(listOf("debug"))`. The workflow attempts to bypass
this with the environment variable `SENTRY_DONT_IGNORE_DEBUG: true`, but this variable
is not documented for the Sentry Android Gradle Plugin (SAGP) version 6.4.0. This
creates a risk that the snapshot upload will be silently skipped, defeating the purpose
of the CI step.


- name: Upload snapshots
env:
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
run: |
emerge upload snapshots \
--name "HackerNews Roborazzi" \
--id "com.emerge.hackernews.roborazzi" \
--name "Hacker News" \
--id "com.emergetools.hackernews.debug" \
--repo-name "EmergeTools/hackernews" \
--tag "snapshot" \
--debug \
--client-library roborazzi \
--client-library paparazzi \
--project-root .
30 changes: 9 additions & 21 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import io.github.takahirom.roborazzi.RoborazziExtension
import io.sentry.android.gradle.tasks.SentryUploadSnapshotsTask
import org.gradle.api.tasks.testing.Test
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
Expand All @@ -10,7 +10,7 @@ plugins {
alias(libs.plugins.kotlin.ksp)
alias(libs.plugins.emerge)
alias(libs.plugins.sentry)
alias(libs.plugins.roborazzi)
alias(libs.plugins.paparazzi)
alias(libs.plugins.androidx.room)
}

Expand Down Expand Up @@ -56,6 +56,7 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("debug")
enableUnitTestCoverage = false
Copy link
Copy Markdown
Contributor Author

@runningcode runningcode Apr 2, 2026

Choose a reason for hiding this comment

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

This is just here in order to test a bug where users could disable unit tests for specific variants and the auto-wiring would fail trying to find a non-existent task.

}
create("playStoreRelease") {
initWith(getByName("release"))
Expand Down Expand Up @@ -99,10 +100,6 @@ ksp {
}

emerge {
snapshots {
tag.set("snapshot")
}

vcs {
gitHub {
// System.getenv override is for integration tests from the emerge-android repository
Expand All @@ -127,16 +124,13 @@ sentry {
updateSdkVariants.add("beta")
}

debug = true
}

afterEvaluate {
tasks.named<SentryUploadSnapshotsTask>("sentryUploadSnapshotsRelease") {
dependsOn(tasks.named("recordRoborazziDebug"))
snapshotsPath.set(
project.extensions.getByType<RoborazziExtension>().outputDir
)
snapshots {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Here's our API! Everything else is wired up automatically when the paparazzi plugin is detected.

enabled = true
includePrivatePreviews = true
theme = "android:Theme.Transluscent.NoTitleBar"
}

debug = true
}

dependencies {
Expand Down Expand Up @@ -171,18 +165,12 @@ dependencies {
ksp(libs.androidx.room.compiler)

testImplementation(libs.junit)
testImplementation(libs.robolectric)
testImplementation(libs.roborazzi)
testImplementation(libs.roborazzi.compose)
testImplementation(libs.roborazzi.rule)

androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
androidTestImplementation(libs.emerge.snapshots)

debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)

}
71 changes: 0 additions & 71 deletions android/app/src/test/kotlin/BookmarksScreenComposeTest.kt

This file was deleted.

37 changes: 0 additions & 37 deletions android/app/src/test/kotlin/StoryRowComposeTest.kt

This file was deleted.

2 changes: 1 addition & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.ksp) apply false
alias(libs.plugins.roborazzi) apply false
alias(libs.plugins.paparazzi) apply false
alias(libs.plugins.androidx.room) apply false
alias(libs.plugins.sentry) apply false
alias(libs.plugins.android.test) apply false
Expand Down
14 changes: 3 additions & 11 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ ksp = "2.3.6"
coreKtx = "1.18.0"
junit = "4.13.2"
junitVersion = "1.1.5" # This is to match Compose's version
robolectric = "4.16.1"
roborazzi = "1.59.0"
espressoCore = "3.5.0" # This is to match Compose's version
lifecycleRuntimeKtx = "2.10.0"
activityCompose = "1.13.0"
Expand All @@ -17,8 +15,7 @@ viewmodel = "2.10.0"
navigation = "2.9.7"
browser = "1.9.0"
emergePlugin = "4.4.0"
emergeSnapshots = "1.5.1"
sentry = "6.3.0"
sentry = "6.4.0"
shapes = "1.1.0"
datastore = "1.2.1"
room = "2.8.4"
Expand Down Expand Up @@ -61,14 +58,9 @@ retrofit-kotlinx-serialization = { group = "com.squareup.retrofit2", name = "con
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" }
jsoup = { group = "org.jsoup", name = "jsoup", version.ref = "jsoup" }

emerge-snapshots = { group = "com.emergetools.snapshots", name = "snapshots", version.ref = "emergeSnapshots" }
emerge-snapshots-runtime = { group = "com.emergetools.snapshots", name = "snapshots-runtime", version.ref = "emergeSnapshots" }
emerge-snapshots-runtime = { group = "com.emergetools.snapshots", name = "snapshots-runtime", version = "1.5.1" }

junit = { group = "junit", name = "junit", version.ref = "junit" }
robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" }
roborazzi = { group = "io.github.takahirom.roborazzi", name = "roborazzi", version.ref = "roborazzi" }
roborazzi-compose = { group = "io.github.takahirom.roborazzi", name = "roborazzi-compose", version.ref = "roborazzi" }
roborazzi-rule = { group = "io.github.takahirom.roborazzi", name = "roborazzi-junit-rule", version.ref = "roborazzi" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-ui-test-junit4-android = { group = "androidx.compose.ui", name = "ui-test-junit4-android", version.ref = "uiTestJunit4Android" }
Expand All @@ -82,8 +74,8 @@ compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
emerge = { id = "com.emergetools.android", version.ref = "emergePlugin" }
paparazzi = { id = "app.cash.paparazzi", version = "2.0.0-alpha04" }
sentry = { id = "io.sentry.android.gradle", version.ref = "sentry" }
roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" }
androidx-room = { id = "androidx.room", version.ref = "room" }
android-test = { id = "com.android.test", version.ref = "agp" }

Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

paparazzi requires Gradle 9.1+

networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 1 addition & 4 deletions android/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions android/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.