paparazzi icon indicating copy to clipboard operation
paparazzi copied to clipboard

Optional snapshot root directory Gradle property

Open JavierSegoviaCordoba opened this issue 3 years ago • 2 comments

Original PR: https://github.com/cashapp/paparazzi/pull/517

Thank you @brenpearson as he did all the work.


Allows the consumer of the Paparazzi library to specify where they want the snapshots to be saved. This includes creating a gradle plugin extension for Paparazzi with this property in it, we can add other configurable properties to this extension in future.

This can be set as shown in the consumer's gradle file

paparazzi {
    snapshotRootDirectory.set(file("where/I/want/the/snapshots"))
}

JavierSegoviaCordoba avatar Mar 15 '23 14:03 JavierSegoviaCordoba

@TWiStErRob I added your suggestions in order to try to avoid issues with missing directories on the Gradle task.

JavierSegoviaCordoba avatar Mar 15 '23 15:03 JavierSegoviaCordoba

Looks like with some of the changes we are creating a circular dependency

    * What went wrong:
    Circular dependency between the following tasks:
    :compileDebugUnitTestJavaWithJavac
    +--- :compileDebugUnitTestKotlin
    |    \--- :preparePaparazziDebugResources
    |         \--- :testDebugUnitTest
    |              +--- :compileDebugUnitTestJavaWithJavac (*)
    |              \--- :compileDebugUnitTestKotlin (*)
    \--- :preparePaparazziDebugResources (*)

JavierSegoviaCordoba avatar Mar 15 '23 15:03 JavierSegoviaCordoba

Duplicate of https://github.com/cashapp/paparazzi/pull/517

jrodbx avatar Nov 07 '24 09:11 jrodbx