Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Provide accessors for elements of specific Gradle collections such as tasks #879

Closed
bamboo opened this issue May 16, 2018 · 3 comments
Closed

Comments

@bamboo
Copy link
Member

bamboo commented May 16, 2018

In order to enable discoverability of such elements in the IDE and provide a DSL closer to Groovy.

For instance, to configure the test task one would be able to write:

plugins {
  java
}

tasks {
  test {
    useJUnitPlatform()
  }
}
@StefMa
Copy link
Contributor

StefMa commented May 16, 2018 via email

@eskatos
Copy link
Member

eskatos commented Jun 20, 2018

In order to be able to implement this we would need the Gradle API to provide a schema for containers declaring the name and public type of each element. This would be similar to the schema of the extensions container provided by: https://github.com/gradle/gradle/blob/cf6d0508131b0ff9d6354b3d46f83bcf5ca8f8a4/subprojects/core-api/src/main/java/org/gradle/api/plugins/ExtensionContainer.java#L157-L163
For performance reasons, realizing that schema should not trigger the realization of the container elements. Names and types are known at element registration time so it shouldn't be a problem.

@eskatos
Copy link
Member

eskatos commented Aug 1, 2018

First step, lazy-friendly, is in progress at gradle/gradle#6142

#222 will get in the way of distinguishing containers, we'd need a specific container scope type for tasks {}

@eskatos eskatos modified the milestones: 1.1.0, 1.0-RC7 Oct 1, 2018
@eskatos eskatos closed this as completed Oct 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants