From 4a297c27abdf63591d360597b620f3efdbac807b Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Tue, 30 Jul 2024 22:49:18 +0100 Subject: [PATCH] Put classpath in main jar manifest We encounter issues launching nouveau on Windows as it cAnnoT haNdle LoNG LiNEs iN ScripTs. Instead we list the dependency jars in the manifest and only need to include one jar in the classpath. --- nouveau/build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nouveau/build.gradle b/nouveau/build.gradle index 2095a71c2f..bcca23b3f6 100644 --- a/nouveau/build.gradle +++ b/nouveau/build.gradle @@ -49,7 +49,11 @@ java { } jar { - manifest.attributes('Multi-Release': 'true') + manifest { + attributes( + 'Multi-Release': 'true', + "Class-Path": configurations.runtimeClasspath.collect { it.getName() }.join(' ')) + } } spotless { @@ -82,3 +86,8 @@ tasks.withType(AbstractArchiveTask) { preserveFileTimestamps = false reproducibleFileOrder = true } + + +startScripts { + classpath = files(jar.archiveFileName) +}