Skip to content

Commit b390b07

Browse files
runningcodeclaude
andcommitted
chore: Apply spotless formatting to remaining files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 973f7d0 commit b390b07

2 files changed

Lines changed: 28 additions & 24 deletions

File tree

plugin-build/src/main/kotlin/io/sentry/android/gradle/AndroidComponentsConfig.kt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -473,17 +473,18 @@ private fun ApplicationVariant.configureSnapshotsTasks(
473473
val variant = AndroidVariant74(this)
474474
val sentryProps = getPropertiesFilePath(project, variant)
475475

476-
val uploadTask = SentryUploadSnapshotsTask.register(
477-
project = project,
478-
extension = extension,
479-
sentryTelemetryProvider = sentryTelemetryProvider,
480-
cliExecutable = cliExecutable,
481-
sentryOrgOverride = sentryOrg,
482-
sentryProjectOverride = sentryProject,
483-
applicationId = applicationId,
484-
sentryProperties = sentryProps,
485-
taskSuffix = name.capitalized,
486-
)
476+
val uploadTask =
477+
SentryUploadSnapshotsTask.register(
478+
project = project,
479+
extension = extension,
480+
sentryTelemetryProvider = sentryTelemetryProvider,
481+
cliExecutable = cliExecutable,
482+
sentryOrgOverride = sentryOrg,
483+
sentryProjectOverride = sentryProject,
484+
applicationId = applicationId,
485+
sentryProperties = sentryProps,
486+
taskSuffix = name.capitalized,
487+
)
487488
uploadTask.configure { task ->
488489
task.snapshotsPath.set(project.layout.buildDirectory.dir("sentry-snapshots/${name}/images"))
489490
}

plugin-build/src/main/kotlin/io/sentry/android/gradle/snapshot/SentrySnapshotPlugin.kt

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,25 @@ class SentrySnapshotPlugin : Plugin<Project> {
3333

3434
androidComponents.onVariants { variant ->
3535
val variantName = variant.name
36-
val sentrySnapshotRootDir = project.layout.buildDirectory.dir("sentry-snapshots/$variantName")
36+
val sentrySnapshotRootDir =
37+
project.layout.buildDirectory.dir("sentry-snapshots/$variantName")
3738
val testTaskName = "test${variantName.replaceFirstChar { it.uppercase() }}UnitTest"
38-
project.tasks.matching { it.name == testTaskName }.configureEach { task ->
39-
val testTask = task as Test
40-
testTask.systemProperty(
41-
"sentry.snapshot.output",
42-
sentrySnapshotRootDir.get().asFile.absolutePath,
43-
)
44-
testTask.systemProperty("paparazzi.test.record", "true")
45-
testTask.doFirst {
46-
val imagesDir = File(sentrySnapshotRootDir.get().asFile, "images")
47-
if (imagesDir.exists()) {
48-
imagesDir.deleteRecursively()
39+
project.tasks
40+
.matching { it.name == testTaskName }
41+
.configureEach { task ->
42+
val testTask = task as Test
43+
testTask.systemProperty(
44+
"sentry.snapshot.output",
45+
sentrySnapshotRootDir.get().asFile.absolutePath,
46+
)
47+
testTask.systemProperty("paparazzi.test.record", "true")
48+
testTask.doFirst {
49+
val imagesDir = File(sentrySnapshotRootDir.get().asFile, "images")
50+
if (imagesDir.exists()) {
51+
imagesDir.deleteRecursively()
52+
}
4953
}
5054
}
51-
}
5255

5356
val generateTask = GenerateSnapshotTestsTask.register(project, extension, android, variant)
5457
if (AgpVersions.isAGP90(AgpVersions.CURRENT)) {

0 commit comments

Comments
 (0)