I had to dig for this a long time in the 2019.2 version. This option has moved in the UI. It is now in the toolbar of the gradle tools:

see JetBrains documentation at https://www.jetbrains.com/help/idea/jetgradle-tool-window.html#offline
I had to dig for this a long time in the 2019.2 version. This option has moved in the UI. It is now in the toolbar of the gradle tools:

see JetBrains documentation at https://www.jetbrains.com/help/idea/jetgradle-tool-window.html#offline