Record Class ApplyProjectPlugin
- All Implemented Interfaces:
Serializable, org.gradle.api.IsolatedAction<org.gradle.api.Project>
ProjectVersionPlugin to each of them.
Settings mode calculates nothing of its own. Making it project mode applied everywhere is what makes the level a build chooses unable to change the answer it gets - there is one code path, not two kept in agreement.
A named record rather than a lambda, because isolated projects constrains what this action may close over and a lambda's captures are invisible: they are whatever happens to be in scope at the point it is written. This closes over nothing at all - not even the catalogue, which each project obtains for itself from a build service - so there is nothing to review and nothing to serialize. In particular it cannot capture a plugin instance, which a lambda calling an instance method silently would.
IsolatedAction extends Serializable, which is Gradle stating that requirement in
the type system.
Public, and not by preference. Gradle 9.0 reconstructs a record by looking up its canonical
constructor as a public member, so a package-private record fails to deserialize with
NoSuchMethodException and every project configuration dies. Later versions look the
constructor up as declared and do not care. The floor decides, so this is public.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aApplyProjectPluginrecord class. -
Method Summary
-
Constructor Details
-
ApplyProjectPlugin
public ApplyProjectPlugin()Creates an instance of aApplyProjectPluginrecord class.
-
-
Method Details
-
execute
public void execute(org.gradle.api.Project project) - Specified by:
executein interfaceorg.gradle.api.IsolatedAction<org.gradle.api.Project>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal.
-