Class IdeConfigurer

java.lang.Object
net.kyori.blossom.internal.IdeConfigurer

public final class IdeConfigurer extends Object
Configures different IDEs when applicable.
  • Method Details

    • isIdeaImport

      public static boolean isIdeaImport()
      Get whether Gradle is being invoked through IntelliJ IDEA.

      This can be through a project import, or a task execution.

      Returns:
      whether this is an IntelliJ-based invocation
    • isEclipseImport

      public static boolean isEclipseImport()
      Get whether this Gradle invocation is from an Eclipse project import.
      Returns:
      whether an eclipse import is ongoing
    • apply

      public static void apply(@NotNull @NotNull org.gradle.api.Project project, @NotNull @NotNull IdeConfigurer.IdeImportAction toPerform)
      Applies the specified configuration action to configure IDE projects.

      This does not apply the IDEs' respective plugins, but will perform actions when those plugins are applied.

      Parameters:
      project - project to apply to
      toPerform - the actions to perform