QuiltMC / quilt-mappings

Quilt's Mappings for Minecraft
Creative Commons Zero v1.0 Universal
96 stars 76 forks source link

Use gradle home cache for Minecraft libraries #492

Closed IotaBread closed 3 days ago

IotaBread commented 1 year ago

Storing the Minecraft libraries in the home cache would reduce wait times and disk usage greatly when managing two or more clones of the repository, instead of downloading them on each copy of QM.

supersaiyansubtlety commented 1 week ago

@lukebemish would putting @CachableTask on the task that downloads the libraries achieve basically the same result as putting them in the global .gradle cache?

lukebemish commented 1 week ago

CacheableTask only matters if build cache is on. If the goal is just not re-downloading anything, you shouldn't have to do anything -- normal old up-to-date checks should be enough. If the goal is sharing between different cloned copies of the repo -- use CacheableTask and enable build cache, yeah. Custom caching in the gradle home directory is very hard to do correctly in a way that doesn't lead to locking issues.

supersaiyansubtlety commented 1 week ago

Great, #645 already enabled build cache, I’ll just make sure the download libraries task works with CacheableTask.