A snap that wants to write to ~/.gradle

I am snapping gradle, it seems to mostly work except the default location to which it downloads dependencies while building a project are put on ~/.gradle

Can that snap be given special permission to be able to write to ~/.gradle or will that snap have to be a classic snap ?

Can’t you patch gradle to use a different directory?

does it literally hardcode “~/” ? typically $HOME points to $SNAP_USER_DATA (~/snap/gradle/current), where the app has full allowance to create, read and write “dot directories”. gradle should really respect $HOME here …

it being java, it probably uses a getpwent equivalent rather than looking at $HOME.