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 5b25e3a
Show file tree
Hide file tree
Showing 2 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/e8a86c78d9ec7b064368e3d6acca6c59/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/e8a86c78d9ec7b064368e3d6acca6c59/transformed/external/res")
}

@Test
Expand Down

0 comments on commit 5b25e3a

Please sign in to comment.