Class Project

java.lang.Object
io.helidon.build.devloop.Project

public class Project extends Object
A continuous build project. New instances must have been successfully built.
  • Method Details

    • builder

      public static Project.Builder builder()
      Returns a new builder.
      Returns:
      The builder.
    • name

      public String name()
      Returns the project name.
      Returns:
      The name.
    • buildType

      public BuildType buildType()
      Returns the build type.
      Returns:
      The type.
    • root

      public ProjectDirectory root()
      Returns the root directory.
      Returns:
      The root.
    • buildFiles

      public BuildFiles buildFiles()
      Returns the build files (e.g. pom.xml).
      Returns:
      The files.
    • classpath

      public List<File> classpath()
      Returns the project classpath.
      Returns:
      The classpath.
    • compilerFlags

      public List<String> compilerFlags()
      Returns the compiler flags.
      Returns:
      The flags.
    • dependencies

      public List<BuildFile> dependencies()
      Returns a list of all external dependencies.
      Returns:
      The paths.
    • components

      public List<BuildComponent> components()
      Returns all components.
      Returns:
      The components.
    • mainClassName

      public String mainClassName()
      Returns the main class name.
      Returns:
      The name.
    • buildFilesChangedTime

      public Optional<FileTime> buildFilesChangedTime()
      Returns the most recent modification time if any build file has an updated modification time.
      Returns:
      The time, if changed.
    • sourceChanges

      public List<BuildRoot.Changes> sourceChanges()
      Returns a list of source changes since the last update, if any.
      Returns:
      The changes.
    • sourceChangesSince

      public Optional<FileTime> sourceChangesSince(FileTime time)
      Checks whether any source file has a modified time more recent than the given time.
      Parameters:
      time - The time to check against. If null, uses FileUtils.fromMillis(0).
      Returns:
      The time, if changed.
    • binaryFilesChangedTime

      public Optional<FileTime> binaryFilesChangedTime()
      Returns the most recent modification time if any build file has an updated modification time.
      Returns:
      The time, if changed.
    • isBuildUpToDate

      public boolean isBuildUpToDate()
      Returns whether all binaries are newer than all sources and no sources have changed.
      Returns:
      true if up to date, false if not.
    • update

      public void update(boolean updateDependencies)
      Update the project time stamps.
      Parameters:
      updateDependencies - true if dependencies should be updated.
    • incrementalBuild

      protected void incrementalBuild(List<BuildRoot.Changes> changes, PrintStream stdOut, PrintStream stdErr) throws Exception
      Perform an incremental build for the given changes.
      Parameters:
      changes - The changes.
      stdOut - A printer for stdout.
      stdErr - A printer for stderr.
      Throws:
      Exception - on error.