@@ -288,23 +288,28 @@ void finish(Project project) {
288288 var metadataDir = this .getObjects ().directoryProperty ().value (cacheDir ).dir ("metadata" ).map (this .problems .ensureFileLocation ());
289289 var metadataZip = this .output .file (Util .artifactPath (group , dependency .getName (), dependency .getVersion (), "metadata" , "zip" ));
290290
291- this .getFileSystemOperations ().copy (copy -> copy
292- .from (this .getArchiveOperations ().zipTree (metadataZip ))
293- .into (metadataDir )
294- );
295-
296- this .configs .set (this .getProviders ().provider (() -> {
297- try {
298- return JsonData .fromJson (
299- metadataDir .get ().file ("launcher/runs.json" ).getAsFile (),
300- new TypeToken <Map <String , RunConfig >>() { }
301- );
302- } catch (Throwable ignored ) {
303- // we probably don't have metadata yet. common for fresh setups before first run.
304- // if there's actually a problem, we can throw it in SlimeLauncherExec.
305- return null ;
306- }
307- }));
291+ try {
292+ this .getFileSystemOperations ().copy (copy -> copy
293+ .from (this .getArchiveOperations ().zipTree (metadataZip ))
294+ .into (metadataDir )
295+ );
296+
297+ this .configs .set (this .getProviders ().provider (() -> {
298+ try {
299+ return JsonData .fromJson (
300+ metadataDir .get ().file ("launcher/runs.json" ).getAsFile (),
301+ new TypeToken <Map <String , RunConfig >>() { }
302+ );
303+ } catch (Throwable ignored ) {
304+ // we probably don't have metadata yet. common for fresh setups before first run.
305+ // if there's actually a problem, we can throw it in SlimeLauncherExec.
306+ return null ;
307+ }
308+ }));
309+ } catch (Throwable ignored ) {
310+ // we probably don't have metadata yet. common for fresh setups before first run.
311+ // if there's actually a problem, we can throw it in SlimeLauncherExec.
312+ }
308313
309314 this .runs .forEach (options -> SlimeLauncherExec .register (project , sourceSet , options , this .configs .getOrElse (Map .of ()), dependency , metadataZip , size == 1 ));
310315 }
0 commit comments