diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ef18ade7b5a4d3f15d564956a564ed119d3af696..8a72bb851ef216c8ca5d00036422683cc0f9070d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,6 +33,7 @@ test:
   stage: test
   script:
     - ./gradlew --no-daemon -Djava.security.egd=file:/dev/urandom animalSnifferMain animalSnifferTest
+    - ./gradlew --no-daemon -Djava.security.egd=file:/dev/urandom :briar-headless:linuxJars
     - ./gradlew --no-daemon -Djava.security.egd=file:/dev/urandom compileOfficialDebugAndroidTestSources compileScreenshotDebugAndroidTestSources check
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
diff --git a/briar-headless/build.gradle b/briar-headless/build.gradle
index 0da727180451bb5a168e7f1489401f2df3720785..d95750adf7ee795419a3a0d351ed8b4b1589c33a 100644
--- a/briar-headless/build.gradle
+++ b/briar-headless/build.gradle
@@ -58,6 +58,7 @@ void jarFactory(Jar jarTask, jarArchitecture) {
 		configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
 	}
 			{
+				it.duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
 				String[] architectures = ["linux-aarch64", "linux-armhf", "linux-x86_64"]
 				for (String arch : architectures) {
 					if (arch != jarArchitecture) {
@@ -111,6 +112,10 @@ task x86LinuxJar(type: Jar) {
 	jarFactory(it, 'linux-x86_64')
 }
 
+task linuxJars {
+	dependsOn(aarch64LinuxJar, armhfLinuxJar, x86LinuxJar)
+}
+
 // At the moment for non-Android projects we need to explicitly mark the code generated by kapt
 // as 'generated source code' for correct highlighting and resolve in IDE.
 idea {