<commit_before>Gradle 2.6 is an exciting release with some shiny new features and many under the hood improvements.

The new support for the [Play](https://www.playframework.com) framework is exciting for many reasons.
If you build Play applications, you can now do so with Gradle and take advantage of all of Gradle's features and capabilities.
Play developers with more sophisticated dependency management or orchestration requirements in particular may find building
Play apps with Gradle to be particularly appealing.

The Play support is also an exciting development for non-Play users as well.
The development time reloading implementation leverages the continuous build capabilities in Gradle 2.5 to be “change aware”.
This mechanism will eventually be generally available to be used by integrations with other web frameworks or indeed any
long running “thing” being built.

The new “Gradle TestKit” provides an official mechanism for testing custom plugins which will greatly improve the Gradle plugin development experience.
This initial version of the TestKit focuses on executing real builds and asserting the result (i.e. functional testing).
Expect the TestKit to improve and expand over coming releases.

## New and noteworthy

Here are the new features introduced in this Gradle release.

### Play Framework Support (i)

Gradle can now build [Play](https://www.playframework.com/) applications for Play version 2.3.x and 2.4.x.
The new `play` plugin allows users to build, test, run and package Play applications.

It includes support for:

* Compiling Scala and Java controllers, tests, and model classes
* Processing routes files
* Processing Twirl templates
* Compiling CoffeeScript assets
* Minifying JavaScript assets
* Running tests with JUnitRunner
* Running applications in development mode with hot reloading
* Staging and creating Play distribution packages

Compatibility with Play 2.4.x is limited.
The `play` plugin does not work with a few new build-related features in 2.4.
Specifically, Gradle does not allow you to configure reverse routes or use "injected" routes generators.
Future releases will add support for these features as well as other features and versions of the Play Framework.

When running a Play application as part of a [continuous build](userguide/continuous_build.html), changes to the source are reflected in the running app automatically… no restart required.
This facilitates a fast development cycle.
The mechanism empowering this “hot reloading” will be made generally available to other types of applications and services in future versions of Gradle.

See the [User Guide](userguide/play_plugin.html) as well as the sample builds delivered with the Gradle distribution for more information on using the `play` plugin.

### Support for functionally testing Gradle plugins

This release brings the initial version of, the long awaited, official support for functionally testing Gradle plugins.
That is, being able to programmatically execute a contrived build leveraging a plugin under development as part of the plugin's build.
This functionality is being delivered as part of the new Gradle TestKit.

Many community members stepped up and filled the void created by the absence of a built in way to do this.
Notably, the folks at [Netflix](http://netflix.com/) contributed the very popular [Nebula Test](https://github.com/nebula-plugins/nebula-test) as part of their [Nebula Project](https://github.com/nebula-plugins).
The functionality provided by this and other similar projects will over time be rolled into the Gradle TestKit.

See the [new Gradle TestKit user guide chapter](userguide/test_kit.html) for more information.

### Tooling API TestLauncher (i)

This releases introduces a new [`TestLauncher`](javadoc/org/gradle/tooling/TestLauncher.html) interface for launching tests using the [Tooling API](userguide/embedding.html).

The following is an example of using the new API…

		ProjectConnection connection = GradleConnector.newConnector()
		   	.forProjectDirectory(new File("someFolder"))
		   	.connect();

		try {
		   //run tests
		   connection.newTestLauncher()
			 .withTests(descriptor1, descriptor2)
             .launcher.withJvmTestClasses("example.MyTest")
			 .addProgressListener(new MyTestListener(), EnumSet.of(OperationType.TEST))
		     .setStandardOutput(System.out)
		     .run();
		} finally {
		   connection.close();
	    }

See the Javadoc for [`ProjectConnection`](dsl/org.gradle.tooling.ProjectConnection.html) and [`TestLauncher`](dsl/org.gradle.tooling.TestLauncher.html) for more information on using the new TestLauncher API.

### Rule based model configuration reporting improvements (i)

Gradle 2.5 brings significant usability enhancements to the new [Rule based model configuration mechanism](userguide/new_model.html),
through better reporting.<commit_msg>Added code example for test-kit.<commit_after>Gradle 2.6 is an exciting release with some shiny new features and many under the hood improvements.

The new support for the [Play](https://www.playframework.com) framework is exciting for many reasons.
If you build Play applications, you can now do so with Gradle and take advantage of all of Gradle's features and capabilities.
Play developers with more sophisticated dependency management or orchestration requirements in particular may find building
Play apps with Gradle to be particularly appealing.

The Play support is also an exciting development for non-Play users as well.
The development time reloading implementation leverages the continuous build capabilities in Gradle 2.5 to be “change aware”.
This mechanism will eventually be generally available to be used by integrations with other web frameworks or indeed any
long running “thing” being built.

The new “Gradle TestKit” provides an official mechanism for testing custom plugins which will greatly improve the Gradle plugin development experience.
This initial version of the TestKit focuses on executing real builds and asserting the result (i.e. functional testing).
Expect the TestKit to improve and expand over coming releases.

## New and noteworthy

Here are the new features introduced in this Gradle release.

### Play Framework Support (i)

Gradle can now build [Play](https://www.playframework.com/) applications for Play version 2.3.x and 2.4.x.
The new `play` plugin allows users to build, test, run and package Play applications.

It includes support for:

* Compiling Scala and Java controllers, tests, and model classes
* Processing routes files
* Processing Twirl templates
* Compiling CoffeeScript assets
* Minifying JavaScript assets
* Running tests with JUnitRunner
* Running applications in development mode with hot reloading
* Staging and creating Play distribution packages

Compatibility with Play 2.4.x is limited.
The `play` plugin does not work with a few new build-related features in 2.4.
Specifically, Gradle does not allow you to configure reverse routes or use "injected" routes generators.
Future releases will add support for these features as well as other features and versions of the Play Framework.

When running a Play application as part of a [continuous build](userguide/continuous_build.html), changes to the source are reflected in the running app automatically… no restart required.
This facilitates a fast development cycle.
The mechanism empowering this “hot reloading” will be made generally available to other types of applications and services in future versions of Gradle.

See the [User Guide](userguide/play_plugin.html) as well as the sample builds delivered with the Gradle distribution for more information on using the `play` plugin.

### Support for functionally testing Gradle plugins

This release brings the initial version of, the long awaited, official support for functionally testing Gradle plugins.
That is, being able to programmatically execute a contrived build leveraging a plugin under development as part of the plugin's build.
This functionality is being delivered as part of the new Gradle TestKit.

Many community members stepped up and filled the void created by the absence of a built in way to do this.
Notably, the folks at [Netflix](http://netflix.com/) contributed the very popular [Nebula Test](https://github.com/nebula-plugins/nebula-test) as part of their [Nebula Project](https://github.com/nebula-plugins).
The functionality provided by this and other similar projects will over time be rolled into the Gradle TestKit.

The following example demonstrates the use of the TestKit API in a test method based on the test framework [Spock](https://code.google.com/p/spock/):

    def "hello world task prints hello world"() {
        given:
        buildFile << """
            task helloWorld {
                doLast {
                    println 'Hello world!'
                }
            }
        """

        when:
        def result = GradleRunner.create()
            .withProjectDir(testProjectDir.root)
            .withArguments('helloWorld')
            .build()

        then:
        result.standardOutput.contains('Hello world!')
        result.task(":helloWorld").outcome == SUCCESS
    }

See the [new Gradle TestKit user guide chapter](userguide/test_kit.html) for more information.

### Tooling API TestLauncher (i)

This releases introduces a new [`TestLauncher`](javadoc/org/gradle/tooling/TestLauncher.html) interface for launching tests using the [Tooling API](userguide/embedding.html).

The following is an example of using the new API…

		ProjectConnection connection = GradleConnector.newConnector()
		   	.forProjectDirectory(new File("someFolder"))
		   	.connect();

		try {
		   //run tests
		   connection.newTestLauncher()
			 .withTests(descriptor1, descriptor2)
             .launcher.withJvmTestClasses("example.MyTest")
			 .addProgressListener(new MyTestListener(), EnumSet.of(OperationType.TEST))
		     .setStandardOutput(System.out)
		     .run();
		} finally {
		   connection.close();
	    }

See the Javadoc for [`ProjectConnection`](dsl/org.gradle.tooling.ProjectConnection.html) and [`TestLauncher`](dsl/org.gradle.tooling.TestLauncher.html) for more information on using the new TestLauncher API.

### Rule based model configuration reporting improvements (i)

Gradle 2.5 brings significant usability enhancements to the new [Rule based model configuration mechanism](userguide/new_model.html),
through better reporting.
{'fraction_non_alphanumeric': 0.06067868098159509, 'fraction_numerical': 0.003067484662576687, 'mean_word_length': 4.402900051786639, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '358529', 'n_tokens_mistral': 2605, 'n_tokens_neox': 2468, 'n_words': 1260}