From a7cf2bca00293fa1737a9b85d597844946013288 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= <sebastian@mobanisto.de>
Date: Wed, 1 Feb 2023 17:48:07 +0100
Subject: [PATCH] Make screenshot task visible in Gradle task list and add to
 HACKING guide

---
 HACKING.md                     | 9 +++++++++
 briar-desktop/build.gradle.kts | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/HACKING.md b/HACKING.md
index fa3ba6b903..2681d89467 100644
--- a/HACKING.md
+++ b/HACKING.md
@@ -61,6 +61,15 @@ quicker. In `RendezvousConstants`, change
 to something lower such as
 `long POLLING_INTERVAL_MS = SECONDS.toMillis(10);`.
 
+## Creating screenshots automatically
+
+You can create screenshots automatically from the command line by calling this:
+
+    ./gradlew cleanAutomatedScreenshots automatedScreenshots
+
+It's also possible to run that from the IDE. Navigate to the `ScreenshotTest`
+file and run any test from there.
+
 ## Updating Copyright headers
 
 In IntelliJ, right click the root of the project tree and select
diff --git a/briar-desktop/build.gradle.kts b/briar-desktop/build.gradle.kts
index aa93711934..094b167067 100644
--- a/briar-desktop/build.gradle.kts
+++ b/briar-desktop/build.gradle.kts
@@ -153,6 +153,8 @@ configurations["automatedScreenshotsImplementation"].extendsFrom(configurations.
 configurations["automatedScreenshotsRuntimeOnly"].extendsFrom(configurations.testRuntimeOnly.get())
 
 task<Test>("automatedScreenshots") {
+    group = "documentation"
+    description = "Creates screenshots of the app automatically."
     testClassesDirs = sourceSets["automatedScreenshots"].output.classesDirs
     classpath = sourceSets["automatedScreenshots"].runtimeClasspath
 }
-- 
GitLab