Class BuildSystemUtils

java.lang.Object
org.springframework.modulith.docs.util.BuildSystemUtils

public class BuildSystemUtils extends Object
Utilities to detect the build system used.
Since:
1.3
Author:
Oliver Drotbohm, Dennis Wittkötter
  • Constructor Details

    • BuildSystemUtils

      public BuildSystemUtils()
  • Method Details

    • getTarget

      public static String getTarget(String path)
      Returns a path to a resource in the build target folder.
      Parameters:
      path - must not be null or empty.
      Returns:
      will never be null.
    • getTargetResource

      public static Optional<Resource> getTargetResource(String path)
      Returns a Resource in the build target folder.
      Parameters:
      path - must not be null or empty.
      Returns:
      will never be null.
    • getTestTarget

      @Deprecated(since="1.4.4, 2.0", forRemoval=true) public static String getTestTarget()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1.4.4, 2.0. Use pointsToTestTarget(String) instead.
      Returns the path to the folder containing test classes.
      Returns:
      will never be null.
    • pointsToTestTarget

      public static boolean pointsToTestTarget(String path)
      Returns whether the given path points to a resource in the test target folder.
      Parameters:
      path - must not be null or empty.
    • getResourceTarget

      public static String getResourceTarget()
      Returns the path to the target folder for resources.
      Returns:
      will never be null.
      Since:
      1.4
    • pointsToMavenTestTarget

      static boolean pointsToMavenTestTarget(String path)
    • pointsToGradleTestTarget

      static boolean pointsToGradleTestTarget(String path)