Interface Project

All Known Subinterfaces:
FileProject, JavaProject, KotlinProject

public interface Project
The base Project interface which defines the clean build target and provides functionality to track source file dependencies, control the build process and handle command-line options.
See Also:
  • Method Details

    • currently

      default <T> Supplier<T> currently(T val)
      Wraps a value in a non-serializable Supplier. A method can be made non-cacheable by returning an object of this type.
      Type Parameters:
      T - the type of value
      Parameters:
      val - an arbitrary value
      Returns:
      a supplier containing val
    • context

      default BuildContext context()
      Gets the current build context
      Returns:
      the current build context
    • clean

      default void clean()
      The clean build target. Empties the result cache and deletes the cache file, if it exists
    • run

      static <T> void run(Class<T> t, Consumer<T> fn, String[] args)
      Type Parameters:
      T - the project type
      Parameters:
      t - the project interface reference
      fn - a consumer that calls the default build method
      args - command line arguments