From a94d5f0239f768ce9ebbd9bb6cb3b2a294f4f94a Mon Sep 17 00:00:00 2001 From: shartte Date: Tue, 19 Dec 2023 09:49:58 +0100 Subject: [PATCH] Adds a shadow jar for the CLI and makes it fully executable (#23) * Adds a shadow jar for the CLI and makes it fully executable. * Used fixed JUnit version (via BOM) Remove java plugin + build shadow jar alongside normal build. --- build.gradle | 9 +++++---- unpick-cli/build.gradle | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 1f7410b..629ab48 100644 --- a/build.gradle +++ b/build.gradle @@ -25,10 +25,11 @@ allprojects { implementation 'org.ow2.asm:asm-util:9.6' // Use JUnit test framework - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.+' - testImplementation 'org.junit.jupiter:junit-jupiter-params:5.+' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.+' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.+' + testImplementation platform('org.junit:junit-bom:5.10.1') + testImplementation 'org.junit.jupiter:junit-jupiter-api' + testImplementation 'org.junit.jupiter:junit-jupiter-params' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } test { diff --git a/unpick-cli/build.gradle b/unpick-cli/build.gradle index 99ff819..93370c0 100644 --- a/unpick-cli/build.gradle +++ b/unpick-cli/build.gradle @@ -1,4 +1,18 @@ +plugins { + id 'com.github.johnrengelman.shadow' version '8.1.1' +} + dependencies { implementation project(':') implementation project(':unpick-format-utils') -} \ No newline at end of file +} + +jar { + manifest { + attributes 'Main-Class': 'daomephsta.unpick.cli.Main' + } +} + +assemble.configure { + dependsOn shadowJar +}