What's new in this version: Improvements for plugin authors: - Finalize property value only when the value is queried - In previous Gradle releases, certain Gradle types, such as Property or ConfigurableFileCollection, provided a finalizeValue() method that eagerly calculated the final value for a property and prevented further changes - When a task starts running, Gradle automatically finalizes task properties of these types, so that the same value is seen by the task's actions and Gradle's build caching/up-to-date checks. This also avoids calculating the property value multiple times, which can sometimes be expensive. Plugins can also use finalizeValue() to finalize other properties, such as a property of a project extension, just prior to querying the value. - In this release, these types gain a new finalizeValueOnRead() method. This method is similar to finalizeValue(), except that the final value is calculated when the value is queried rather than immediately. Plugins can use this method when a property value may be expensive to calculate or when the value may not have been configured to ensure that all consumers of the property see the same, final, value from that point onwards. - Please see the user manual for more details
New managed property types: - Gradle 5.5 introduced the concept of a managed property for tasks and other types, where Gradle provides an implementation of the getter and setter for an abstract property defined on a task, project extension, or other custom type. This simplifies plugin implementations by removing a bunch of boilerplate. In this release, it is possible for a task or other custom type to have an abstract read-only property of type DomainObjectSet<T>. - Please see the user manual for more details.
New factory methods: The ObjectFactory type, which plugins and other custom types use to create instances of various useful types, has several new factory methods to create certain Gradle types that could only be created using internal APIs in previous releases: - The polymorphicDomainObjectContainer() method to create ExtensiblePolymorphicDomainObjectContainer<T> instances - The namedDomainObjectSet() method to create NamedDomainObjectSet<T> instances - The namedDomainObjectList() method to create NamedDomainObjectList<T> instances
Improvements for Gradle tooling providers: - Tooling API: TestLauncher can run specific Test task tests - The TestLauncher interface in the Tooling API could already launch tests by specifying the name of the test classes or methods; however, if there are multiple Test tasks, then all Test tasks would be executed. - For IDEs, developers usually want to execute only one task at a time. Gradle 6.1 introduces a new API to execute tests with specific Test task using the withTaskAndTestClasses() and withTaskAndTestMethods() methods.
Gradle 6.1 相關參考資料
Gradle 6.0-rc-1 Release Notes - Gradle User Manual
Java 6 and 7 can still be used for compilation and forked test execution. Just like Gradle 5.x, any supported version of Java can be used for compile or test.
https://docs.gradle.org
Gradle 6.1 Release Notes - Gradle User Manual
The Gradle team is excited to announce Gradle 6.1. This release supports a relocatable dependency cache, makes compilation order between Java, Groovy and ...
https://docs.gradle.org
Gradle 6.1-milestone-1 Release Notes - Gradle User Manual
The Gradle team is excited to announce Gradle 6.1-milestone-1. This release features 1, 2, ... n, and more. We would like to thank the following community ...
https://docs.gradle.org
Gradle 6.1-milestone-3 Release Notes - Gradle User Manual
The Gradle team is excited to announce Gradle 6.1-milestone-3. This release features 1, 2, ... n, and more. We would like to thank the following community ...
https://docs.gradle.org
Gradle 6.1-rc-1 Release Notes - Gradle User Manual
The Gradle team is excited to announce Gradle 6.1-rc-1. This release supports a relocatable dependency cache, makes compilation order between Java, ...
https://docs.gradle.org
Gradle 6.1-rc-2 Release Notes - Gradle User Manual
The Gradle team is excited to announce Gradle 6.1-rc-2. This release supports a relocatable dependency cache, makes compilation order between Java, ...
https://docs.gradle.org
Gradle 6.1-rc-3 Release Notes - Gradle User Manual
See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.1-rc-3. For Java, Groovy ...
https://docs.gradle.org
Installation - Gradle
Installation. The current Gradle release is 6.1. You can download binaries and view docs for all Gradle versions from the releases page. Prerequisites; Additional ...
https://gradle.org
Version 6.1 - Gradle User Manual
Run gradle wrapper --gradle-version 6.1 to update the project to 6.1. ... For Gradle 6, usage of the build scan plugin must be replaced with the Gradle Enterprise ...
https://docs.gradle.org
What's new in Gradle 6.0 - Gradle
New features in Gradle 6.0 since version 5.0. Plugin development, dependency management, Groovy incremental compilation.
https://gradle.org
|