-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Emojis even on Windows, when run via Eclipse and IntelliJ
- Loading branch information
Showing
4 changed files
with
44 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/net/neoforged/moddevgradle/internal/utils/IdeDetection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.neoforged.moddevgradle.internal.utils; | ||
|
||
/** | ||
* Utilities for trying to detect in which IDE Gradle is running. | ||
*/ | ||
public final class IdeDetection { | ||
private IdeDetection() { | ||
} | ||
|
||
/** | ||
* @return true if IntelliJ is running Gradle. This is true both during sync and execution of other Gradle tasks. | ||
*/ | ||
public static boolean isIntelliJ() { | ||
return Boolean.getBoolean("idea.active"); | ||
} | ||
|
||
/** | ||
* @return true if IntelliJ is syncing its project model with Gradle. | ||
*/ | ||
public static boolean isIntelliJSync() { | ||
return Boolean.getBoolean("idea.sync.active"); | ||
} | ||
|
||
/** | ||
* @return true if running under Eclipse (either Task execution or otherwise) | ||
*/ | ||
public static boolean isEclipse() { | ||
return System.getProperty("eclipse.application") != null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters