Schnittstelle SharedModelDefaults


@Incubating @ServiceScope(org.gradle.internal.service.scopes.Scope.Build.class) public interface SharedModelDefaults
Shared model defaults for configuring software types. Defaults apply initial values to the model objects of software types. When a software type plugin is applied to a project, the model object for the software type will be pre-configured with the values set in the default.
Seit:
8.10
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    <T> void
    add(String name, Class<T> publicType, Action<? super T> configureAction)
    Adds a model default for the software type specified by the given name.
    Provides access to the project layout when default configurations are evaluated in the context of specific projects.
  • Methodendetails

    • getLayout

      ProjectLayout getLayout()
      Provides access to the project layout when default configurations are evaluated in the context of specific projects.

      Meant to be used only inside the defaults{} block in settings scripts. If used in other contexts, behaviour is undefined.

      Seit:
      8.14
    • add

      <T> void add(String name, Class<T> publicType, Action<? super T> configureAction)
      Adds a model default for the software type specified by the given name.
      Parameter:
      name - the name of the software type
      publicType - the public type of the software type
      configureAction - the action to configure the software type
      Seit:
      8.10