Optional snapshot root directory Gradle property
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"))
}
@TWiStErRob I added your suggestions in order to try to avoid issues with missing directories on the Gradle task.
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 (*)
Duplicate of https://github.com/cashapp/paparazzi/pull/517