@@ -276,20 +276,23 @@ void finish(Project project) {
276276 var metadataDir = this .getObjects ().directoryProperty ().value (cacheDir ).dir ("metadata" ).map (this .problems .ensureFileLocation ());
277277 var metadataZip = this .output .file (Util .artifactPath (dependency .getGroup (), dependency .getName (), dependency .getVersion (), "metadata" , "zip" ));
278278
279- try {
280- this .getFileSystemOperations ().copy (copy -> copy
281- .from (this .getArchiveOperations ().zipTree (metadataZip ))
282- .into (metadataDir )
283- );
284-
285- this .configs .set (this .getProviders ().provider (() -> JsonData .fromJson (
286- metadataDir .get ().file ("launcher/runs.json" ).getAsFile (),
287- new TypeToken <Map <String , RunConfig >>() { }
288- )));
289- } catch (Throwable ignored ) {
290- // we probably don't have metadata yet. common for fresh setups before first run.
291- // if there's actually a problem, we can throw it in SlimeLauncherExec.
292- }
279+ this .getFileSystemOperations ().copy (copy -> copy
280+ .from (this .getArchiveOperations ().zipTree (metadataZip ))
281+ .into (metadataDir )
282+ );
283+
284+ this .configs .set (this .getProviders ().provider (() -> {
285+ try {
286+ return JsonData .fromJson (
287+ metadataDir .get ().file ("launcher/runs.json" ).getAsFile (),
288+ new TypeToken <Map <String , RunConfig >>() { }
289+ );
290+ } catch (Throwable ignored ) {
291+ // we probably don't have metadata yet. common for fresh setups before first run.
292+ // if there's actually a problem, we can throw it in SlimeLauncherExec.
293+ return null ;
294+ }
295+ }));
293296
294297 this .runs .forEach (options -> SlimeLauncherExec .register (project , sourceSet , options , this .configs .getOrElse (Map .of ()), dependency , metadataZip ));
295298 }
0 commit comments