In this tutorial, we will take a look at how to create a Multi-Project in IntelliJ,
Step 1: Open IntelliJ IDE
Step 2: Menu: File -> New -> Project...
Make sure you choose Gradle Java Project, we will create a project with the name multi-proj-demo
Step 3: Menu: File -> New -> Module...
Again make sure you select Gradle and Java Project, we will call this module as utils,
Thats it, now you have a muti-project Gradle Java Project,
setting.gradlerootProject.name = 'multi-proj-demo'
include 'utils'
build.gradle
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
test {
useJUnitPlatform()
}
Build
> Task :compileJava NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :utils:compileJava
> Task :utils:processResources NO-SOURCE
> Task :utils:classes
> Task :utils:compileTestJava NO-SOURCE
> Task :utils:processTestResources NO-SOURCE
> Task :utils:testClasses UP-TO-DATE
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:
- Create a large dummy file using Mac OS X terminal command - Mac-OS-X
- How to Change the Default Rows and Columns Size of Windows Terminal - Windows
- Solution: AWS S3 CLI Command AccessDenied - S3
- How to Set Background Wallpaper on macOS 13 Ventura - MacOS
- Delete blank lines in a file using Notepad++ - NotepadPlusPlus
- Spring Boot: Setting up JDBCTemplate with MySQL Tutorial - Java
- Fix: npm vs code eacces permission denied unlink /usr/local/bin/code - JavaScript
- FCM Messages! Testing Notifcation from Microsoft to investigate this problem [Microsoft Teams] - Microsoft