If you have a Gradle project in Idea IntelliJ IDE and you want to run a simple Java class with the main method just like a standalone java application without Gradle kicking off the build process (can take up a lot of time when you are having multi-project dependencies), follow the below steps,
- Go to Menu: View -> Tool Windows -> Gradle,
- Now, Click on the gear icon and select: Gradle Settings..
- Now under Build and run select Build and run using IntelliJ IDEA instead of Gradle (default)
Now when you will run your Java main method the Gradle build will not happen and your execution will be super quick!
More Posts related to Gradle,
- Run only a Single Unit Test using Gradle
- Run IntelliJ Java main method without Gradle build
- How to force re-download Gradle Dependencies
- How to Run Gradle Build Without Unit Test Cases
- Find installed Gradle version command
- Fix: Invalid Gradle JDK configuration found. Could not find the required JavaSDK
- Generate Project Dependency tree using Gradle Command
- Installing Gradle on macOS - Gradle Tutorial
- Gradle FAILURE: Build failed with an exception - Task not found in root project
- [Fix] ./gradlew: Permission denied
- Force Gradle to use specific Java JDK Version
- [fix] Deprecated gradle features were used in this build, making it incompatible with Gradle X.0
- Create a Gradle Java Project in VS Code
- Install Gradle VS Code for Java Projects
- Fix: Unsupported Java. Your build is currently configured to use Java 17.0.5 and Gradle 7.1.
- How to create Gradle Multi-Project in IntelliJ
- Fix: Spring Boot + IntelliJ + Gradle : Unsupported class file major version 64 Error
- Fix: Error: Could not find or load main class org.gradle.wrapper. GradleWrapperMain
- [fix] bash: gradlew: command not found
- [fix] Execution failed for task :core:compileJava - Could not find tools.jar
- Run Gradle Build without test cases
- How to add maven central repository in build.gradle
- Upgrade Gradle in Android Studio
- Task is ambiguous in root project gradle-examples. Candidates are: myTask1, myTask2
- Fix: Deprecated Gradle features were used in this build, making it incompatible with Gradle
More Posts:
- JUnit 4 Setup Example with IntelliJ + Maven - Java
- TextEdit save file with txt extension - MacOS
- Fix: ModuleNotFoundError: No module named pip - PIP
- 7 deadly java.lang.OutOfMemoryError in Java Programming - Java
- Remove Trailing zeros BigDecimal Java - Java
- cURL Option to show HTTP Response Status Code - cURL
- Find Hostname of Mac running on macOS Ventura 13 - MacOS
- How to upload and read csv file in Google Colab - Google