Class GradleDependency

java.lang.Object
io.spring.initializr.generator.buildsystem.Dependency
io.spring.initializr.generator.buildsystem.gradle.GradleDependency

public class GradleDependency extends Dependency
Gradle-specific Dependency.
Author:
Stephane Nicoll
  • Constructor Details

  • Method Details

    • withCoordinates

      public static GradleDependency.Builder withCoordinates(String groupId, String artifactId)
      Initialize a new dependency GradleDependency.Builder with the specified coordinates.
      Parameters:
      groupId - the group ID of the dependency
      artifactId - the artifact ID of the dependency
      Returns:
      a new builder
    • from

      public static GradleDependency.Builder from(Dependency dependency)
      Initialize a new dependency GradleDependency.Builder with the state of the specified Dependency.
      Parameters:
      dependency - the dependency to use to initialize the builder
      Returns:
      a new builder initialized with the same state as the dependency
    • getConfiguration

      public String getConfiguration()
      Return the configuration to use for the dependency. If not set, a default configuration is inferred from the scope of the dependency.
      Returns:
      the custom configuration name to use or null