Skip to content

Commit

Permalink
Snapshot output directory should be a task input not output
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodbx committed May 15, 2023
1 parent 5a97ceb commit 7c8bd69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,11 @@ class PaparazziPlugin : Plugin<Project> {
test.inputs.files(nativePlatformFileCollection)
.withPropertyName("paparazzi.nativePlatform")
.withPathSensitivity(PathSensitivity.NONE)
test.inputs.files(snapshotOutputDir)
.withPropertyName("paparazzi.snapshot.output.dir")
.withPathSensitivity(PathSensitivity.RELATIVE)

test.outputs.dir(reportOutputDir)
test.outputs.dir(snapshotOutputDir)

@Suppress("ObjectLiteralToLambda")
// why not a lambda? See: https://docs.gradle.org/7.2/userguide/validation_problems.html#implementation_unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ class PaparazziPluginTest {
assertThat(resourceFileContents[4]).isEqualTo("intermediates/assets/debug")
assertThat(resourceFileContents[5]).isEqualTo("app.cash.paparazzi.plugin.test")
assertThat(resourceFileContents[6]).isEqualTo("src/main/res,src/debug/res")
assertThat(resourceFileContents[7]).isEqualTo("caches/transforms-3/6e46d558be9195722df23f983e56c9d0/transformed/external/res")
assertThat(resourceFileContents[7]).isEqualTo("caches/transforms-3/0a93740b0d39bc4cff875b0e543c2c2e/transformed/external/res")
}

@Test
Expand All @@ -785,7 +785,7 @@ class PaparazziPluginTest {
assertThat(resourceFileContents[4]).isEqualTo("intermediates/assets/debug")
assertThat(resourceFileContents[5]).isEqualTo("app.cash.paparazzi.plugin.test")
assertThat(resourceFileContents[6]).isEqualTo("src/main/res,src/debug/res")
assertThat(resourceFileContents[7]).isEqualTo("caches/transforms-3/6e46d558be9195722df23f983e56c9d0/transformed/external/res")
assertThat(resourceFileContents[7]).isEqualTo("caches/transforms-3/0a93740b0d39bc4cff875b0e543c2c2e/transformed/external/res")
}

@Test
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c8bd69

Please sign in to comment.