Although it is not setting a property in gradle.properties
, you could set the offline property without having to remember it on each call by using an Init Script. The init script can be placed in a location that affects all your builds or just one, just like the user or project specific gradle.properties
. See the documentation for the valid paths to put it.
Put this line in the init script:
startParameter.offline=true