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
- How to create Gradle Multi-Project in IntelliJ
- Find installed Gradle version command
- Adding Jackson dependency to Java Gradle Project
- Gradle FAILURE: Build failed with an exception - Task not found in root project
- Create a Gradle Java Project in VS Code
- Generate Project Dependency tree using Gradle Command
- Fix: Spring Boot + IntelliJ + Gradle : Unsupported class file major version 64 Error
- Fix: Unsupported Java. Your build is currently configured to use Java 17.0.5 and Gradle 7.1.
- Run IntelliJ Java main method without Gradle build
- Fix: Deprecated Gradle features were used in this build, making it incompatible with Gradle
- Installing Gradle on macOS - Gradle Tutorial
- Fix: Invalid Gradle JDK configuration found. Could not find the required JavaSDK
- How to Clear Gradle Cache on Mac
- How to run Gradle build in offline mode
- Install Gradle VS Code for Java Projects
- How to add maven central repository in build.gradle
More Posts:
- How to use SCP Command to Copy Directory - Linux
- How to enable missing SharePoint Site Assets, Site Pages library App - SharePoint
- How to Undo-Revert Sent Email in Google Gmail - Google
- AutoSave button not working on Office on Mac (Word, Excel or Powerpoint) - MacOS
- List of Java JDK Versions till Year 2023 with LTS Support Included - Java
- Display (Show) bookmarks bar Safari - HowTos
- [fix] openssl No such file or directory error C++ - Ubuntu
- How to run .bat file on Mac - MacOS