From a20a5387a75f1983168ac68f47311a7167673c45 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Sat, 1 Feb 2025 14:34:19 +0100 Subject: [PATCH] chore: bundle deps in jar --- app/build.gradle | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 446faea..0067423 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -36,9 +36,16 @@ application { mainClass = 'gui.Main' } -tasks.named('test') { - // Use JUnit Platform for unit tests. - useJUnitPlatform() +// Add libraries into the final jar +jar { + archiveBaseName = rootProject.getName() + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + manifest { + attributes "Main-Class": application.mainClass + } + from { + configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } } run {