<commit_before>## New and noteworthy

Here are the new features introduced in this Gradle release.

<!--
### Example new and noteworthy
-->

## Promoted features

Promoted features are features that were incubating in previous versions of Gradle but are now supported and subject to backwards compatibility.
See the User guide section on the “[Feature Lifecycle](userguide/feature_lifecycle.html)” for more information.

The following are the features that have been promoted in this Gradle release.

<!--
### Example promoted
-->
<commit_msg>Add the notes for the artifact resolution API feature  that was destined for 1.12 but bumped to 2.0.<commit_after>## New and noteworthy

Here are the new features introduced in this Gradle release.

### New API for artifact resolution (i)

Gradle 1.12 introduces a new, incubating API for resolving component artifacts. With this addition, Gradle now offers separate dedicated APIs for resolving
components and artifacts. (Component resolution is mainly concerned with computing the dependency graph, whereas artifact resolution is
mainly concerned with locating and downloading artifacts.) The entry points to the component and artifact resolution APIs are `configuration.incoming` and
`dependencies.createArtifactResolutionQuery()`, respectively.

TODO: This API examples are out of date. Add new tested samples to the Javadoc or Userguide and link instead

Here is an example usage of the new API:

    def query = dependencies.createArtifactResolutionQuery()
        .forComponent("org.springframework", "spring-core", "3.2.3.RELEASE")
        .forArtifacts(JvmLibrary)

    def result = query.execute() // artifacts are downloaded at this point

    for (component in result.components) {
        assert component instanceof JvmLibrary
        println component.id
        component.sourceArtifacts.each { println it.file }
        component.javadocArtifacts.each { println it.file }
    }

    assert result.unresolvedComponents.isEmpty()

Artifact resolution can be limited to selected artifact types:

    def query = dependencies.createArtifactResolutionQuery()
        .forComponent("org.springframework", "spring-core", "3.2.3.RELEASE")
        .forArtifacts(JvmLibrary, JvmLibrarySourcesArtifact)

    def result = query.execute()

    for (component in result.components) {
        assert !component.sourceArtifacts.isEmpty()
        assert component.javadocArtifacts.isEmpty()
    }

Artifacts for many components can be resolved together:

    def query = dependencies.createArtifactResolutionQuery()
        .forComponents(setOfComponentIds)
        .forArtifacts(JvmLibrary)

So far, only one component type (`JvmLibrary`) is available, but others will follow, also for platforms other than the JVM.

<!--
### Example new and noteworthy
-->

## Promoted features

Promoted features are features that were incubating in previous versions of Gradle but are now supported and subject to backwards compatibility.
See the User guide section on the “[Feature Lifecycle](userguide/feature_lifecycle.html)” for more information.

The following are the features that have been promoted in this Gradle release.

<!--
### Example promoted
-->

{'fraction_non_alphanumeric': 0.06860902255639098, 'fraction_numerical': 0.0043859649122807015, 'mean_word_length': 4.183441558441558, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6602561', 'n_tokens_mistral': 813, 'n_tokens_neox': 763, 'n_words': 344}