Schnittstelle RegularFileProperty
- Alle Superschnittstellen:
FileSystemLocationProperty<RegularFile>,HasConfigurableValue,Property<RegularFile>,Provider<RegularFile>,SupportsConvention
You can create a RegularFileProperty using ObjectFactory.fileProperty().
Note: This interface is not intended for implementation by build script or plugin authors.
- Seit:
- 4.3
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungconvention(RegularFile value) Specifies the value to use as the convention (default value) for this property.convention(Provider<? extends RegularFile> provider) Specifies the provider to be used to query the convention (default value) for this property.fileProvider(Provider<File> provider) Sets the location of this file, using aFileinstance.value(RegularFile value) Sets the value of the property to the given value, replacing whatever value the property already had.value(Provider<? extends RegularFile> provider) Sets the property to have the same value as the given provider, replacing whatever value the property already had.Von Schnittstelle geerbte Methoden org.gradle.api.file.FileSystemLocationProperty
getAsFile, getLocationOnly, setVon Schnittstelle geerbte Methoden org.gradle.api.provider.HasConfigurableValue
disallowChanges, disallowUnsafeRead, finalizeValueOnReadVon Schnittstelle geerbte Methoden org.gradle.api.provider.Property
finalizeValue, set, set, unset, unsetConvention
-
Methodendetails
-
value
Sets the value of the property to the given value, replacing whatever value the property already had. This is the same asProperty.set(Object)but returns this property to allow method chaining.This method can also be used to discard the value of the property, by passing it
null. When the value is discarded (or has never been set in the first place), the convention (default value) for this property, if specified, will be used to provide the value instead.- Angegeben von:
valuein SchnittstelleProperty<RegularFile>- Parameter:
value- The value, can be null.- Gibt zurück:
- this
-
value
Sets the property to have the same value as the given provider, replacing whatever value the property already had. This property will track the value of the provider and query its value each time the value of the property is queried. When the provider has no value, this property will also have no value. This is the same asProperty.set(Provider)but returns this property to allow method chaining.This method can NOT be used to discard the value of the property. Specifying a
nullprovider will result in anIllegalArgumentExceptionbeing thrown. When the provider has no value, this property will also have no value - regardless of whether or not a convention has been set.When the given provider represents a task output, this property will also carry the task dependency information from the provider.
- Angegeben von:
valuein SchnittstelleProperty<RegularFile>- Parameter:
provider- The provider whose value to use.- Gibt zurück:
- this
-
fileValue
Sets the location of this file, using aFileinstance.Fileinstances with relative paths are resolved relative to the project directory of the project that owns this property instance.This method is the same as
FileSystemLocationProperty.set(File)but allows method chaining.- Angegeben von:
fileValuein SchnittstelleFileSystemLocationProperty<RegularFile>- Gibt zurück:
- this
-
fileProvider
Sets the location of this file, using aFileProviderinstance.Fileinstances with relative paths are resolved relative to the project directory of the project that owns this property instance.- Angegeben von:
fileProviderin SchnittstelleFileSystemLocationProperty<RegularFile>- Gibt zurück:
- this
-
convention
Specifies the value to use as the convention (default value) for this property. If the convention is set and no explicit value or value provider has been specified, then the convention will be returned as the value of the property (when queried).This method can be used to specify that the property does not have a default value, by passing it
null.- Angegeben von:
conventionin SchnittstelleProperty<RegularFile>- Parameter:
value- The convention value, ornullif the property should have no default value.- Gibt zurück:
- this
-
convention
Specifies the provider to be used to query the convention (default value) for this property. If a convention provider has been set and no explicit value or value provider has been specified, then the convention provider's value will be returned as the value of the property (when queried).The property's convention tracks the convention provider. Whenever the convention's actual value is needed, the convention provider will be queried anew.
This method can't be used to specify that a property does not have a default value. Passing in a
nullprovider will result in anIllegalArgumentExceptionbeing thrown. When the provider doesn't have a value, then the property will behave as if it wouldn't have a convention specified.- Angegeben von:
conventionin SchnittstelleProperty<RegularFile>- Parameter:
provider- The provider of the property's convention value, can't be null.- Gibt zurück:
- this
-