Class IdeDetection
java.lang.Object
net.neoforged.moddevgradle.internal.utils.IdeDetection
Utilities for trying to detect in which IDE Gradle is running.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable FilegetIntellijProjectDir(org.gradle.api.Project project) Try to find the IntelliJ project directory that belongs to this Gradle project.static booleanstatic booleanstatic boolean
-
Method Details
-
isIntelliJ
public static boolean isIntelliJ()- Returns:
- true if IntelliJ is running Gradle. This is true both during sync and execution of other Gradle tasks.
-
isIntelliJSync
public static boolean isIntelliJSync()- Returns:
- true if IntelliJ is syncing its project model with Gradle.
-
isEclipse
public static boolean isEclipse()- Returns:
- true if running under Eclipse (either Task execution or otherwise)
-
getIntellijProjectDir
Try to find the IntelliJ project directory that belongs to this Gradle project. There are scenarios where this is impossible, since IntelliJ allows adding Gradle builds to IntelliJ projects in a completely different directory.
-