ProtoTasks

Available in a dev version: 0․11․0-grpc-186

How to configure

sealed interface ProtoTasks<ProtoTaskT : ProtoTask> : TaskCollection<ProtoTaskT> (source)

Represents a collection of ProtoTask tasks of a given type.

Allows for better filtering using additional method on top of Gradle's TaskCollection.

Example:

protoTasks.matchingSourceSet("main")
protoTasks.testTasks()
protoTasks
.testTasks()
.matching { ... }
.all { ... }

Properties

Link copied to clipboard
abstract override val asMap: SortedMap<String?, ProtoTaskT?>?
Link copied to clipboard

Returns a collection of all buf tasks registered in the project.

Link copied to clipboard
@get:Internal
abstract override val collectionSchema: NamedDomainObjectCollectionSchema?
Link copied to clipboard

Returns a collection of all buf generate tasks registered in the project.

Link copied to clipboard
abstract override val namer: Namer<ProtoTaskT?>?
Link copied to clipboard
abstract override val names: SortedSet<String?>?
Link copied to clipboard
abstract override val rules: List<Rule?>?
Link copied to clipboard
abstract val size: Int

Functions

Link copied to clipboard
abstract fun add(e: ProtoTaskT?): Boolean
Link copied to clipboard
abstract fun addAll(c: Collection<out ProtoTaskT?>): Boolean
Link copied to clipboard
abstract fun addAllLater(provider: Provider<out Iterable<ProtoTaskT?>?>?)
Link copied to clipboard
abstract fun addLater(provider: Provider<out ProtoTaskT?>?)
Link copied to clipboard
abstract fun addRule(rule: Rule?): Rule?
abstract fun addRule(description: String?, ruleAction: Closure<*>?): Rule?
abstract fun addRule(description: String?, ruleAction: Action<String?>?): Rule?
Link copied to clipboard
abstract fun all(action: Closure<*>?)
abstract fun all(action: Action<in ProtoTaskT?>?)
Link copied to clipboard
abstract fun androidTasks(predicate: (ProtoTaskT, ProtoTask.AndroidProperties) -> Boolean = { _, _ -> true }): ProtoTasks<ProtoTaskT>

Filters tasks by where ProtoTask.properties are of type ProtoTask.AndroidProperties.

Link copied to clipboard
Link copied to clipboard
abstract fun clear()
Link copied to clipboard
abstract fun configureEach(action: Action<in ProtoTaskT?>?)
Link copied to clipboard
abstract operator fun contains(element: ProtoTaskT?): Boolean
Link copied to clipboard
abstract fun containsAll(elements: Collection<ProtoTaskT?>): Boolean
Link copied to clipboard
abstract fun findAll(spec: Closure<*>?): Set<ProtoTaskT?>?
Link copied to clipboard
abstract fun findByName(name: String?): @Nullable ProtoTaskT?
Link copied to clipboard
abstract fun getAsMap(): SortedMap<String?, ProtoTaskT?>?
Link copied to clipboard
abstract fun getAt(name: String?): ProtoTaskT?
Link copied to clipboard
abstract fun getByName(name: String?): ProtoTaskT?
abstract fun getByName(name: String?, configureClosure: Closure<*>?): ProtoTaskT?
abstract fun getByName(name: String?, configureAction: Action<in ProtoTaskT?>?): ProtoTaskT?
Link copied to clipboard
abstract fun getNamer(): Namer<ProtoTaskT?>?
Link copied to clipboard
abstract fun isEmpty(): Boolean
Link copied to clipboard
abstract operator override fun iterator(): MutableIterator<ProtoTaskT?>
Link copied to clipboard
abstract fun matching(closure: Closure<*>?): TaskCollection<ProtoTaskT?>?
abstract fun matching(spec: Spec<in ProtoTaskT?>?): TaskCollection<ProtoTaskT?>?
Link copied to clipboard

Filters tasks by where ProtoTask.AndroidProperties.buildType matches the given buildType.

Link copied to clipboard

Filters tasks by where ProtoTask.AndroidProperties.flavors matches the given flavor.

Link copied to clipboard

Filters tasks by where ProtoTask.AndroidProperties.variant matches the given variant.

Link copied to clipboard
abstract fun matchingKotlinSourceSet(sourceSet: NamedDomainObjectProvider<KotlinSourceSet>): ProtoTasks<ProtoTaskT>
abstract fun matchingKotlinSourceSet(sourceSet: KotlinSourceSet): ProtoTasks<ProtoTaskT>

Filters tasks by a Kotlin source set.

Link copied to clipboard
abstract fun matchingSourceSet(sourceSetName: String): ProtoTasks<ProtoTaskT>

Filters tasks by source set name.

abstract fun matchingSourceSet(sourceSet: NamedDomainObjectProvider<SourceSet>): ProtoTasks<ProtoTaskT>
abstract fun matchingSourceSet(sourceSet: SourceSet): ProtoTasks<ProtoTaskT>

Filters tasks by a source set.

Link copied to clipboard

Filters tasks by type.

Link copied to clipboard

Filters tasks by type.

Link copied to clipboard
abstract fun named(name: String?): TaskProvider<ProtoTaskT?>?
abstract fun named(nameFilter: Spec<String?>?): TaskCollection<ProtoTaskT?>?
abstract fun <S : ProtoTaskT?> named(name: String?, type: Class<S?>?): TaskProvider<S?>?
abstract fun named(name: String?, configurationAction: Action<in ProtoTaskT?>?): TaskProvider<ProtoTaskT?>?
abstract fun <S : ProtoTaskT?> named(name: String?, type: Class<S?>?, configurationAction: Action<in S?>?): TaskProvider<S?>?
Link copied to clipboard

Filters tasks by where ProtoTask.Properties.isTest is false.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Filters tasks by where ProtoTask.Properties.isTest is true.

Link copied to clipboard
abstract fun whenObjectAdded(action: Closure<*>?)
abstract fun whenObjectAdded(action: Action<in ProtoTaskT?>?): Action<in ProtoTaskT?>?
Link copied to clipboard
abstract fun whenObjectRemoved(action: Closure<*>?)
abstract fun whenObjectRemoved(action: Action<in ProtoTaskT?>?): Action<in ProtoTaskT?>?
Link copied to clipboard
abstract fun whenTaskAdded(closure: Closure<*>?)
abstract fun whenTaskAdded(action: Action<in ProtoTaskT?>?): Action<in ProtoTaskT?>?
Link copied to clipboard
abstract fun <S : ProtoTaskT?> withType(type: Class<S?>?): TaskCollection<S?>?
abstract fun <S : ProtoTaskT?> withType(type: Class<S?>?, @DelegatesTo(genericTypeIndex = 0) configureClosure: Closure<*>?): DomainObjectCollection<S?>?
abstract fun <S : ProtoTaskT?> withType(type: Class<S?>?, configureAction: Action<in S?>?): DomainObjectCollection<S?>?