Shared Resource
Adds a Shared Resource project feature which allows limiting concurrently running builds using a shared resource. Note that a shared should be defined in project settings and then enabled in reguired build configurations.
Example. Defines an infinite Shared Resource with an unlimited number of read locks. This Shared Resources then used in build configuration
project {
// ...
features {
// ...
sharedResource {
id = "InfiniteResource_1"
name = "InfiniteResource"
resourceType = infinite()
}
}
buildType {
// ...
features {
// ...
sharedResources {
// ...
readLock("InfiniteResource")
}
}
}
}
Example. Defines a quoted Shared Resource. Quota is a maximum number of read locks that can be acquired on the resource.
project {
// Other Project settings ...
features {
// Other Project Features ...
sharedResource {
id = "Quoted_1"
name = "Quoted"
resourceType = quoted(5)
}
Content copied to clipboard }
}
Example. Defines a Shared Resource with custom values.
project {
// Other Project settings ...
features {
// Other Project Features ...
sharedResource {
id = "CustomSharedResource_1"
name = "Custom"
resourceType = customValues(
"value1",
"value2"
)
}
Content copied to clipboard }
}
Functions
Copies parameters of this object to the specified target
Creates an instance of this project feature via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Shared Resource type for resources with custom values
Shared Resource type for infinite resources
Shared Resource type for quoted resources
Validates this object and reports found errors to the provided consumer