If you want to run the gradle build offline, you can add --offline argument with the build command,
Example:# gradle --offline build
By doing so gradle Gradle will not connect to the network to download dependencies (jars), If a dependency is not found, Gradle build will fail.
code2care@mac Desktop % gradle -offline build
> Task :app:compileJava UP-TO-DATE
> Task :app:processResources NO-SOURCE
> Task :app:classes UP-TO-DATE
> Task :app:jar UP-TO-DATE
> Task :app:startScripts UP-TO-DATE
> Task :app:distTar UP-TO-DATE
> Task :app:distZip UP-TO-DATE
> Task :app:assemble UP-TO-DATE
> Task :app:compileTestJava UP-TO-DATE
> Task :app:processTestResources NO-SOURCE
> Task :app:testClasses UP-TO-DATE
> Task :app:test UP-TO-DATE
> Task :app:check UP-TO-DATE
> Task :app:build UP-TO-DATE
BUILD SUCCESSFUL in 726ms
7 actionable tasks: 7 up-to-date

Gradle build Offline
More Posts related to Gradle,
- Task is ambiguous in root project gradle-examples. Candidates are: myTask1, myTask2
- Find installed Gradle version command
- Run IntelliJ Java main method without Gradle build
- Install Gradle VS Code for Java Projects
- Fix: Invalid Gradle JDK configuration found. Could not find the required JavaSDK
- Create a Gradle Java Project in VS Code
- Generate Project Dependency tree using Gradle Command
- How to Clear Gradle Cache on Mac
- How to create Gradle Multi-Project in IntelliJ
- How to run Gradle build in offline mode
- Installing Gradle on macOS - Gradle Tutorial
- Gradle FAILURE: Build failed with an exception - Task not found in root project
- Adding Jackson dependency to Java Gradle Project
More Posts:
- How to remove username from Mac Menu Bar? - MacOS
- Add Line Number before each line in Notepad++ using Column Editor - NotepadPlusPlus
- [Android Studio] How to locate code for activity_main.xml - Android-Studio
- JBoss stuck loading JBAS015899: AS 7.1.1.Final Brontes starting - Java
- Find Mac version using terminal command - MacOS
- SharePoint Server 2016 Preview installation error - This Product Key isn't a valid Microsoft Office 2016 Product Key. Check that you've entered it correctly. - SharePoint
- How to save webpage as pdf using macOS Safari - MacOS
- How to know the version of Teams installed - Teams