Class IdeConfigurer


  • public final class IdeConfigurer
    extends java.lang.Object
    Configures different IDEs when applicable
    • Constructor Summary

      Constructors 
      Constructor Description
      IdeConfigurer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void apply​(org.gradle.api.Project project, IdeConfigurer.IdeImportAction toPerform)
      Applies the specified configuration action to configure IDE projects.
      static boolean isEclipseImport()
      Get whether this Gradle invocation is from an Eclipse project import.
      static boolean isIdeaImport()
      Get whether Gradle is being invoked through IntelliJ IDEA.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdeConfigurer

        public IdeConfigurer()
    • Method Detail

      • 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​(org.gradle.api.Project project,
                                 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