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,
- Find installed Gradle version command
- Gradle FAILURE: Build failed with an exception - Task not found in root project
- How to run Gradle build in offline mode
- Task is ambiguous in root project gradle-examples. Candidates are: myTask1, myTask2
- Run IntelliJ Java main method without Gradle build
- How to create Gradle Multi-Project in IntelliJ
- Installing Gradle on macOS - Gradle Tutorial
More Posts:
- How to Configure Eclipse keymap in IntelliJ IDE - Android-Studio
- Copy all .vcf Mobile Contacts files into one .vcf - HowTos
- Formatting Double in Java [Examples] - Java
- [Fix] Modern authentication failed here, but youll still be able to sign in. Your status code is 4c7 - Microsoft Teams - Teams
- How to turn on channel notifications for Microsoft Teams - Teams