Gradle Changelog

What's new in Gradle 8.7 RC 1

Feb 23, 2024
  • New features and usability improvements:
  • Support for building projects with Java 22
  • Build cache improvements
  • Lazy configuration improvements
  • Error and warning reporting improvements
  • Configuration cache improvements
  • Kotlin DSL improvements
  • Other improvements
  • Documentation improvements
  • Fixed issues:
  • [#28114] - `buildSrc` JAR is not before its dependencies in the classpath anymore
  • [#28009] - Fixing puntuactions
  • [#27976] - Fixing puntuactions for better interpration
  • [#27966] - Gradle 8.6 contains `ion-java-1.0.2.jar` flagged for CVE-2024-21634
  • [#27965] - More muted colours for code blocks in dark mode please
  • [#27956] - 8.6: Running debuggable integration tests with configuration cache enabled fails on lambda serialization
  • [#27949] - Remove `OperationListener`-based problem transformers
  • [#27891] - Ignored keys are not sorted in the verification metadata file
  • [#27871] - "Failed to map supported failure" message when using JUnit `Assertions.fail`
  • [#27854] - Missing information on how to refer to dependencies in version catalog
  • [#27824] - Add release notes about Groovy script compilation using build cache
  • [#27802] - Mysterious jdk-toolchains plugin
  • [#27799] - Support Dependency Constraints in Strongly Typed Dependency Block
  • [#27778] - jgit CVE-2023-4759
  • [#27770] - Discuss what should be the java compilation problem severity when -Werror flag is used
  • [#27755] - Use Failure types on TAPI problem events
  • [#27705] - Use execution engine to perform build script compilation and instrumentation
  • [#27684] - Unclear and partly wrong (?) description of task dependencies
  • [#27656] - Bump KGP version used in Gradle to at least 1.9.21
  • [#27640] - Provide a final name for `ConfigurableValue.withActualValue()`
  • [#27604] - Gradle only partly extracts zip files with extra field that is larger than 8024 bytes
  • [#27590] - Clarification regarding reserved alias names in version catalogs
  • [#27569] - 8.6-rc-1: maven-publish is incompatible with Project Isolation
  • [#27523] - Unresolved directive in `userguide.pdf`
  • [#27521] - Substitution rules for the build script classpath are not applied after the initial resolution
  • [#27515] - Create dedicated `smoke-ide-test` subproject
  • [#27499] - Extract AS provisioning logic from `performance-test-plugin`
  • [#27498] - Prefer versions use a different sorting algorithm than other version comparisons
  • [#27475] - Deprecate legacy/invalid URI parsing in Project#file / Project#uri
  • [#27399] - Create an ArchUnit test to find services which don't have `@ServiceScope` applied
  • [#27380] - Allow convention mapping to work with multi-valued lazy property types
  • [#27328] - Use artifact transforms to instrument TestKit injected classpath
  • [#27262] - Maven publishing retries PUT but doesn't retry metadata download
  • [#27198] - Make `KotlinDslScriptsModelSpec` a crossVersionTest
  • [#27170] - Turn back logging in BuildOperationBasedProblemEmitter
  • [#27108] - Cryptic error message when instantiating type that fails to implement interface methods
  • [#27043] - Version Catalog: Emit multiple problems for multiple toml errors
  • [#26912] - Gradle 8.4: `clean` fails on "java.io.IOException: Unable to delete directory..."
  • [#26596] - Easy to fall into trap: Using a Property<ByteArray> in a custom gradle type
  • [#26569] - Incubating `InclusiveRepositoryContentDescriptor.includeGroupAndSubgroups` breaks dependency resolution
  • [#26539] - Support deleting windows files with read-only attribute
  • [#26529] - Java compiler warnings and errors should be exposed via the problems API
  • [#26479] - Upgrade Dokka/Dokkatoo to version 1.9, when fixed
  • [#26286] - Add @since annotation to Kotlin DSL reference
  • [#26245] - Support compiling and testing Java 22
  • [#26201] - Gradle not noticing file changes when input files is behind symlink in some cases
  • [#25759] - Add support for 'threadpoolfactoryclass' parameter of TestNG
  • [#25752] - Undeletable files on Windows when `ArchiveOperations.zipTree` is used inside a TransformAction
  • [#25516] - Ad hoc task properties should be implicitly finalized when the configuration cache is used
  • [#25403] - Add DeprecationLogger nagging for ClientModule dependencies
  • [#25226] - `org.gradle.api.artifacts.VersionCatalog#findLibrary` is inneficient
  • [#24854] - Remove Gradle-internal top of the configuration cache problem stacktrace
  • [#24609] - Variant selection failure report: Better error message for GRADLE_PLUGIN_API_VERSION_ATTRIBUTE
  • [#24232] - Nag for deprecation of registering conventions
  • [#23030] - Option to suppress 'dependencies-without-versions' validation error in GenerateModuleMetadata task
  • [#21903] - Add deprecation logging to org.gradle.util.CollectionUtils.stringize(collection)
  • [#21255] - Incremental Java compiler fails with compile errors due to incorrect classpath, while full compilation works
  • [#20964] - Turn off "what went wrong" message
  • [#20935] - Show full explanation for duplicate failures with zipTree
  • [#19028] - Replace `com.jcraft:jsch` with `com.github.mwiede:jsch` so ed25519 SSH keys can be used
  • [#18352] - Append operators for MapProperty, ListProperty, and SetProperty are discarding convention values
  • [#16535] - JavaExec task with System.in as the input stream is not compatible with configuration cache
  • [#15826] - BuildServiceRegistry#registerIfAbsent method without configuration action
  • [#15803] - gcc native tool chain detection does not work with german locale on linux
  • [#28095] - Update upgrade guide for plugin convention registration
  • [#15726] - Dark mode for documentation

New in Gradle 7.6.4 (Feb 5, 2024)

  • This release addresses security vulnerabilities:
  • Apache Ant insecure temporary file vulnerability
  • Guava insecure temporary directory
  • Ivy Improper Restriction of XML External Entity Reference and related Gradle issue #24795

New in Gradle 8.6 (Feb 2, 2024)

  • Fixed issues
  • 86 issues have been fixed in Gradle 8.6.
  • [#27524] - Broken Link to Gradle Module Metadata Specification
  • [#27520] - The --java-version option doesn't prevent "gradle init" from entering interactive mode, as expected
  • [#27487] - Windows virtual memory monitoring captures the wrong value for free memory
  • [#27460] - Labels for task validation problems API reports are incomplete
  • [#27448] - Using transforms for classpath instrumentation makes the performance->configuration page fail in build scans with configure on demand
  • [#27416] - Rethink `ProblemReporter#report` interfaces
  • [#27405] - Navigating to Gradle sources in IDE broken since 8.5
  • [#27358] - Fix worker API compatibility issue - send an exception from a worker in an integration test
  • [#27357] - Fix serialization of `Class` for reused projects
  • [#27354] - Expose common categories via Problems API
  • [#27353] - Make Problems API more permissive
  • [#27351] - Document Problems API in user guide
  • [#27311] - Quick Doc link fixes in Running and Authoring Gradle Builds
  • [#27306] - gradle init produces settings.gradle file with wrong multi-project build documentation link
  • [#27283] - Link to gradle module metadata specification is broken on https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html
  • [#27241] - DefaultProblem should not hold a reference to OperationIdentifier
  • [#27237] - WorkerProblemSerializer should use Encoder/Decoder for serialisation
  • [#27213] - Fix message ordering when reporting problems from a worker
  • [#27205] - JavaDoc of `BuildFeature` claims you can inject it but not how
  • [#27193] - Remove unused variables of Problems interface
  • [#27182] - Clean up Problems API inconsistencies
  • [#27180] - Implement problem aggregation
  • [#27136] - Fix typo in JavaDoc
  • [#27125] - Delete ProblemDescriptor.getJson
  • [#27124] - Make it easier for third party plugins to define problem documentation URLs
  • [#27123] - Define separate API to report third-party plugin problems
  • [#27122] - Outdated JavaDoc on `ProblemBuilderSpec`
  • [#27055] - Allow users to provide the encryption key used by the Gradle Configuration Cache
  • [#27032] - Workers should be able to use the Problems API
  • [#26997] - Investigate Problem deduplication and write a spec
  • [#26990] - Adding a new public type and a method fails binary compatibility check
  • [#26978] - Update documentation around Verification failures
  • [#26965] - Benchmark concurrent codec solutions
  • [#26957] - Additional data attached to Problems should be able to handle new data types
  • [#26954] - Problems API should be usable from workers
  • [#26948] - Refine ProblemEvent type in Tooling API
  • [#26922] - "JaCoCo Report Aggregation Plugin" fails when configuration cache is enabled (gradle plugin project)
  • [#26899] - Build tree path is not available for all models exposing the Task type
  • [#26887] - Allow problem transformers to edit problems
  • [#26825] - Deadlock in dependency resolution
  • [#26790] - Deadlock in parallel model building with AGP
  • [#26774] - Introduce `NamedDomainObjectCollection.named(Spec<String>)`
  • [#26757] - Poor directory snapshotting performance for source directory sets with many entries
  • [#26694] - Use Immutable artifact transforms for non-incremental project transforms
  • [#26678] - ivy repository URL String parsing broken with 8.3
  • [#26628] - Disable project implicit configuration on cross-project access
  • [#26623] - 8.4 – Test task that filters tests by JUnit 5 tag annotation emits deprecation
  • [#26614] - Make IDEA model builder Isolated Projects compatible
  • [#26415] - Gradle batch file does not print JAVA_HOME errors on standard error
  • [#26412] - Investigate PersistentCache logic and what we can reuse for immutable workspace and sandboxing
  • [#26396] - Separate cc instrumentation and property upgrades when instrumenting bytecode
  • [#26377] - Capabilities information differs in dependency graph vs artifact collection
  • [#26319] - Bad error message when using the wrong Java version
  • [#26289] - `--write-verification-metadata --dry-run` missing dependencies in android project with buildSrc
  • [#26219] - Gradle init should not provide the package default based on the project name
  • [#26179] - --write-verification-metadata failure with includedBuild
  • [#26163] - Support providers to define capabilities of consumable configurations
  • [#26037] - Instrument plugins with artifact transform
  • [#25686] - Tests for `kotlin-dsl-plugin` and `kotlin-dsl-integ-tests` with embedded runner fails when upgrading AbstractCompile properties
  • [#25560] - ValueSource without result is always recognized as changed by configuration cache
  • [#25326] - Measure the impact of Project Isolation on a large purely Java project
  • [#25270] - TomlCatalogFileParser should use BufferedInputStream
  • [#25235] - Gradle build fails with configuration cache enabled with warnings
  • [#24624] - Non-interactive mode for `gradle init`
  • [#24341] - --exclude-task fails on complex included build structure with settings plugin starting with 7.6
  • [#20932] - Prevent or help to diagnose accidental recursion to itself in a property
  • [#18080] - Cancelling `gradle init` leaves leftovers lying around
  • [#3919] - Error:Cannot find snapshot for id: -4123461672748341163
  • [#27639] - Artifact transform instrumentation ignores directories
  • [#27635] - Gradle 8.6-rc-1 can't build Spring Boot 2.x based projects
  • [#27356] - Final javadoc review for Problems API
  • [#27352] - Review and extend test coverage for Problems API
  • [#27350] - Contribute Problems API project to samples index
  • [#27349] - Document Problems API in release notes
  • [#27289] - Performance Tests lead to 404
  • [#26953] - Implement public Problems API
  • [#27722] - Remove update() from public API in 8.6
  • [#27709] - Change in tar permission handling with 8.6-rc-1 and 8.6-rc-2
  • [#27703] - Docs Dark theme does not work as expected on Windows/Chrome
  • [#27695] - Android Studio project import memory regression in 8.6-rc1
  • [#27679] - Cannot mutate ... after it has been finalized in testsuite with kotlin plugin in Gradle 8.6-rc
  • [#27617] - When viewing docs in dark-mode, 'Tips' boxes have a light-mode background
  • [#27847] - The AsciiDoc preprocessor directives is unresolved in user guide (pdf)
  • [#27844] - Temporary workspace cannot be moved to immutable location when files left open on Windows
  • [#27763] - Low contrast on links with code-styling in dark mode
  • [#27739] - Broken Groovy compilation result in NotSerializableException in IDE

New in Gradle 8.6 RC 4 (Feb 1, 2024)

  • New features and usability improvements:
  • Configuration cache improvements:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing it for subsequent builds. This feature can significantly improve build performance.
  • Custom encryption key:
  • The configuration cache is encrypted to mitigate the risk of accidental exposure of sensitive data. By default, Gradle automatically creates and manages the key, storing it in a keystore in the Gradle User Home directory. While convenient, this may be inappropriate in some environments.
  • You may now provide Gradle with the key used to encrypt cached configuration data via the GRADLE_ENCRYPTION_KEY environment variable.
  • More details can be found in the configuration cache section of the Gradle User Manual.
  • Build init improvements:
  • The build init plugin allows users to easily create a new Gradle build, supporting various types of projects.
  • Simpler source package handling:
  • You no longer have to answer an interactive question about the source package. Instead, a default value of org.example will be used. You can override it using an existing option --package flag for the init task. Additionally, you can set the default value by adding a new org.gradle.buildinit.source.package property in gradle.properties in the Gradle User Home.
  • Names of the generated convention plugins now start with buildlogic instead of the package name, making them shorter and cleaner.
  • Generating without interactive questions:
  • A new --use-defaults option applies default values for options that were not explicitly configured. It also ensures the init command can be completed without interactive user input. This is handy in shell scripts to ensure they do not accidentally hang.
  • Simpler assignment syntax in Kotlin DSL;
  • Projects generated with Kotlin DSL scripts now use simple property assignment syntax with the = operator.
  • Build authoring improvements:
  • Gradle provides rich APIs for plugin authors and build engineers to develop custom build logic. The task configuration avoidance API avoids configuring tasks if they are not needed for the execution of a build.
  • Lazy name-based filtering of tasks:
  • Previously, filtering tasks by name required using the matching method using the following pattern
  • The problem was that calling matching triggered the creation of all tasks, even when the task was not part of the build execution.
  • Using named will not cause the registered tasks to be eagerly created.
  • This new method is available on all Gradle containers that extend NamedDomainObjectSet.
  • Allow Providers to be used with dependency capabilities:
  • Gradle supports declaring capabilities for components to better manage dependencies by allowing Gradle to detect and resolve conflicts between dependencies at build time.
  • Error and warning reporting improvements:
  • Gradle provides a rich set of error and warning messages to help you understand and resolve problems in your build.
  • Clearer suggested actions in case of dependency locking errors:
  • This release improves error messages in dependency locking by separating the error from the possible action to fix the issue in the console output. Errors from invalid lock file format or missing lock state when strict mode is enabled are now displayed
  • Better error reporting of circular references in providers:
  • Before this release, evaluating a provider with a cycle in its value assignment would lead to a StackOverflowError. With this release, circular references are properly detected and reported.
  • IDE Integration improvements:
  • Gradle is integrated into many IDEs using the Tooling API.
  • The following improvements are for IDE integrators. They will become available to end-users in future IDE releases once IDE vendors adopt them.
  • Problems API:
  • The new Problems API has entered a public incubation phase and is ready for integration.
  • The Problems API enables plugin and build engineers to report rich, structured information about problems that may occur during a build. This information can be received by Tooling API clients, such as IDEs or CI systems, and can be represented in a way that best suits the platform. Tooling API clients are encouraged to begin integrating with the API and provide additional feedback.
  • Integrating the Problems API:
  • The integration process for established Tooling API clients should be straightforward. Problems can be received using the same ProgressListener interface used for other progress messages. The new template showcases a self-functioning Tooling API client that can receive and present problems. Additionally, a new sample has been introduced to demonstrate various use cases of the API.
  • Fixed issues:
  • 86 issues have been fixed in Gradle 8.6.
  • [#27524] - Broken Link to Gradle Module Metadata Specification
  • [#27520] - The --java-version option doesn't prevent "gradle init" from entering interactive mode, as expected
  • [#27487] - Windows virtual memory monitoring captures the wrong value for free memory
  • [#27460] - Labels for task validation problems API reports are incomplete
  • [#27448] - Using transforms for classpath instrumentation makes the performance->configuration page fail in build scans with configure on demand
  • [#27416] - Rethink `ProblemReporter#report` interfaces
  • [#27405] - Navigating to Gradle sources in IDE broken since 8.5
  • [#27358] - Fix worker API compatibility issue - send an exception from a worker in an integration test
  • [#27357] - Fix serialization of `Class` for reused projects
  • [#27354] - Expose common categories via Problems API
  • [#27353] - Make Problems API more permissive
  • [#27351] - Document Problems API in user guide
  • [#27311] - Quick Doc link fixes in Running and Authoring Gradle Builds
  • [#27306] - gradle init produces settings.gradle file with wrong multi-project build documentation link
  • [#27283] - Link to gradle module metadata specification is broken on https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html
  • [#27241] - DefaultProblem should not hold a reference to OperationIdentifier
  • [#27237] - WorkerProblemSerializer should use Encoder/Decoder for serialisation
  • [#27213] - Fix message ordering when reporting problems from a worker
  • [#27205] - JavaDoc of `BuildFeature` claims you can inject it but not how
  • [#27193] - Remove unused variables of Problems interface
  • [#27182] - Clean up Problems API inconsistencies
  • [#27180] - Implement problem aggregation
  • [#27136] - Fix typo in JavaDoc
  • [#27125] - Delete ProblemDescriptor.getJson
  • [#27124] - Make it easier for third party plugins to define problem documentation URLs
  • [#27123] - Define separate API to report third-party plugin problems
  • [#27122] - Outdated JavaDoc on `ProblemBuilderSpec`
  • [#27055] - Allow users to provide the encryption key used by the Gradle Configuration Cache
  • [#27032] - Workers should be able to use the Problems API
  • [#26997] - Investigate Problem deduplication and write a spec
  • [#26990] - Adding a new public type and a method fails binary compatibility check
  • [#26978] - Update documentation around Verification failures
  • [#26965] - Benchmark concurrent codec solutions
  • [#26957] - Additional data attached to Problems should be able to handle new data types
  • [#26954] - Problems API should be usable from workers
  • [#26948] - Refine ProblemEvent type in Tooling API
  • [#26922] - "JaCoCo Report Aggregation Plugin" fails when configuration cache is enabled (gradle plugin project)
  • [#26899] - Build tree path is not available for all models exposing the Task type
  • [#26887] - Allow problem transformers to edit problems
  • [#26825] - Deadlock in dependency resolution
  • [#26790] - Deadlock in parallel model building with AGP
  • [#26774] - Introduce `NamedDomainObjectCollection.named(Spec<String>)`
  • [#26757] - Poor directory snapshotting performance for source directory sets with many entries
  • [#26694] - Use Immutable artifact transforms for non-incremental project transforms
  • [#26678] - ivy repository URL String parsing broken with 8.3
  • [#26628] - Disable project implicit configuration on cross-project access
  • [#26623] - 8.4 – Test task that filters tests by JUnit 5 tag annotation emits deprecation
  • [#26614] - Make IDEA model builder Isolated Projects compatible
  • [#26415] - Gradle batch file does not print JAVA_HOME errors on standard error
  • [#26412] - Investigate PersistentCache logic and what we can reuse for immutable workspace and sandboxing
  • [#26396] - Separate cc instrumentation and property upgrades when instrumenting bytecode
  • [#26377] - Capabilities information differs in dependency graph vs artifact collection
  • [#26319] - Bad error message when using the wrong Java version
  • [#26289] - `--write-verification-metadata --dry-run` missing dependencies in android project with buildSrc
  • [#26219] - Gradle init should not provide the package default based on the project name
  • [#26179] - --write-verification-metadata failure with includedBuild
  • [#26163] - Support providers to define capabilities of consumable configurations
  • [#26037] - Instrument plugins with artifact transform
  • [#25686] - Tests for `kotlin-dsl-plugin` and `kotlin-dsl-integ-tests` with embedded runner fails when upgrading AbstractCompile properties
  • [#25560] - ValueSource without result is always recognized as changed by configuration cache
  • [#25326] - Measure the impact of Project Isolation on a large purely Java project
  • [#25270] - TomlCatalogFileParser should use BufferedInputStream
  • [#25235] - Gradle build fails with configuration cache enabled with warnings
  • [#24624] - Non-interactive mode for `gradle init`
  • [#24341] - --exclude-task fails on complex included build structure with settings plugin starting with 7.6
  • [#20932] - Prevent or help to diagnose accidental recursion to itself in a property
  • [#18080] - Cancelling `gradle init` leaves leftovers lying around
  • [#3919] - Error:Cannot find snapshot for id: -4123461672748341163
  • [#27617] - When viewing docs in dark-mode, 'Tips' boxes have a light-mode background
  • [#27639] - Artifact transform instrumentation ignores directories
  • [#27635] - Gradle 8.6-rc-1 can't build Spring Boot 2.x based projects
  • [#27356] - Final javadoc review for Problems API
  • [#27352] - Review and extend test coverage for Problems API
  • [#27350] - Contribute Problems API project to samples index
  • [#27349] - Document Problems API in release notes
  • [#27289] - Performance Tests lead to 404
  • [#26953] - Implement public Problems API
  • [#27722] - Remove update() from public API in 8.6
  • [#27709] - Change in tar permission handling with 8.6-rc-1 and 8.6-rc-2
  • [#27703] - Docs Dark theme does not work as expected on Windows/Chrome
  • [#27695] - Android Studio project import memory regression in 8.6-rc1
  • [#27679] - Cannot mutate ... after it has been finalized in testsuite with kotlin plugin in Gradle 8.6-rc
  • [#27847] - The AsciiDoc preprocessor directives is unresolved in user guide (pdf)
  • [#27844] - Temporary workspace cannot be moved to immutable location when files left open on Windows
  • [#27763] - Low contrast on links with code-styling in dark mode
  • [#27739] - Broken Groovy compilation result in NotSerializableException in IDE

New in Gradle 8.6 RC 3 (Jan 24, 2024)

  • New features and usability improvements:
  • Configuration cache improvements:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing it for subsequent builds. This feature can significantly improve build performance.
  • Custom encryption key:
  • The configuration cache is encrypted to mitigate the risk of accidental exposure of sensitive data. By default, Gradle automatically creates and manages the key, storing it in a keystore in the Gradle User Home directory. While convenient, this may be inappropriate in some environments.
  • You may now provide Gradle with the key used to encrypt cached configuration data via the GRADLE_ENCRYPTION_KEY environment variable.
  • More details can be found in the configuration cache section of the Gradle User Manual.
  • Build init improvements:
  • The build init plugin allows users to easily create a new Gradle build, supporting various types of projects.
  • Simpler source package handling:
  • You no longer have to answer an interactive question about the source package. Instead, a default value of org.example will be used. You can override it using an existing option --package flag for the init task. Additionally, you can set the default value by adding a new org.gradle.buildinit.source.package property in gradle.properties in the Gradle User Home.
  • // ~/.gradle/gradle.properties
  • org.gradle.buildinit.source.package=my.corp.domain
  • Names of the generated convention plugins now start with buildlogic instead of the package name, making them shorter and cleaner.
  • Generating without interactive questions:
  • A new --use-defaults option applies default values for options that were not explicitly configured. It also ensures the init command can be completed without interactive user input. This is handy in shell scripts to ensure they do not accidentally hang.
  • For example, here is how you can generate a Kotlin library without answering any questions:
  • gradle init --use-defaults --type kotlin-library
  • Simpler assignment syntax in Kotlin DSL:
  • Projects generated with Kotlin DSL scripts now use simple property assignment syntax with the = operator.
  • For instance, setting mainClass of an application looks like this:
  • application {
  • mainClass = "org.example.AppKt"
  • Build authoring improvements:
  • Gradle provides rich APIs for plugin authors and build engineers to develop custom build logic. The task configuration avoidance API avoids configuring tasks if they are not needed for the execution of a build.
  • Lazy name-based filtering of tasks:
  • Previously, filtering tasks by name required using the matching method using the following pattern:
  • tasks.matching { it.name.contains("pack") }.configureEach {
  • // configure details of all '*pack*' tasks that are part of the task graph
  • The problem was that calling matching triggered the creation of all tasks, even when the task was not part of the build execution.
  • Starting from this release, you can use:
  • tasks.named { it.contains("pack") }.configureEach {
  • // lazily configure details of all '*pack*' tasks that are part of the task graph
  • Using named will not cause the registered tasks to be eagerly created.
  • This new method is available on all Gradle containers that extend NamedDomainObjectSet.
  • Allow Providers to be used with dependency capabilities:
  • Gradle supports declaring capabilities for components to better manage dependencies by allowing Gradle to detect and resolve conflicts between dependencies at build time.
  • Previously, capability methods only accepted inputs as strings using with the capability notation
  • Providers can now be passed to capability methods ConfigurationPublications#capability(Object), ModuleDependencyCapabilitiesHandler#requireCapability(Object), and CapabilitiesResolution#withCapability(Object, Action). This allows computing the capability coordinates using values that may change after calling these methods, for example
  • Error and warning reporting improvements:
  • Gradle provides a rich set of error and warning messages to help you understand and resolve problems in your build.
  • Clearer suggested actions in case of dependency locking errors:
  • This release improves error messages in dependency locking by separating the error from the possible action to fix the issue in the console output. Errors from invalid lock file format or missing lock state when strict mode is enabled are now displayed as illustrated below:
  • FAILURE: Build failed with an exception.
  • * What went wrong:
  • Execution failed for task ':dependencies'.
  • > Could not resolve all dependencies for configuration ':lockedConf'.
  • > Invalid lock state for lock file specified in '<project>/lock.file'. Line: '<<<<<<< HEAD'
  • * Try:
  • > Verify the lockfile content. For more information on lock file format, please refer to https://docs.gradle.org/8.6-rc-3/userguide/dependency_locking.html#lock_state_location_and_format in the Gradle documentation.
  • > Run with --info or --debug option to get more log output.
  • > Run with --scan to get full insights.
  • > Get more help at https://help.gradle.org.
  • Better error reporting of circular references in providers:
  • Before this release, evaluating a provider with a cycle in its value assignment would lead to a StackOverflowError. With this release, circular references are properly detected and reported.
  • Starting with this release, you get a more helpful error message indicating the source of the cycle and a list of the providers in the chain that led to it
  • IDE Integration improvements:
  • Gradle is integrated into many IDEs using the Tooling API.
  • The following improvements are for IDE integrators. They will become available to end-users in future IDE releases once IDE vendors adopt them.
  • Problems API:
  • The new Problems API has entered a public incubation phase and is ready for integration.
  • The Problems API enables plugin and build engineers to report rich, structured information about problems that may occur during a build. This information can be received by Tooling API clients, such as IDEs or CI systems, and can be represented in a way that best suits the platform. Tooling API clients are encouraged to begin integrating with the API and provide additional feedback.
  • Integrating the Problems API
  • The integration process for established Tooling API clients should be straightforward. Problems can be received using the same ProgressListener interface used for other progress messages. The new template showcases a self-functioning Tooling API client that can receive and present problems. Additionally, a new sample has been introduced to demonstrate various use cases of the API.
  • Fixed issues:
  • 83 issues have been fixed in Gradle 8.6.
  • [#27524] - Broken Link to Gradle Module Metadata Specification
  • [#27520] - The --java-version option doesn't prevent "gradle init" from entering interactive mode, as expected
  • [#27487] - Windows virtual memory monitoring captures the wrong value for free memory
  • [#27460] - Labels for task validation problems API reports are incomplete
  • [#27448] - Using transforms for classpath instrumentation makes the performance->configuration page fail in build scans with configure on demand
  • [#27416] - Rethink `ProblemReporter#report` interfaces
  • [#27405] - Navigating to Gradle sources in IDE broken since 8.5
  • [#27358] - Fix worker API compatibility issue - send an exception from a worker in an integration test
  • [#27357] - Fix serialization of `Class` for reused projects
  • [#27354] - Expose common categories via Problems API
  • [#27353] - Make Problems API more permissive
  • [#27351] - Document Problems API in user guide
  • [#27311] - Quick Doc link fixes in Running and Authoring Gradle Builds
  • [#27306] - gradle init produces settings.gradle file with wrong multi-project build documentation link
  • [#27283] - Link to gradle module metadata specification is broken on https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html
  • [#27241] - DefaultProblem should not hold a reference to OperationIdentifier
  • [#27237] - WorkerProblemSerializer should use Encoder/Decoder for serialisation
  • [#27213] - Fix message ordering when reporting problems from a worker
  • [#27205] - JavaDoc of `BuildFeature` claims you can inject it but not how
  • [#27193] - Remove unused variables of Problems interface
  • [#27182] - Clean up Problems API inconsistencies
  • [#27180] - Implement problem aggregation
  • [#27136] - Fix typo in JavaDoc
  • [#27125] - Delete ProblemDescriptor.getJson
  • [#27124] - Make it easier for third party plugins to define problem documentation URLs
  • [#27123] - Define separate API to report third-party plugin problems
  • [#27122] - Outdated JavaDoc on `ProblemBuilderSpec`
  • [#27055] - Allow users to provide the encryption key used by the Gradle Configuration Cache
  • [#27032] - Workers should be able to use the Problems API
  • [#26997] - Investigate Problem deduplication and write a spec
  • [#26990] - Adding a new public type and a method fails binary compatibility check
  • [#26978] - Update documentation around Verification failures
  • [#26965] - Benchmark concurrent codec solutions
  • [#26957] - Additional data attached to Problems should be able to handle new data types
  • [#26954] - Problems API should be usable from workers
  • [#26948] - Refine ProblemEvent type in Tooling API
  • [#26922] - "JaCoCo Report Aggregation Plugin" fails when configuration cache is enabled (gradle plugin project)
  • [#26899] - Build tree path is not available for all models exposing the Task type
  • [#26887] - Allow problem transformers to edit problems
  • [#26825] - Deadlock in dependency resolution
  • [#26790] - Deadlock in parallel model building with AGP
  • [#26774] - Introduce `NamedDomainObjectCollection.named(Spec<String>)`
  • [#26757] - Poor directory snapshotting performance for source directory sets with many entries
  • [#26694] - Use Immutable artifact transforms for non-incremental project transforms
  • [#26678] - ivy repository URL String parsing broken with 8.3
  • [#26628] - Disable project implicit configuration on cross-project access
  • [#26623] - 8.4 – Test task that filters tests by JUnit 5 tag annotation emits deprecation
  • [#26614] - Make IDEA model builder Isolated Projects compatible
  • [#26415] - Gradle batch file does not print JAVA_HOME errors on standard error
  • [#26412] - Investigate PersistentCache logic and what we can reuse for immutable workspace and sandboxing
  • [#26396] - Separate cc instrumentation and property upgrades when instrumenting bytecode
  • [#26377] - Capabilities information differs in dependency graph vs artifact collection
  • [#26319] - Bad error message when using the wrong Java version
  • [#26289] - `--write-verification-metadata --dry-run` missing dependencies in android project with buildSrc
  • [#26219] - Gradle init should not provide the package default based on the project name
  • [#26179] - --write-verification-metadata failure with includedBuild
  • [#26163] - Support providers to define capabilities of consumable configurations
  • [#26037] - Instrument plugins with artifact transform
  • [#25686] - Tests for `kotlin-dsl-plugin` and `kotlin-dsl-integ-tests` with embedded runner fails when upgrading AbstractCompile properties
  • [#25560] - ValueSource without result is always recognized as changed by configuration cache
  • [#25326] - Measure the impact of Project Isolation on a large purely Java project
  • [#25270] - TomlCatalogFileParser should use BufferedInputStream
  • [#25235] - Gradle build fails with configuration cache enabled with warnings
  • [#24624] - Non-interactive mode for `gradle init`
  • [#24341] - --exclude-task fails on complex included build structure with settings plugin starting with 7.6
  • [#20932] - Prevent or help to diagnose accidental recursion to itself in a property
  • [#18080] - Cancelling `gradle init` leaves leftovers lying around
  • [#3919] - Error:Cannot find snapshot for id: -4123461672748341163
  • [#27617] - When viewing docs in dark-mode, 'Tips' boxes have a light-mode background
  • [#27639] - Artifact transform instrumentation ignores directories
  • [#27635] - Gradle 8.6-rc-1 can't build Spring Boot 2.x based projects
  • [#27356] - Final javadoc review for Problems API
  • [#27352] - Review and extend test coverage for Problems API
  • [#27350] - Contribute Problems API project to samples index
  • [#27349] - Document Problems API in release notes
  • [#27289] - Performance Tests lead to 404
  • [#26953] - Implement public Problems API
  • [#27739] - Broken Groovy compilation result in NotSerializableException in IDE
  • [#27722] - Remove update() from public API in 8.6
  • [#27709] - Change in tar permission handling with 8.6-rc-1 and 8.6-rc-2
  • [#27703] - Docs Dark theme does not work as expected on Windows/Chrome
  • [#27695] - Android Studio project import memory regression in 8.6-rc1
  • [#27679] - Cannot mutate ... after it has been finalized in testsuite with kotlin plugin in Gradle 8.6-rc

New in Gradle 8.6 RC 2 (Jan 14, 2024)

  • New features and usability improvements:
  • Configuration cache improvements:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing it for subsequent builds. This feature can significantly improve build performance.
  • Custom encryption key:
  • The configuration cache is encrypted to mitigate the risk of accidental exposure of sensitive data. By default, Gradle automatically creates and manages the key, storing it in a keystore in the Gradle User Home directory. While convenient, this may be inappropriate in some environments.
  • You may now provide Gradle with the key used to encrypt cached configuration data via the GRADLE_ENCRYPTION_KEY environment variable.
  • More details can be found in the configuration cache section of the Gradle User Manual.
  • Build init improvements:
  • The build init plugin allows users to easily create a new Gradle build, supporting various types of projects.
  • Simpler source package handling:
  • You no longer have to answer an interactive question about the source package. Instead, a default value of org.example will be used. You can override it using an existing option --package flag for the init task. Additionally, you can set the default value by adding a new org.gradle.buildinit.source.package property in gradle.properties in the Gradle User Home.
  • // ~/.gradle/gradle.properties
  • org.gradle.buildinit.source.package=my.corp.domain
  • Names of the generated convention plugins now start with buildlogic instead of the package name, making them shorter and cleaner.
  • Generating without interactive questions:
  • A new --use-defaults option applies default values for options that were not explicitly configured. It also ensures the init command can be completed without interactive user input. This is handy in shell scripts to ensure they do not accidentally hang.
  • For example, here is how you can generate a Kotlin library without answering any questions:
  • gradle init --use-defaults --type kotlin-library
  • Simpler assignment syntax in Kotlin DSL:
  • Projects generated with Kotlin DSL scripts now use simple property assignment syntax with the = operator.
  • For instance, setting mainClass of an application looks like this:
  • application {
  • mainClass = "org.example.AppKt"
  • Build authoring improvements
  • Gradle provides rich APIs for plugin authors and build engineers to develop custom build logic. The task configuration avoidance API avoids configuring tasks if they are not needed for the execution of a build.
  • Lazy name-based filtering of tasks
  • Previously, filtering tasks by name required using the matching method using the following pattern:
  • tasks.matching { it.name.contains("pack") }.configureEach {
  • // configure details of all '*pack*' tasks that are part of the task graph
  • The problem was that calling matching triggered the creation of all tasks, even when the task was not part of the build execution.
  • Starting from this release, you can use:
  • tasks.named { it.contains("pack") }.configureEach {
  • // lazily configure details of all '*pack*' tasks that are part of the task graph
  • Using named will not cause the registered tasks to be eagerly created.
  • This new method is available on all Gradle containers that extend NamedDomainObjectSet.
  • Allow Providers to be used with dependency capabilities
  • Gradle supports declaring capabilities for components to better manage dependencies by allowing Gradle to detect and resolve conflicts between dependencies at build time.
  • Previously, capability methods only accepted inputs as strings using with the capability notation:
  • dependencies {
  • implementation("org.foo:bar:1.0") {
  • capabilities {
  • requireCapability("org.foo:module-variant") // capability notation
  • Providers can now be passed to capability methods ConfigurationPublications#capability(Object), ModuleDependencyCapabilitiesHandler#requireCapability(Object), and CapabilitiesResolution#withCapability(Object, Action). This allows computing the capability coordinates using values that may change after calling these methods
  • New update() API allows safe self-referencing lazy properties:
  • Lazy configuration delays calculating a property’s value until it is required for the build. This can lead to accidental recursions when assigning property values of an object to itself:
  • var property = objects.property<String>()
  • property.set("some value")
  • property.set(property.map { "$it and more" })
  • // Circular evaluation detected (or StackOverflowError, before 8.6)
  • println(property.get()) // "some value and more"
  • Previously, Gradle did not support circular references when evaluating lazy properties.
  • Property and ConfigurableFileCollection now provide their respective update(Transformer<...>) methods which allow self-referencing updates safely:
  • var property = objects.property<String>()
  • property.set("some value")
  • property.update { it.map { "$it and more" } }
  • println(property.get()) // "some value and more"
  • Refer to the javadoc for Property.update(Transformer<>) and ConfigurableFileCollection.update(Transformer<>) for more details, including limitations.
  • Error and warning reporting improvements:
  • Gradle provides a rich set of error and warning messages to help you understand and resolve problems in your build.
  • Clearer suggested actions in case of dependency locking errors
  • This release improves error messages in dependency locking by separating the error from the possible action to fix the issue in the console output. Errors from invalid lock file format or missing lock state when strict mode is enabled are now displayed as illustrated below:
  • FAILURE: Build failed with an exception.
  • * What went wrong:
  • Execution failed for task ':dependencies'.
  • > Could not resolve all dependencies for configuration ':lockedConf'.
  • > Invalid lock state for lock file specified in '<project>/lock.file'. Line: '<<<<<<< HEAD'
  • * Try:
  • > Verify the lockfile content. For more information on lock file format, please refer to https://docs.gradle.org/8.6-rc-2/userguide/dependency_locking.html#lock_state_location_and_format in the Gradle documentation.
  • > Run with --info or --debug option to get more log output.
  • > Run with --scan to get full insights.
  • > Get more help at https://help.gradle.org.
  • Better error reporting of circular references in providers:
  • Before this release, evaluating a provider with a cycle in its value assignment would lead to a StackOverflowError. With this release, circular references are properly detected and reported.
  • For instance, the following code:
  • def property = objects.property(String)
  • property.set("some value")
  • // wrong, self-references only supported via #update()
  • property.set(property.map { "$it and more" })
  • println(property.get()) // error when evaluating
  • Previously failed with a StackOverflowError and limited details:
  • FAILURE: Build failed with an exception.
  • * What went wrong:
  • A problem occurred evaluating root project 'test'.
  • > java.lang.StackOverflowError (no error message)
  • Starting with this release, you get a more helpful error message indicating the source of the cycle and a list of the providers in the chain that led to it:
  • FAILURE: Build failed with an exception.
  • * Where:
  • Build file '<project>/build.gradle' line: 7
  • * What went wrong:
  • A problem occurred evaluating root project 'test'.
  • > Circular evaluation detected: property(java.lang.String, map(java.lang.String map(<CIRCULAR REFERENCE>) check-type()))
  • -> map(java.lang.String map(property(java.lang.String, <CIRCULAR REFERENCE>)) check-type())
  • -> map(property(java.lang.String, map(java.lang.String <CIRCULAR REFERENCE> check-type())))
  • -> property(java.lang.String, map(java.lang.String map(<CIRCULAR REFER
  • IDE Integration improvements
  • Gradle is integrated into many IDEs using the Tooling API.
  • The following improvements are for IDE integrators. They will become available to end-users in future IDE releases once IDE vendors adopt them.
  • Problems API
  • The new Problems API has entered a public incubation phase and is ready for integration.
  • The Problems API enables plugin and build engineers to report rich, structured information about problems that may occur during a build. This information can be received by Tooling API clients, such as IDEs or CI systems, and can be represented in a way that best suits the platform. Tooling API clients are encouraged to begin integrating with the API and provide additional feedback.
  • Integrating the Problems API
  • Fixed issues:
  • 76 issues have been fixed in Gradle 8.6.
  • [#27524] - Broken Link to Gradle Module Metadata Specification
  • [#27520] - The --java-version option doesn't prevent "gradle init" from entering interactive mode, as expected
  • [#27487] - Windows virtual memory monitoring captures the wrong value for free memory
  • [#27460] - Labels for task validation problems API reports are incomplete
  • [#27448] - Using transforms for classpath instrumentation makes the performance->configuration page fail in build scans with configure on demand
  • [#27416] - Rethink `ProblemReporter#report` interfaces
  • [#27405] - Navigating to Gradle sources in IDE broken since 8.5
  • [#27358] - Fix worker API compatibility issue - send an exception from a worker in an integration test
  • [#27357] - Fix serialization of `Class` for reused projects
  • [#27354] - Expose common categories via Problems API
  • [#27353] - Make Problems API more permissive
  • [#27311] - Quick Doc link fixes in Running and Authoring Gradle Builds
  • [#27306] - gradle init produces settings.gradle file with wrong multi-project build documentation link
  • [#27283] - Link to gradle module metadata specification is broken on https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html
  • [#27241] - DefaultProblem should not hold a reference to OperationIdentifier
  • [#27237] - WorkerProblemSerializer should use Encoder/Decoder for serialisation
  • [#27227] - A way to transform a provider value "in-place" would be nice
  • [#27213] - Fix message ordering when reporting problems from a worker
  • [#27205] - JavaDoc of `BuildFeature` claims you can inject it but not how
  • [#27193] - Remove unused variables of Problems interface
  • [#27182] - Clean up Problems API inconsistencies
  • [#27180] - Implement problem aggregation
  • [#27136] - Fix typo in JavaDoc
  • [#27125] - Delete ProblemDescriptor.getJson
  • [#27124] - Make it easier for third party plugins to define problem documentation URLs
  • [#27123] - Define separate API to report third-party plugin problems
  • [#27122] - Outdated JavaDoc on `ProblemBuilderSpec`
  • [#27055] - Allow users to provide the encryption key used by the Gradle Configuration Cache
  • [#27032] - Workers should be able to use the Problems API
  • [#26997] - Investigate Problem deduplication and write a spec
  • [#26990] - Adding a new public type and a method fails binary compatibility check
  • [#26978] - Update documentation around Verification failures
  • [#26965] - Benchmark concurrent codec solutions
  • [#26957] - Additional data attached to Problems should be able to handle new data types
  • [#26954] - Problems API should be usable from workers
  • [#26948] - Refine ProblemEvent type in Tooling API
  • [#26922] - "JaCoCo Report Aggregation Plugin" fails when configuration cache is enabled (gradle plugin project)
  • [#26899] - Build tree path is not available for all models exposing the Task type
  • [#26887] - Allow problem transformers to edit problems
  • [#26825] - Deadlock in dependency resolution
  • [#26790] - Deadlock in parallel model building with AGP
  • [#26774] - Introduce `NamedDomainObjectCollection.named(Spec<String>)`
  • [#26757] - Poor directory snapshotting performance for source directory sets with many entries
  • [#26694] - Use Immutable artifact transforms for non-incremental project transforms
  • [#26678] - ivy repository URL String parsing broken with 8.3
  • [#26628] - Disable project implicit configuration on cross-project access
  • [#26623] - 8.4 – Test task that filters tests by JUnit 5 tag annotation emits deprecation
  • [#26614] - Make IDEA model builder Isolated Projects compatible
  • [#26415] - Gradle batch file does not print JAVA_HOME errors on standard error
  • [#26412] - Investigate PersistentCache logic and what we can reuse for immutable workspace and sandboxing
  • [#26396] - Separate cc instrumentation and property upgrades when instrumenting bytecode
  • [#26377] - Capabilities information differs in dependency graph vs artifact collection
  • [#26319] - Bad error message when using the wrong Java version
  • [#26289] - `--write-verification-metadata --dry-run` missing dependencies in android project with buildSrc
  • [#26219] - Gradle init should not provide the package default based on the project name
  • [#26179] - --write-verification-metadata failure with includedBuild
  • [#26163] - Support providers to define capabilities of consumable configurations
  • [#26037] - Instrument plugins with artifact transform
  • [#25686] - Tests for `kotlin-dsl-plugin` and `kotlin-dsl-integ-tests` with embedded runner fails when upgrading AbstractCompile properties
  • [#25560] - ValueSource without result is always recognized as changed by configuration cache
  • [#25326] - Measure the impact of Project Isolation on a large purely Java project
  • [#25270] - TomlCatalogFileParser should use BufferedInputStream
  • [#25235] - Gradle build fails with configuration cache enabled with warnings
  • [#24624] - Non-interactive mode for `gradle init`
  • [#24341] - --exclude-task fails on complex included build structure with settings plugin starting with 7.6
  • [#20932] - Prevent or help to diagnose accidental recursion to itself in a property
  • [#18080] - Cancelling `gradle init` leaves leftovers lying around
  • [#3919] - Error:Cannot find snapshot for id: -4123461672748341163
  • [#27639] - Artifact transform instrumentation ignores directories
  • [#27635] - Gradle 8.6-rc-1 can't build Spring Boot 2.x based projects
  • [#27356] - Final javadoc review for Problems API
  • [#27352] - Review and extend test coverage for Problems API
  • [#27350] - Contribute Problems API project to samples index
  • [#27349] - Document Problems API in release notes
  • [#27289] - Performance Tests lead to 404
  • [#26953] - Implement public Problems API
  • The integration process for established Tooling API clients should be straightforward. Problems can be received using the same ProgressListener interface used for other progress messages. The new template showcases a self-functioning Tooling API client that can receive and present problems. Additionally, a new sample has been introduced to demonstrate various use cases of the API.

New in Gradle 8.5 RC 1 (Nov 16, 2023)

  • New features and usability improvements:
  • Full Java 21 support:
  • Gradle 8.4 supported compiling and testing with Java 21 using Java toolchains, but running Gradle itself on Java 21 was not yet supported.
  • With this release, Gradle now fully supports compiling, testing and running on Java 21.
  • See the full compatibility documentation for details.
  • Kotlin DSL improvements:
  • Gradle's Kotlin DSL provides an enhanced editing experience in supported IDEs compared to the traditional Groovy DSL — auto-completion, smart content assist, quick access to documentation, navigation to source, and context-aware refactoring.
  • Faster first use:
  • When using a Gradle version for the first time, Gradle will start compiling your build logic faster than before.
  • Previously, there was about four seconds of overhead on powerful machines (and much longer on slower machines) to run a build with Kotlin DSL scripts for the first time. Typically, this happened on every build for ephemeral CI agents, as they have an empty Gradle user home directory. The fact that ephemeral CI agents often have a cold Gradle daemon made this even slower. This is because up to this release Gradle generated a Gradle API Kotlin DSL Extensions JAR before compiling the first .gradle.kts script.
  • The Kotlin extensions for the Gradle API now ship as part of the Gradle distribution. Consequently, the first use of a Gradle version for compiling .gradle.kts scripts is much faster. This is especially noticeable on ephemeral CI agents or Gradle plugin cross-version tests.
  • Version catalog API in precompiled scripts:
  • The versionCatalogs extension accessor is now available in Kotlin DSL precompiled scripts.
  • It provides an API for accessing version catalogs available on the projects where the precompiled script will be applied. The following example conditionally declares a dependency on a module defined in a version catalog
  • Ability to enable Kotlin metadata version check for script compilation:
  • Kotlin/JVM metadata is backward-compatible with all Kotlin releases and forward-compatible with one Kotlin release. For example, Kotlin 1.9 supports Kotlin metadata from Kotlin 1.0 up to Kotlin 2.0, but not from Kotlin 2.1.
  • The Kotlin compiler checks that the metadata of all dependencies is compatible. Skipping that check is the current default for Gradle script compilation. This may lead to hard-to-troubleshoot errors when libraries built with Kotlin versions unsupported by the Kotlin embedded in Gradle are used in build logic.
  • Skipping the check will be deprecated soon. Starting with Gradle 9.0, the Kotlin metadata version check will be enabled by default.
  • To opt-in early to the future-proof behavior, set the org.gradle.kotlin.dsl.skipMetadataVersionCheck property to false. This will enable the metadata check.
  • Error and warning reporting improvements:
  • Gradle provides a rich set of error and warning messages to help you understand and resolve problems in your build.
  • Improved deprecation messages when creating configurations with reserved names
  • Gradle now provides more helpful messages when you attempt to create a configuration with a "reserved" name prior to Gradle creating it.
  • Improved handling of wrapped assertion errors when running tests:
  • The way Gradle handles wrapped assertion failures in tests has been significantly improved.
  • Previously, if a test framework or library wrapped an assertion exception in a more generic exception, the information about the underlying error could not be displayed in the IDE.
  • As an example, the following code, instead of reporting the underlying assertion error of getting “Actual text” instead of “Expected text”, just returned a blank assertion failed message to listeners.
  • Better diagnostics when unable to delete files:
  • When Gradle fails to delete files, it will now provide extended diagnostics. This helps troubleshoot issues with locked files, concurrent writes, etc.
  • The list of files that failed to be deleted is reported. If new files appear under a directory during deletion, their paths will be reported separately. The root cause exceptions for each file deletion failure will also be attached to the stack trace.
  • Build init improvements:
  • The build init plugin allows users to create a new Gradle build, supporting various types of projects.
  • Build init utilizing version catalogs:
  • Version catalogs are the recommended way to centrally define dependency modules, plugins, and their versions. Starting from this release, the build init plugin generates projects utilizing version catalogs in the conventional location gradle/libs.versions.toml. This encourages version catalog usage since it became a stable feature in Gradle 8.0.
  • Refer to the user manual and the TOML file format for information on version catalogs.
  • New --java-version parameter:
  • By default, the init command enters interactive mode and prompts the user when required information for the selected project type is missing.
  • To support generating Java projects non-interactively, the --java-version parameter was added to the init task. This parameter allows you to specify the major version of Java to use in the generated project when launching the init task in a non-interactive mode.
  • Wrapper improvements:
  • The recommended way to execute any Gradle build is with the help of the Gradle Wrapper (in short, “Wrapper”). The Wrapper invokes a declared version of Gradle, downloading it beforehand if necessary.
  • Smaller Wrapper JAR:
  • The Wrapper JAR file size was reduced from ~65K to ~45K by eliminating unused code.
  • Wrapper JAR LICENSE file:
  • The Wrapper JAR now contains a META-INF/LICENSE file.
  • This was done to alleviate any doubts regarding the licensing of the Wrapper JAR file. The Wrapper and the Gradle Build Tool are licensed under the Apache Software License 2.0. The JAR file is now self-attributing, so you don't need to add a separate LICENSE file in your codebase.
  • Build authoring improvements:
  • Gradle provides rich APIs for plugin authors and build engineers to develop custom build logic.
  • Improvements to Javadoc of generated version catalog accessors:
  • The Javadoc for generated accessors for plugins and libraries from a version catalog now includes information about the version of the plugin or library. This version information can be either a value, a version reference, or the indication that no version was provided.
  • Ability to create CopySpec instances compatible with configuration cache and workers:
  • The FileSystemOperations service now has a copySpec() method for creating CopySpec instances in a configuration cache friendly way. The new method allows you to create, configure, and use CopySpec instances during the execution phase.
  • For information on service injection for custom Gradle tasks, see the documentation.
  • Build-wide locations available to Settings scripts and plugins via Settings.layout:
  • Settings scripts and plugins can now access standard build-wide file system locations as lazily computed values via Settings.layout. That is analogous to what Project.layout offers for project-specific locations. These APIs are currently incubating but eventually should replace existing accessors in Settings, which return eagerly computed locations
  • Build Features API:
  • The new incubating Build Features API allows plugins to access the status of build features during build time. It is designed to help plugin authors and build engineers adopt Gradle features incrementally.
  • In the initial release, the API provides information about the Configuration Cache and Isolated Projects features. For each build feature, it is possible to determine whether the user requested it and if it is active in the current build.
  • Dependency verification improvements:
  • To mitigate the security risks and avoid integrating compromised dependencies in your project, Gradle supports dependency verification.
  • Dependency verification Key export format selection:
  • By default, Gradle searches for trusted keys first in the binary .gpg file and then in the ASCII-armored .keys file. Additionally, when Gradle is asked to export all trusted keys via ./gradlew --export-keys, it generates both binary and ASCII-armored versions.
  • You can now change this behavior to choose only one format. To do so, edit verification-metadata.xml by adding the keyring-format setting
  • Dependency verification Key format case sensitivity change:
  • Trusted and ignored keys in verification-metadata.xml are now case-insensitive. By default, they are written in upper-case to match the ASCII-armored format of verification-keyring.keys
  • Other improvements:
  • Relative path canonicalization:
  • Paths in Copy and Sync tasks are canonicalized so that . is not used and .. only appears at the beginning of a path. In previous versions of Gradle, the absence of this canonicalization could lead to unexpected behaviors, such as missing copies or overwritten files.
  • Ear plugin:
  • The Ear plugin, which generates Java EE Enterprise Archive (EAR) files, now supports valid deployment descriptors for Java EE 8, Jakarta EE 9, and Jakarta EE 10. You can specify the corresponding version in the deploymentDescriptor instead of having to use a custom descriptor file
  • Fixed issues:
  • 89 issues have been fixed in Gradle 8.5.
  • [#26890] - Clean up categories reported via Problems API
  • [#26861] - Bug in Tutorial Apply Plugin section
  • [#26841] - Rename `Problems#createProblem` to `Problems#create`
  • [#26838] - Rename Problem.getWhere() to Problem.getLocations()
  • [#26828] - Expand list of file extensions used by cpp-library public headers
  • [#26826] - Add Maven test fixture to test POMs generated by Gradle
  • [#26821] - Update verfication-metadata to 1.3
  • [#26814] - Broken link in "Declaring Repositories" page
  • [#26805] - Published source tarballs expect a git repository to build
  • [#26777] - In Gradle 8.4, Project.getConfigurations() is marked unstable again
  • [#26769] - Generation of Kotlin extensions of the Gradle API is not reproducible
  • [#26764] - Upgrade embedded Kotlin to 1.9.20 when available
  • [#26750] - unable to create task based on code in documentation
  • [#26748] - Wrong Windows instruction
  • [#26746] - Pull out test suites to its own project
  • [#26741] - Add Version to Version Catalog Javadoc
  • [#26716] - Add location information to problem reports for version catalog problems
  • [#26711] - The -all distribution is missing the resource files from the src folder
  • [#26699] - Usage of GRADLE_HOME for ephemeral builds is wrong
  • [#26693] - Problems-api subproject should be java 6 compatible
  • [#26676] - Drop :wrapper-shared dependency in :build-cache-packaging
  • [#26658] - Wrapper project should output final gradle-wrapper.jar to libs folder
  • [#26632] - Let generated Kotlin extensions for the Gradle API be included in the binary compatibility check
  • [#26616] - Ensure that the internal problems API can be used in TAPI model builders
  • [#26613] - Make IDEA Gradle plugin Isolated Projects compatible
  • [#26609] - 8.4 KotlinDsl: ConfigurationContainerScope.detachedConfiguration allows nullable Dependency but will throw NPE
  • [#26602] - 8.4 - New configuration shortcut: DependencyScopeConfiguration.invoke isn't available
  • [#26598] - add --java-version parameter to gradle init task
  • [#26578] - Set visible=false on consumable Configurations
  • [#26570] - Binary changes are sometimes not auto-accepted for upgraded properties
  • [#26549] - Implement basic location types
  • [#26507] - Ignore help task execution request during model building
  • [#26483] - Ship the Gradle API Kotlin DSL Extensions JAR within the Gradle distribution
  • [#26481] - Add more NowInAndroid based performance tests
  • [#26462] - NowInAndroid project is not building with current `master` branch
  • [#26461] - Anticipating named Configurations with different allowed usages can cause unexpected behaviors
  • [#26438] - Ear Plugin: XML Schema / xmlns in Ear Descriptor for Java EE 8, Jakarta EE 9 and Jakarta EE 10 is missing / invalid
  • [#26426] - Hashing a file with upgraded properties fails due to incorrect hashing
  • [#26400] - Don't share stateful codecs
  • [#26366] - TestLauncher should be able to support test debugging while reusing CC cache entry
  • [#26360] - Don't invalidate the cache upon Kotlin DSL `cid` project property changes
  • [#26352] - Configuration cache fails when using filtered FileCollection
  • [#26351] - Dependency configuration testRuntime still exists in docs
  • [#26350] - Reduce log level of directory watcher
  • [#26334] - `getDependenciesForVariant` produces duplicate results when a dependency is reachable through two paths
  • [#26332] - Tests in gradle/gradle build should not make use of the Foojay Toolchains Plugin
  • [#26321] - Clean up next gen build cache prototype
  • [#26300] - Move ConsistentResolution code into JavaComponent
  • [#26299] - Gradle doesn't expose a comparison failure in test exception causes
  • [#26293] - Automatically accept binary changes for Upgraded properties
  • [#26255] - Error message when attempting to create a configuration that already exists is confusing
  • [#26252] - Continuous Build - changes to task inputs, or changes to input files?
  • [#26201] - Gradle not noticing file changes when source files is behind symlink on macOS
  • [#26088] - Clarify what "Gradle installation directory" means for `gradlew`
  • [#25989] - Generate list of upgraded properties during build
  • [#25984] - Provide better diagnostics for the "Unable to delete directory... Failed to delete some children..." error
  • [#25852] - Improve error message if value derived from property that does not provide any value
  • [#25807] - Clean up internal flags for persistent Java compiler daemon
  • [#25782] - Use GroovyCoverage/CheckstyleCoverage/etc pattern for ScalaCoverage
  • [#25728] - MavenPublicationErrorChecker can have a more helpful error message
  • [#25586] - org.gradle.api.tasks.WriteProperties.setOutputFile deprecated but no suggested alternative
  • [#25574] - Support running with Java 21
  • [#25531] - Warn if project in settings.gradle has a non existent project directory
  • [#25483] - `compileKotlin` task of build with `kotlin-dsl` applied emits warnings when configuration-cache is enabled
  • [#25431] - Unpublish :wrapper-shared for Maven
  • [#25325] - Make Java plugin compatible with Project Isolation
  • [#25018] - Some implicit imports for .gradle.kts are package private
  • [#24450] - Alert Plugins of Special Case Exceptions Suppressing Deprecation Warnings
  • [#24258] - Update gradle init to provide an option create and use a version catalog
  • [#24217] - Document GRADLE_LIBS_REPO_OVERRIDE
  • [#23889] - Project isolation: class not found exception if a model is queried twice
  • [#23840] - Have a public API to tell if project isolation is enabled.
  • [#23495] - Investigate implications of using DefaultJvmVariantBuilder in component-centric model.
  • [#23471] - Confusing Licensing Information in Gradle User Manual
  • [#23208] - ResolvedArtifact returns incorrect extension for certain artifacts
  • [#22908] - Nag for deprecation of BasePluginExtension members
  • [#22468] - `VersionCatalogExtension` not added to the `gradle-kotlin-dsl-accessors` during `generatePrecompiledScriptPluginAccessors`
  • [#21902] - Add deprecation logging to org.gradle.util.VersionNumber
  • [#20834] - Add an option to only generate plaintext and not binary for `--export-keys`
  • [#20191] - Use the same case for dependency verification metadata and keyring
  • [#19044] - Outgoing artifacts as provider of a task output cause the failure
  • [#17589] - Resolve dependencies around ValidationProblemId enum
  • [#16697] - Wrong licensing legal advice in application plugin documentation?
  • [#16587] - Dependency verification's trusted keys is case sensitive
  • [#16506] - Settings scripts and plugins should provide APIs to create RegularFile and Directory instances according to the settings layout
  • [#14968] - Please include LICENSE in gradle-wrapper.jar
  • [#13968] - There should be a public API for creating CopySpec instances at execution time
  • [#12009] - DirectoryProperty cannot be used with @Option, throws an obscure exception
  • [#5748] - Sync task doesn't handle "." as an "into" subpath correctly

New in Gradle 8.4 RC 2 (Sep 26, 2023)

  • New features, performance, and usability improvements:
  • Support for building projects with Java 21:
  • Gradle now supports using Java 21 for compiling, testing, and starting other Java programs. This can be accomplished using toolchains.
  • Currently, you cannot run Gradle on Java 21 because Kotlin lacks support for JDK 21. However, support for running Gradle with Java 21 is expected in future versions.
  • Faster Java compilation on Windows:
  • Gradle 8.3 made Java compilation faster, by keeping compiler daemons alive between builds. Until now, this optimization was only supported on Linux and macOS.
  • With this release, persistent Java compiler daemons are also supported on Windows. No configuration changes are required to enable this feature.
  • Easier to create role-focused Configurations:
  • The ConfigurationContainer now exposes factory methods to create Configurations that are only intended for a single purpose. Previously, the only way to specify a Configuration role would be by mutating the canBeConsumed, canBeResolved, and canBeDeclared properties. Now, the new factory methods can create Configurations with an immutable role specified upon creation.
  • These factory methods are primarily targeted towards plugin authors. Using these factory methods, plugin authors can ensure that the Configurations are used for their intended purpose, as the role of Configurations created with these factory methods cannot be mutated.
  • The ConfigurationContainer defines three concrete Configuration types:
  • Consumable - Models the outgoing variants of a project component.
  • Resolvable - Acts as the root of a dependency graph.
  • Dependency Scope - Collects dependencies, constraints, and exclude rules to be used by Consumable and Resolvable configurations.
  • Dependencies cannot be declared on configurations created with the consumable and resolvable factory methods. A configuration with one role cannot perform the functions of another.
  • Gradle core plugins will migrate their configurations to use role-locked configurations in Gradle 9.0. Furthermore, in future versions of Gradle, the ability to mutate roles or create Configurations without the factory methods will become increasingly restricted.
  • Kotlin DSL improvements:
  • Gradle's Kotlin DSL provides an enhanced editing experience in supported IDEs compared to the traditional Groovy DSL — auto-completion, smart content assist, quick access to documentation, navigation to source, and context-aware refactoring.
  • The embedded Kotlin has been upgraded to 1.9.10:
  • The embedded Kotlin has been updated from 1.9.0 to Kotlin 1.9.10.
  • Links to GitHub sources in Kotlin DSL Reference:
  • The Kotlin DSL Reference guide now contains links to the source code of all Kotlin and Java types, functions, and properties. The links point to GitHub and are specific to the version of the code the guide is documenting.
  • Other improvements:
  • Memory settings of code quality tools for larger code bases:
  • Gradle uses worker processes to run code quality tools like Checkstyle, CodeNarc, and PMD. On larger code bases, these workers can require more memory than what Gradle provides by default.
  • In this release, Gradle supports configuring the workers' minimum and maximum heap sizes on all code-quality tasks, so that larger projects can configure memory required to run their builds. These options are available on the different tasks for these tools.
  • Improved Checkstyle HTML report format:
  • The default Checkstyle HTML report has been improved to show only the files with violations and correctly link to those files from the summary table.
  • The report also contains the version of Gradle and Checkstyle used to analyze the sources.
  • Introduce JetBrains as a known JVM vendor:
  • It is now possible to use JetBrains as a known JVM vendor of Toolchains when referring to JetBrains Runtime when using :
  • java {
  • toolchain {
  • languageVersion.set(JavaLanguageVersion.of(17))
  • vendor.set(JvmVendorSpec.JETBRAINS)
  • Filter method for Provider and Property:
  • The filter method has been added to Provider and Property to allow filtering of a value.
  • val property = objects.property<String>()
  • property.set("foobar")
  • val matches = property.filter { it.contains("foo") } // still contains "foo"
  • val doesntMatch = property.filter { it.contains("baz") } // is empty
  • Note that filter is evaluated lazily, so the predicate is only evaluated when the value is queried.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Simple property assignment in Kotlin DSL is now stable
  • Gradle 8.1 introduced a simpler way to assign values to lazy property types in Kotlin scripts using the = operator instead of the set() method. This new assignment operator was enabled by default in 8.2 and in this release it is marked stable.
  • Fixed issues:
  • 92 issues have been fixed in Gradle 8.4.
  • [#26298] - Intermittent NPE in dependency resolution after upgrading to 8.3
  • [#26271] - Closure control flow tracking in dynamic calls interception may leak references to closures throwing exceptions
  • [#26258] - Update configuration cache compatibility matrix to reflect Ear plugin is CC compatible
  • [#26206] - TestLauncher cannot launch tests from included builds when CC is enabled
  • [#26195] - TestLauncher reports test success even if test fails
  • [#26174] - Beanify `DocLink`
  • [#26160] - Shellcheck shows warnings for the wrapper shell script
  • [#26154] - 8.1 configuration is stuck at 100% for a while when signing is enabled
  • [#26147] - NPE in Gradle annotation processor handling
  • [#26139] - Add explanation for deprecations to dependency management documentation
  • [#26087] - Upgrade embedded Kotlin to 1.9.10
  • [#26086] - --scan option overrides Gradle enterprise plugin version from includedBuild
  • [#26085] - Running tests in :core runs full Groovy recompilation
  • [#26056] - TestLauncher cannot run the same test in different test tasks if configuration cache is enabled
  • [#26053] - Intercepting Groovy dynamic calls stops working in subsequent builds reusing a running daemon
  • [#26049] - Setting org.gradle.unsafe.isolated-projects not causing recalculation of configuration cache
  • [#25990] - Process property upgrades in each subproject separately
  • [#25987] - Auto-discover classes with upgraded properties
  • [#25958] - Comment in Unix wrapper code w.r.t. shell expansion of environment variables is wrong/misleading
  • [#25951] - BuildDashboard causes "Unable to make progress running work" error
  • [#25947] - JUnitJupiterCategoriesOrTagsCoverageIntegrationTest#"can combine tags with custom extension" fails on German OS
  • [#25945] - Upgrade Guava 31.1 -> 32.1.1 for security patches
  • [#25943] - Use of deprecated plexus-cipher plugin results in insecure randomness
  • [#25916] - Print Android Studio logs in the performance tests on sync failure
  • [#25908] - ArtifactView withVariantReselection improperly reselects dependencies with explicit artifacts
  • [#25905] - Daemon client fails while closing connection to the daemon
  • [#25894] - Fix class loading issues for `:test-kit` project with property upgrades
  • [#25893] - Fix class loading of classes that have property upgrades
  • [#25877] - Add missing JUnit4 test cases in R83 TestFailureProgressEventCrossVersionTest
  • [#25870] - Cross compiling windows resources to Windows Arm64 is broken
  • [#25863] - Fix and re-enable persistent compiler daemons on Windows
  • [#25859] - Test filtering in TestNG leads to no tests executing when configuration cache enabled
  • [#25857] - [Gradle + TestNg] Listener initialization failures not logged in the build log/console
  • [#25855] - TestNG Sample tests leaking files with CC enabled
  • [#25837] - Create List, Set and Map live view proxies for upgraded ListProperty, SetProperty and MapProperty
  • [#25835] - PropertyUpgradeClassSourceGenerator should generate `.getOrNull()` calls instead of `.get()`
  • [#25834] - Heap usage regression in 8.3-rc-1
  • [#25830] - FilePermissions has a typo in the default unix value
  • [#25828] - Test suits dependencies block fails when adding a platform defined in Version Catalog
  • [#25805] - Finish release notes and documentation for new configuration factory methods
  • [#25798] - Gradle Conflict Resolution documentation potentially has wrong logic for base version and qualifier parsing
  • [#25756] - Add actionable information to dependency locking error messages
  • [#25742] - Add deprecation warning to KotlinDslAssignment class
  • [#25736] - Add TAPI support for wrapped assertion failures
  • [#25732] - Handle Property/ConfigurableFileCollection with Groovy in BeanDynamicObject when only getter exists
  • [#25651] - `TaskExecutionGraph#getAllTasks` does not behave as documented
  • [#25628] - DefaultJvmMetadataDetector#getMetadataFromInstallation misses Xmx, so the JVM might allocate significant amount of memory
  • [#25612] - Update TestKit documentation
  • [#25604] - `JvmTestSuites` does not use the `DependencySet` passed to it, causing failures if you have a configuration copy
  • [#25573] - Support compiling and testing with Java 21
  • [#25546] - PMD runs out of Memory running over large source sets in versions 8.1.+
  • [#25530] - Dependency locking fails when lockfile is corrupted
  • [#25434] - Instrumentation of multi-release JARs should not fail on newer versions
  • [#25311] - Test.afterTest is not called with Configuration Cache
  • [#25272] - --no-daemon does not work and returns an unhelpful error message
  • [#25044] - Classpath instrumentation of NIO.2 operations fails for paths in zip archives
  • [#24795] - Upgrade Apache Ivy plugin version to 2.5.1
  • [#24726] - `CommandLineArgumentProvider` documentation eagerly calls `get()` on provider
  • [#24716] - Intercept getters (and setters) in Groovy closures
  • [#24712] - Support for capturing methods declared in supertypes
  • [#24660] - Add links to sources in Kotlin DSL reference
  • [#24613] - TestNG test listeners not invoked when configuration cache enabled
  • [#24575] - Hanging output rendering after exception during rendering
  • [#24508] - Docs: add 'extra properties' example in 'Migrating build logic from Groovy to Kotlin'
  • [#24326] - ResolvableDependencies#getResolutionResult javadocs are confusing
  • [#24314] - Documentation for setting values in the build environment is confusing
  • [#24093] - Use Kotlin Property assignment in documentation samples
  • [#23503] - Make Kotlin DSL assignment overload a stable feature
  • [#23249] - Don't discard Instrumented listener before storing the work graph
  • [#23084] - Gradle Init w/ incubating features does not place conventions plugins into build-logic when migrating maven projects
  • [#23014] - Configuration caching broken when adding to a MapProperty Task input from a file
  • [#22978] - Documentation icons need label
  • [#22968] - Kotlin DSL generated accessors for JVM types are typed Any, should be typed properly instead
  • [#22329] - How about adding JBR as known java toolchain vendor?
  • [#22273] - Adding the `--scan` option can produce cache misses due to changed order for the `Settings` buildscript classpath
  • [#22272] - Adding the `--scan` option can result in a different version of the GE plugin applied
  • [#21796] - Report deprecation of Provider.forUseAtConfigurationTime()
  • [#21676] - Gradle Daemon Information
  • [#21392] - Update Zinc used by Scala plugin to 1.7.1
  • [#19981] - Provider should have a filter method
  • [#18818] - The file checkstyle-noframes-sorted.xsl is actually LGPL, not Apache 2.0
  • [#17489] - Lacking definition of "project" in docs
  • [#16777] - 7.0: Querying the mapped value ... before task ... has completed is not supported caused by LazyPublishArtifact
  • [#14897] - Gradle should reuse files in jars-8 instead of producing duplicates
  • [#12273] - Documentation to upgrade wrapper is misleading
  • [#10771] - Type information lost on Kotlin DSL accessors to typed Java lambda extensions
  • [#10517] - Unable to use @Option with ListProperty/SetProperty
  • [#9834] - Propose new API to declare different types of 'configurations'
  • [#9268] - Concise and statically-typed `Property<T>` assignment
  • [#26504] - 8.4-RC1: Release notes: Confusing sample of the configuration api
  • [#26465] - Configuration cache state could not be cached: error writing value of type 'org.gradle.kotlin.dsl.KotlinClosure1' > value.owner must not be null
  • [#26359] - Clarify page title and filter buttons/tabs in the Kotlin DSL reference

New in Gradle 8.3 (Aug 17, 2023)

  • Full Support for Java 20:
  • Gradle 8.1 supported compiling and testing with Java 20 using Java toolchains, but running Gradle itself on Java 20 was not yet supported.
  • With this release, Gradle now fully supports compiling, testing and running on Java 20.
  • Reduced memory consumption:
  • Gradle is now using less memory during dependency resolution. This should benefit most builds, but the gains will be more substantial for the IDE sync process, particularly for builds doing lots of dependency resolution.
  • Kotlin DSL improvements:
  • Gradle's Kotlin DSL provides an enhanced editing experience in supported IDEs compared to the traditional Groovy DSL — auto-completion, smart content assist, quick access to documentation, navigation to source, and context-aware refactoring.
  • Kotlin DSL has received substantial improvements in recent releases, leading to the announcement that Kotlin DSL is Now the Default for New Gradle Builds. This release brings another series of improvements.
  • Improved CodeNarc output:
  • The CodeNarc plugin produces IDE-clickable links when reporting failures to the console. The CodeNarc task also produces clickable links in failure messages to human-readable reports when multiple reports are enabled.
  • Dry run mode for test execution:
  • When testing your project, it may be useful to check which of the tests that you selected would run without actually executing them, especially when using test filtering.
  • This release introduces a test dry run mode, which can be enabled by either the --test-dry-run command-line option or via the dryRun property.
  • This mode is compatible with the JUnit and TestNG frameworks.
  • Group opposite boolean build and task options together:
  • In previous Gradle releases, the console output of the help task rendered options in alphabetical order. This made it harder to see boolean options that have opposing settings.
  • For better readability, this has been changed to group opposite boolean options together.
  • Maven toolchain declarations with environment variables are now supported:
  • Using toolchains is the recommended way of specifying Java versions for JVM projects. By default, Gradle automatically detects local JRE/JDK installations so no further configuration is required by the user. One of the auto-detection formats that Gradle supports is Maven Toolchain specification.
  • Fixed issues:
  • [#25795] - Spurious warning `No valid plugin descriptors were found in META-INF/gradle-plugins` when using CC
  • [#25792] - Tooling API should provide expected and actual values for file comparison failures
  • [#25745] - Instrumentation of multi-release JARs should not fail on versioned Java 21 bytecode
  • [#25709] - Recent changes in script parsing produce unexpected warning
  • [#25555] - Suppress unactionable error message when importing Gradle multiproject using kotlin DSL into IntelliJ
  • [#25540] - Assumptions about project locking do not hold with load-after-store in WorkerExecutorParallelIntegrationTest
  • [#25517] - Upgrade embedded Kotlin to 1.9.0
  • [#25492] - Enhance `ExceptionMetadataHelper` to better classify `VerificationExceptions`
  • [#25460] - Allow the Kotlin DSL to use Kotlin 2.0 dependencies
  • [#25452] - Support Codenarc IDE-friendly output
  • [#25429] - Integration tests failing with non-ASCII characters
  • [#25425] - Persistent Java compiler daemons
  • [#25418] - Add a temporary flag to disable considering File.exists() checks for configuration cache input
  • [#25416] - Deadlock in parallel model building with Android Studio Hedgehog Canary 8
  • [#25388] - For windows the value for environmental variable is having the wrong slash
  • [#25370] - TestLauncher cannot run tests on tasks extending AbstractTestTask
  • [#25361] - Task stuck in 100% CPU loop within FinalizerGroup/DefaultExecutionPlan.finalizePlan on Gradle 7.6+
  • [#25350] - Test assertion failure reported incorrectly in the Tooling API
  • [#25307] - `RepositoriesMode.FAIL_ON_PROJECT_REPOS` does not fail for `subprojects` configurations
  • [#25198] - The validatePlugins task stopped working in Gradle 8.1
  • [#25178] - Run Gradle test suite with Project Isolation enabled
  • [#25164] - Calls to `File.list()` fails in `settings.gradle.kts` with configuration cache enabled (Kotlin DSL)
  • [#25159] - Gradle 8.1 and 8.1.1 alter Gradle application bytecode so that it fails anti-tamper check.
  • [#25127] - Create AttributeCompatibilityRules: How to get attributesSchema
  • [#25096] - Indicate that StartParameter.getProjectCacheDir is not a directory that plugins can write to
  • [#25036] - The gradle wrapper shell script fails to run when $CDPATH is set (and used to change directoy)
  • [#25029] - Worker Daemon is not reused on Mac OS
  • [#24979] - `java.net.URL` serialization depends on `hashCode` which creates cache misses
  • [#24932] - Reduce the amount of heap retained for models received by tooling API BuildAction instances
  • [#24884] - An internal error when publishing scans using init scripts
  • [#24879] - Improvements for injected services instrumentation
  • [#24857] - Document new file permission API
  • [#24816] - Re-enable Kotlin compilation avoidance in projects applying the `kotlin-dsl` plugin
  • [#24796] - Reduce heap consumed to track variants during dependency resolution
  • [#24792] - Need a -D flag, and option for enabling "continue" option in gradle.properties
  • [#24770] - Create initial JVM platform
  • [#24765] - InvocationTargetException when configuring `developer` in MavenPublication on Java 8 with configuration cache
  • [#24704] - Group opposite task options together
  • [#24670] - Document how to contribute custom suggestions to build failures
  • [#24614] - Loss of display name metadata when properties stored to configuration cache
  • [#24596] - Toolchains: Support Environment Variables in Maven Toolchains Declarations
  • [#24576] - `NegativeArraySizeException` during progress rendering
  • [#24571] - Refactor JUnit multiversion testing
  • [#24560] - Use consistent presentation for suggestions in toolchain errors
  • [#24503] - Kotlin Dsl: operator fun NamedDomainObjectProvider<Configuration>.invoke
  • [#24405] - Gradle crashes when trying to serialize nested extension object on task
  • [#24289] - Configuration cache incorrectly captures task
  • [#24248] - Suggestion: avoid distraction with config cache report
  • [#24216] - Investigate possible deprecation of ClientModule dependencies
  • [#24022] - gradle cannot load HTTPS dependencies on RHEL8 in FIPS mode
  • [#23963] - NullPointerException thrown converting Maven POM
  • [#23196] - Project isolation compatibility with build scripts tracing
  • [#23049] - Validate use of `@Nested` with unsupported types
  • [#22545] - Misleading "No valid plugin descriptors" is shown when running from the configuration cache
  • [#21913] - Add deprecation logging to org.gradle.util.NameMatcher
  • [#21912] - Add deprecation logging to org.gradle.util.GUtil.loadProperties()
  • [#21899] - Add deprecation logging to org.gradle.util.GUtil.toWords(string)
  • [#21492] - Deprecation message after migration to 7.4.2 with 'org.gradle.parallel'
  • [#21171] - FileCopyDetails.setMode should have a better API for Kotlin DSL
  • [#21094] - IvyPublication#artifact should support Provider
  • [#20640] - Missing Example Project Link on Docs
  • [#20210] - Deprecate Project.getBuildDir()
  • [#20131] - err: "expression expected" if build script consists only of plugins block and an annotation above the block
  • [#19827] - In a multi-project build of java modules, gradle eclipse plugin does not add projects to eclipse module path
  • [#17810] - IDE project sync has memory leak in ProtocolToModelAdapter
  • [#16154] - file-annotation in Kotlin DSL pre-compiled script plugin with package disturbs discovery
  • [#13843] - Process isolated workers always use system default encoding for file names
  • [#12682] - debug cacerts usage
  • [#11516] - Support OSX KeyChain as Truststore
  • [#7897] - Gradle fails with cryptic error when `plugins {}` contains unexpected code
  • [#6584] - Unable to use Windows SSL trust store
  • [#25291] - Refactor WrapperDistributionUrlResolver
  • [#7452] - Introduce an easy fail if no tests config option
  • [#25872] - Allow platform developers to see all the nagging with location
  • [#25868] - Gradle 8.3 won't allow plugin authors to support Gradle <7.0
  • [#25841] - Gradle 8.3-rc-1 creates compileJava Task on empty Kotlin project
  • [#23488] - Support running Gradle on Java 20
  • [#25975] - Configuration cache space usage analysis broken with Gradle 8.3-rc-2
  • [#25924] - The value for property 'dirPermissions' is final and cannot be changed any further.
  • [#26061] - 8.3-rc-3: The value for property 'languageVersion' is final and cannot be changed any further
  • [#26018] - Nested property types declared in kotlinx libraries are not supported since 8.3

New in Gradle 8.3 RC 3 (Aug 3, 2023)

  • Faster Java compilation:
  • When compiling Java code, Gradle uses worker processes to run the Java compiler as a compiler daemon. This allows the Java compiler to "warm up" and compile faster after a few uses. Reusing compiler daemons within a single build invocation speeds up overall build performance as every compile task can potentially execute more quickly.
  • In previous Gradle releases, the compiler daemons were shut down at the end of the build. This caused every build to incur the cost of starting the compiler daemon and warming up the compiler. These start-up costs contributed to a large portion of overall build time when incrementally compiling a few source files.
  • Starting with this release, Gradle attempts to keep Java compiler daemons alive after the end of the build, so that subsequent builds are faster.
  • Gradle will stop compiler daemons only when Gradle needs to free up resources.
  • The performance benefit these persistent compiler daemons introduce can vary depending on a wide range of factors. However, Gradle's internal performance tests show up to a 30% build time improvement for builds that are dominated by compiling Java sources.
  • No configuration changes are required to enable this feature. Persistent compiler daemons are currently supported on Linux and MacOS. Support on the Windows platform will follow in a subsequent release.
  • Full Support for Java 20:
  • Gradle 8.1 supported compiling and testing with Java 20 using Java toolchains, but running Gradle itself on Java 20 was not yet supported.
  • With this release, Gradle now fully supports compiling, testing and running on Java 20.
  • See the full compatibility documentation for details.
  • Reduced memory consumption:
  • Gradle is now using less memory during dependency resolution. This should benefit most builds, but the gains will be more substantial for the IDE sync process, particularly for builds doing lots of dependency resolution.
  • Performance results measured with syncing a large Android project with the latest stable Android Studio.
  • Although the changes should benefit most builds, we are aware of a regression affecting builds that rely a lot on detached configurations. This specific case will be fixed in a later release.
  • Kotlin DSL improvements:
  • Gradle's Kotlin DSL provides an enhanced editing experience in supported IDEs compared to the traditional Groovy DSL — auto-completion, smart content assist, quick access to documentation, navigation to source, and context-aware refactoring.
  • Kotlin DSL has received substantial improvements in recent releases, leading to the announcement that Kotlin DSL is Now the Default for New Gradle Builds. This release brings another series of improvements.
  • Simplified plugin request when needing the embedded Kotlin version:
  • Gradle allows using kotlin(String) as a shortcut to apply plugins in the org.jetbrains namespace. However this requires specifying the version of the plugin to apply.
  • Starting with this Gradle version, you can use embeddedKotlin() instead:
  • plugins {
  • embeddedKotlin("plugin.serialization")
  • This will result in applying the plugin with a version matching the Kotlin version embedded in Gradle.
  • Build scripts now accept dependencies compiled with Kotlin K2 compiler:
  • As announced by the Kotlin team, the K2 compiler is going stable in Kotlin 2.0.
  • Starting with Kotlin 1.9.0-RC and until the release of Kotlin 2.0, you can easily test the K2 compiler in your Gradle projects. In order to do so, add -Pkotlin.experimental.tryK2=true to your command line invocations or add it to your gradle.properties file:
  • kotlin.experimental.tryK2=true
  • Setting this Gradle property also sets the language version to 2.0.
  • Starting with this version of Gradle, the compilation of .gradle.kts build scripts accepts dependencies compiled with Kotlin K2 compiler. This makes it possible to try out K2 in builds that use Kotlin 1.9 and have Kotlin code in buildSrc or in included builds for build logic.
  • Note that if you use the kotlin-dsl plugin in your build logic, you will need to explicitly set the Kotlin language version to 2.0:
  • tasks.withType<KotlinCompile>().configureEach {
  • compilerOptions {
  • apiVersion = KotlinVersion.KOTLIN_2_0
  • languageVersion = KotlinVersion.KOTLIN_2_0
  • Note that at this stage, K2 doesn't support scripting, so it will not work with precompiled script plugins.
  • Specify file permissions conveniently:
  • Setting file permissions as UNIX mode values is inconvenient since Kotlin doesn’t support octal numeric literals: instead of mode = 0755 one has to write mode = "755".toInt(radix = 8).
  • There is now a better API for setting file permissions and extra convenience methods for UNIX-style values.
  • The embedded Kotlin has been upgraded to 1.9.0:
  • The embedded Kotlin has been updated from 1.8.20 to Kotlin 1.9.0, unblocking the support for running on Java 20.
  • The Kotlin language and API levels for the Kotlin DSL are still set to 1.8 for backward compatibility. See the release notes for Kotlin 1.8.22 and Kotlin 1.8.21.
  • Configuration cache:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing it for subsequent builds. This feature can significantly improve build performance.
  • Temporarily opting out of stricter configuration inputs detection:
  • To ensure correctness, the configuration cache detects undeclared inputs when plugins or build logic perform file system checks such as File.exists() or File.isFile(). However, not all plugins are updated to properly declare all inputs, leading to cache misses and suboptimal performance.
  • Configuration cache now has an opt-out option for temporarily ignoring such undeclared inputs.
  • This option mitigates undesired configuration cache misses until the plugins are properly updated.
  • See the corresponding section in the user guide for details.
  • The configuration cache summary is no longer produced if no problems are encountered:
  • When the configuration cache feature is enabled, a configuration cache report is produced at path-to-project/build/reports/configuration-cache/<hash>/configuration-cache-report.html if any configuration cache-related problems are found, or if any configuration inputs are detected.
  • In previous releases, when a report was produced (because problems were found, or inputs were detected), the build output always included a summary conveying the number of problems found, and a link to the configuration cache report
  • Starting with this release, the summary will only be produced if the report includes any problems. The summary will be omitted if the report only contains information on the configuration inputs.
  • Note the report is still generated if any problems are found or inputs detected; only the summary is omitted from the console output.
  • It is possible to force the summary to be produced even if no configuration cache-related problems are found by specifying the --info option.
  • Improved CodeNarc output:
  • The CodeNarc plugin produces IDE-clickable links when reporting failures to the console. The CodeNarc task also produces clickable links in failure messages to human-readable reports when multiple reports are enabled.
  • The HTML report generated by CodeNarc has been updated to produce violation reports with sortable columns.
  • Dry run mode for test execution
  • When testing your project, it may be useful to check which of the tests that you selected would run without actually executing them, especially when using test filtering.
  • This release introduces a test dry run mode, which can be enabled by either the --test-dry-run command-line option or via the dryRun property.
  • This mode is compatible with the JUnit and TestNG frameworks.
  • Group opposite boolean build and task options together
  • In previous Gradle releases, the console output of the help task rendered options in alphabetical order. This made it harder to see boolean options that have opposing settings.
  • For better readability, this has been changed to group opposite boolean options together.
  • Disable options are now sorted after their enable options.
  • Maven toolchain declarations with environment variables are now supported:
  • Using toolchains is the recommended way of specifying Java versions for JVM projects. By default, Gradle automatically detects local JRE/JDK installations so no further configuration is required by the user. One of the auto-detection formats that Gradle supports is Maven Toolchain specification.
  • With this Gradle release, if you rely on the integration with Maven toolchain definitions, Gradle now supports the use of environment variables placeholders inside toolchain.xml files. The placeholder will be resolved by looking at environment variables known to the Gradle build.
  • SSL improvements for non-standard keystores and truststores:
  • Previously, Gradle exhibited limitations when interfacing with non-standard keystores and truststores. This affected users on Linux systems with FIPS enabled and also Windows users who were storing certificates in the Trusted Root Certification Authorities store.
  • SSL context creation has been improved to be more aligned with the default implementation and to support these cases.
  • Fixed issues:
  • 78 issues have been fixed in Gradle 8.3.
  • [#25795] - Spurious warning `No valid plugin descriptors were found in META-INF/gradle-plugins` when using CC
  • [#25792] - Tooling API should provide expected and actual values for file comparison failures
  • [#25745] - Instrumentation of multi-release JARs should not fail on versioned Java 21 bytecode
  • [#25709] - Recent changes in script parsing produce unexpected warning
  • [#25555] - Suppress unactionable error message when importing Gradle multiproject using kotlin DSL into IntelliJ
  • [#25540] - Assumptions about project locking do not hold with load-after-store in WorkerExecutorParallelIntegrationTest
  • [#25517] - Upgrade embedded Kotlin to 1.9.0
  • [#25492] - Enhance `ExceptionMetadataHelper` to better classify `VerificationExceptions`
  • [#25460] - Allow the Kotlin DSL to use Kotlin 2.0 dependencies
  • [#25452] - Support Codenarc IDE-friendly output
  • [#25429] - Integration tests failing with non-ASCII characters
  • [#25425] - Persistent Java compiler daemons
  • [#25418] - Add a temporary flag to disable considering File.exists() checks for configuration cache input
  • [#25416] - Deadlock in parallel model building with Android Studio Hedgehog Canary 8
  • [#25388] - For windows the value for environmental variable is having the wrong slash
  • [#25370] - TestLauncher cannot run tests on tasks extending AbstractTestTask
  • [#25361] - Task stuck in 100% CPU loop within FinalizerGroup/DefaultExecutionPlan.finalizePlan on Gradle 7.6+
  • [#25350] - Test assertion failure reported incorrectly in the Tooling API
  • [#25307] - `RepositoriesMode.FAIL_ON_PROJECT_REPOS` does not fail for `subprojects` configurations
  • [#25198] - The validatePlugins task stopped working in Gradle 8.1
  • [#25178] - Run Gradle test suite with Project Isolation enabled
  • [#25164] - Calls to `File.list()` fails in `settings.gradle.kts` with configuration cache enabled (Kotlin DSL)
  • [#25159] - Gradle 8.1 and 8.1.1 alter Gradle application bytecode so that it fails anti-tamper check.
  • [#25127] - Create AttributeCompatibilityRules: How to get attributesSchema
  • [#25096] - Indicate that StartParameter.getProjectCacheDir is not a directory that plugins can write to
  • [#25036] - The gradle wrapper shell script fails to run when $CDPATH is set (and used to change directoy)
  • [#25029] - Worker Daemon is not reused on Mac OS
  • [#24979] - `java.net.URL` serialization depends on `hashCode` which creates cache misses
  • [#24932] - Reduce the amount of heap retained for models received by tooling API BuildAction instances
  • [#24884] - An internal error when publishing scans using init scripts
  • [#24879] - Improvements for injected services instrumentation
  • [#24857] - Document new file permission API
  • [#24816] - Re-enable Kotlin compilation avoidance in projects applying the `kotlin-dsl` plugin
  • [#24796] - Reduce heap consumed to track variants during dependency resolution
  • [#24792] - Need a -D flag, and option for enabling "continue" option in gradle.properties
  • [#24770] - Create initial JVM platform
  • [#24765] - InvocationTargetException when configuring `developer` in MavenPublication on Java 8 with configuration cache
  • [#24704] - Group opposite task options together
  • [#24670] - Document how to contribute custom suggestions to build failures
  • [#24614] - Loss of display name metadata when properties stored to configuration cache
  • [#24596] - Toolchains: Support Environment Variables in Maven Toolchains Declarations
  • [#24576] - `NegativeArraySizeException` during progress rendering
  • [#24571] - Refactor JUnit multiversion testing
  • [#24560] - Use consistent presentation for suggestions in toolchain errors
  • [#24503] - Kotlin Dsl: operator fun NamedDomainObjectProvider<Configuration>.invoke
  • [#24405] - Gradle crashes when trying to serialize nested extension object on task
  • [#24289] - Configuration cache incorrectly captures task
  • [#24248] - Suggestion: avoid distraction with config cache report
  • [#24216] - Investigate possible deprecation of ClientModule dependencies
  • [#24022] - gradle cannot load HTTPS dependencies on RHEL8 in FIPS mode
  • [#23963] - NullPointerException thrown converting Maven POM
  • [#23196] - Project isolation compatibility with build scripts tracing
  • [#23049] - Validate use of `@Nested` with unsupported types
  • [#22545] - Misleading "No valid plugin descriptors" is shown when running from the configuration cache
  • [#21913] - Add deprecation logging to org.gradle.util.NameMatcher
  • [#21912] - Add deprecation logging to org.gradle.util.GUtil.loadProperties()
  • [#21899] - Add deprecation logging to org.gradle.util.GUtil.toWords(string)
  • [#21492] - Deprecation message after migration to 7.4.2 with 'org.gradle.parallel'
  • [#21171] - FileCopyDetails.setMode should have a better API for Kotlin DSL
  • [#21094] - IvyPublication#artifact should support Provider
  • [#20640] - Missing Example Project Link on Docs
  • [#20210] - Deprecate Project.getBuildDir()
  • [#20131] - err: "expression expected" if build script consists only of plugins block and an annotation above the block
  • [#19827] - In a multi-project build of java modules, gradle eclipse plugin does not add projects to eclipse module path
  • [#17810] - IDE project sync has memory leak in ProtocolToModelAdapter
  • [#16154] - file-annotation in Kotlin DSL pre-compiled script plugin with package disturbs discovery
  • [#13843] - Process isolated workers always use system default encoding for file names
  • [#12682] - debug cacerts usage
  • [#7897] - Gradle fails with cryptic error when `plugins {}` contains unexpected code
  • [#6584] - Unable to use Windows SSL trust store
  • [#25291] - Refactor WrapperDistributionUrlResolver
  • [#7452] - Introduce an easy fail if no tests config option
  • [#25872] - Allow platform developers to see all the nagging with location
  • [#25868] - Gradle 8.3 won't allow plugin authors to support Gradle <7.0
  • [#25841] - Gradle 8.3-rc-1 creates compileJava Task on empty Kotlin project
  • [#23488] - Support running Gradle on Java 20
  • [#25975] - Configuration cache space usage analysis broken with Gradle 8.3-rc-2
  • [#25924] - The value for property 'dirPermissions' is final and cannot be changed any further.

New in Gradle 8.2 (Jun 30, 2023)

  • 76 issues have been fixed in Gradle 8.2:
  • [#25102] - Fix issues related to Kotlin DSL Reference docs
  • [#25033] - Test filters of TestLauncher should be respected when configuration cache is reused
  • [#25010] - Upgrade SnakeYAML
  • [#24994] - Gradle 8.2 milestone 1: Build Scan uses deprecated BuildIdentifier.getName
  • [#24980] - Config cache should support serializing `java.util.ArrayDeque`
  • [#24967] - Classcast Exception for Eclipse WTP
  • [#24966] - Include opposite task options in documentation
  • [#24904] - Configuration cache options missing from Build Environment > Gradle Properties documentation
  • [#24815] - Builds with the `kotlin-dsl` plugin cause OOMEs with Gradle version embedding Kotlin 1.8.20
  • [#24768] - Update dependencies / default versions
  • [#24741] - Allow opt-out for wrapper task test of distribution url
  • [#24708] - Remove or upgrade HikariCP dependency
  • [#24677] - Classpath dependencies in `buildscript` block of settings.gradle.kts do not invalidate the configuration cache
  • [#24661] - Splits source-sets in Kotlin DSL reference
  • [#24584] - Address performance regression in configuration cache for 8.1
  • [#24568] - Use consistent presentation for suggestions across Gradle
  • [#24567] - Unify formatting for suggesting Gradle documentation links
  • [#24537] - Publishing Gradle plugins to Ivy is not compatible with the configuration cache
  • [#24535] - Let gradle init default to the Kotlin DSL
  • [#24530] - Allow to configure Kotlin DSL script compiler to fail on warnings
  • [#24510] - Use consistent presentation for suggestions in dependency resolution errors
  • [#24500] - Working With Files doc errors
  • [#24482] - Test a subclassing of JavaExec
  • [#24468] - Consider removing the "Get help at..." suggestion in case of recoverable build failures
  • [#24467] - Consider removing the "--stacktrace" suggestion in case of recoverable build failures
  • [#24466] - Don’t show the `--stacktrace` suggestion for compilation failures
  • [#24464] - Consider removing the "--debug option to get more log output" suggestion in case of recoverable build failures
  • [#24423] - Hide the “Get more help at https://help.gradle.org” message for compilation failures
  • [#24404] - Dogfood `=` for ConfigurableFileCollection
  • [#24395] - Display link to docs when running build with ambigious project or task name
  • [#24371] - Move link to help.gradle.org to the suggestions list
  • [#24349] - Fix ArchUnit tests changing line numbers
  • [#24331] - Gradle 8+ breaks actionable "useJUnitPlatform" calls
  • [#24308] - Make "Gradle User Home" phrasing consistent in The Directories and Files Gradle Uses docs
  • [#24300] - Toolchain feature detects Java 8 JDK as a different Java version when inside an Alpine Linux container.
  • [#24283] - org.gradle.daemon.performance.enable-monitoring=false does not disable performance monitoring
  • [#24252] - Installing gradle under $HOME deleted all folders and files there
  • [#24251] - Refactor task and transform node id generations
  • [#24230] - Warn when JUnitPlatform tags are both included and excluded
  • [#24225] - Force run test when the full method path is specified on the command line
  • [#24139] - Emit warning when deprecated configuration usage is used
  • [#24133] - Add buildTreePath to BasicGradleProject
  • [#24096] - Upgrade embedded Kotlin to 1.8.20
  • [#24094] - Validate and use Kotlin Property assignment in smoke tests
  • [#24020] - Add Groovy 4.0.9 to test coverage
  • [#23986] - Document root project path `:`
  • [#23982] - Deprecate setAnnotationProcessorGeneratedSourcesDirectory
  • [#23960] - gradlew fails on POSIX systems that do not bundle which nor define JAVA_HOME
  • [#23865] - `FileNotFoundException` when setting capital `RC` when using the `wrapper --gradle-version`
  • [#23837] - Wrong project.gradle.parent
  • [#23803] - Properties implemented via `@Inject` provide access to incorrect `Project` state in builds running from configuration cache
  • [#23778] - Document 'required attributes' (which are mentioned, but not documented)
  • [#23650] - Enable back allWarningsAsErrors for Kotlin build scripts once Kotlin assignment plugin becomes stable
  • [#23607] - dependency verification should strip non-essential information from verification-keyring.keys
  • [#23563] - failing java toolchain download should have a more detailed error message.
  • [#23551] - Invalid artifactId is used in pluginMarkerMaven POM
  • [#23428] - Display a progress message when probing Java toolchains
  • [#23045] - Deprecate using non-String keys for nested map properties
  • [#22953] - Generated Gradle Kotlin DSL API docs might be outdated
  • [#22559] - Using a build service in a worker action should have an example
  • [#22255] - `finalizeValueOnRead` property value provider shouldn't be evaluated more than once
  • [#22051] - Add deprecation logging when build configures built-in conventions
  • [#21901] - Add deprecation logging to org.gradle.util.ConfigureUtil.configure(closure, target)
  • [#19867] - `StandardKotlinBuildScriptModel` contains exceptions from all projects
  • [#17176] - Add deprecation logging for Project.getConvention() and HasConvention.getConvention()
  • [#17006] - Unclear documentation inconsistency for `default` (and `archives`) configuration
  • [#16773] - Running 'gradlew wrapper --gradle-version' for a not existing version corrupts the wrapper.properties file
  • [#13955] - junit-platform test framework should contribute the `junit-platform-launcher` to the test runtime classpath
  • [#13467] - Make `ear` plugin support the configuration cache
  • [#4311] - Disable boolean `@Option`s from the command line
  • [#25253] - Gradle 8.2-rc-1 emits a false deprecation warning when trying to access an absent extension in Kotlin DSL using `the<T>` or `configure<T>`
  • [#25252] - Relative path is not working for distributionUrl on wrapper task since Gradle 8.2
  • [#25407] - Kotlin DSL allWarningsAsErrors for scripts is not taken into account until scripts get recompiled for another reason
  • [#25381] - Kotlin assignment is not marked as enabled for IntelliJ when gradle.properties file is missing
  • [#25363] - Import-Package is no longer populated with version numbers with bnd
  • [#25362] - Setting URL for repository used for publishing "late" is ignored

New in Gradle 8.1.1 (Apr 23, 2023)

  • It fixes the following issues:
  • #24748 MethodTooLargeException when instrumenting a class with thousand of lambdas for configuration cache
  • #24754 Kotlin DSL precompiled script plugins built with Gradle 8.1 cannot be used with other versions of Gradle
  • #24788 Gradle 8.1 configure freeCompilerArgs for Kotlin in buildSrc breaks build with unhelpful errors

New in Gradle 8.1 RC 1 (Mar 21, 2023)

  • New features, performance and usability improvements:
  • Configuration cache improvements:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing it for subsequent builds. This feature, now promoted to stable status, can significantly improve build performance.
  • Securing the configuration cache:
  • To mitigate the risk of accidental exposure of sensitive data, Gradle now encrypts the configuration cache. Gradle will transparently generate a machine-specific secret key as required, cache it under the Gradle user home directory and use it to encrypt the data in the project specific caches.
  • By default, the Gradle configuration cache is located under .gradle/configuration-cache in your project directory.
  • Every cache entry contains information about the set of tasks to run, along with their configuration and dependency information.
  • However, based on a task's implementation or the way it is configured by a plugin or build script, its configuration might contain sensitive information. It is crucial to keep this information secure.
  • To enhance security further, make sure to:
  • prevent the .gradle/configuration-cache folder from being committed to source control or exposed in CI environments;
  • secure the Gradle user home directory.
  • Dependency verification support:
  • The configuration cache now fully supports dependency verification. Changes to associated files (keyring files or verification-metadata.xml) are correctly detected and invalidate the configuration cache if necessary.
  • File system-based repositories support:
  • The configuration cache now fully supports file-system-based Ivy and Maven repositories. In particular, this release adds support for dynamic dependencies. Suppose a dynamic dependency is declared in the build script. In that case, changes to the dependency in the file-system-based repository now invalidate the configuration cache to pick up an updated version.
  • Expanded compatibility with core plugins:
  • The Ivy publishing plugin and the Signing plugin are now compatible with the configuration cache.
  • The current status of the configuration cache support for all core Gradle plugins can be found in the configuration cache documentation.
  • Support of Java lambdas:
  • Gradle can now restore user-provided lambdas from the configuration cache. Using anonymous classes to implement Single Abstract Method (SAM) interfaces is no longer necessary. This also applies to Kotlin code: there is no more need to configure the Kotlin compiler to generate classes instead of lambdas during SAM conversion.
  • This release also improves error reporting for lambdas that capture unsupported types, like Configuration.
  • Better error reporting for Groovy closures:
  • This release improves error reporting of unsupported method calls in Groovy closures. For example, a doFirst/doLast action uses a method or property of the Project, which is unsupported with the configuration cache
  • Previously, a confusing message of Could not get unknown property 'buildDir' for task ':echo' was displayed, but now the error is more accurate
  • Configuration inputs detection improvements:
  • The configuration cache needs to detect when the build logic accesses the "outside world" at configuration time (for example, reading files or environment variables) to invalidate the cache if accessed information changes. Every recent Gradle release added new detection capabilities, and this release is no exception. Gradle now detects:
  • FileCollections queried at configuration time.
  • Methods of java.io.File class used to check file existence and read directory contents.
  • Methods of java.nio.files.File class used to open files for reading and to check file existence.
  • Kotlin and Groovy helper methods used to read file contents.
  • Kotlin DSL improvements:
  • Gradle's Kotlin DSL provides an alternative syntax to the Groovy DSL with an enhanced editing experience in supported IDEs — superior content assistance, refactoring documentation, and more.
  • Experimental simple property assignment in Kotlin DSL scripts:
  • As an opt-in feature, it is now possible to use the = operator to assign values to Property types in Kotlin scripts as an alternative to the set() method. This reduces the verbosity of Kotlin DSL when lazy property types are used to configure tasks and extensions. It also makes Kotlin DSL behavior consistent with Groovy DSL behavior, where using = to assign lazy properties has always been available.
  • Lazy property assignment for Kotlin scripts is an experimental opt-in feature. It is enabled by adding systemProp.org.gradle.unsafe.kotlin.assignment=true to the gradle.properties file.
  • Access to version catalog for plugins in the plugins {} block:
  • Version catalog accessors for plugin aliases in the plugins {} block aren't shown as errors in IntelliJ IDEA and Android Studio Kotlin script editor anymore. If you were using a workaround for this before, see the corresponding section in the upgrading guide.
  • Useful deprecation warnings and errors from Kotlin script compilation:
  • Gradle Kotlin DSL scripts are compiled by Gradle during the configuration phase of your build.
  • Deprecation warnings found by the Kotlin compiler are now reported on the console when compiling build scripts. This makes it easier to spot usages of deprecated members in your build scripts.
  • Moreover, Kotlin DSL script compilation errors are now always reported in the order they appear in the file. This makes it easier to figure out the first root cause of a script compilation failure.
  • Easier access to extensions on the Gradle object:
  • The Gradle type now declares that it is ExtensionAware. This allows access to extensions without casting to ExtensionAware from Kotlin. This can be useful in initialization scripts.
  • Easier configuration of Test.forkEvery from Kotlin:
  • It is now easier to configure the forkEvery property of Test tasks from Kotlin to set the maximum number of test classes to execute in a forked test process. Instead of requiring to use its setForkEvery(<number>) setter you can now simply assign it a value
  • Improvements to development of Gradle plugins in Kotlin:
  • The kotlin-dsl plugin provides a convenient way to develop Kotlin-based plugins that contribute build logic.
  • In addition to plugins written as standalone projects, Gradle also allows you to provide build logic written in Kotlin as precompiled script plugins. You write these as *.gradle.kts files in src/main/kotlin directory.
  • Easier customization of Kotlin options:
  • Customization of Kotlin options in your build logic is now easier and no longer requires afterEvaluate {}.
  • The standalone script compilation for build scripts, init scripts, and applied scripts are configured to skip the pre-release check to allow referencing Kotlin code compiled with more recent Kotlin language versions on a best-effort basis.
  • The kotlin-dsl plugin is now published to the Gradle Plugin Portal with proper licensing information in its metadata. The plugin is published under the same license as the Gradle Build Tool: the Apache License Version 2.0.
  • This makes using the kotlin-dsl plugin easier in an enterprise setting where published licensing information is required.
  • Respect --offline when building precompiled script plugins:
  • Building precompiled script plugins now respects the --offline command line execution option.
  • This makes using Gradle plugins that react to --offline from precompiled script plugins easier.
  • Less verbose compilation with precompiled script plugins:
  • Building precompiled script plugins includes applying plugins to synthetic projects. This can produce some console output.
  • The output is now captured and only shown in case of failures. By default, this is now less verbose and does not clutter the console output.
  • Better validation of name and path of precompiled script plugins:
  • Precompiled script plugins must respect the documented naming conventions. Gradle will now fail with an explicit and helpful error message when naming conventions are not followed.
  • Moreover, .gradle.kts files present in resources src/main/resources are not considered as precompiled script plugins anymore. This makes it easier to ship Gradle Kotlin DSL scripts in plugins resources.
  • JVM:
  • Support for building projects with Java 20:
  • Gradle now supports using Java 20 for compiling, testing, and starting other Java programs. This can be accomplished by configuring your build or task to use a Java 20 toolchain.
  • You cannot currently run Gradle on Java 20 because Kotlin lacks support for JDK 20. However, you can expect support for running Gradle with Java 20 in a future version.
  • Faster Codenarc analysis with parallel execution by default:
  • The Codenarc plugin performs quality checks on your project’s Groovy source files using a static code analyzer. It now uses the Gradle worker API and JVM toolchains.
  • CodeNarc now performs analysis via an external worker process which allows it to run in parallel within a single project.
  • In Groovy projects, this tool will use the same version of Java the project requires. In other types of projects, it will use the same version of Java used by the Gradle daemon.
  • Other Improvements:
  • Gradle Wrapper introduces labels for selecting the version:
  • The --gradle-version parameter for the wrapper task now supports using predefined labels to select a version.
  • The recognized labels are:
  • latest selects the latest stable version
  • release-candidate selects the latest release candidate version
  • nightly selects the latest unstable nightly version
  • release-nightly selects the latest unstable nightly version for the next release
  • More details can be found in the Gradle Wrapper section.
  • Build Init plugin incubating flag enables more incubating features:
  • When generating a new project with the init task with the --incubating option, parallel project execution and task output caching will be enabled for the generated project by creating a gradle.properties file and setting the appropriate flags in it.
  • Better memory management:
  • To better manage memory usage, Gradle proactively stops unused worker processes before starting new ones.
  • Gradle first checks if the available physical memory can accommodate the maximum heap requirements of a new worker process. If not, it searches for unused worker processes that can be stopped to free up enough physical memory for the new process.
  • Previously, Gradle sought to acquire enough memory to satisfy the minimum heap requirements of the new process. However, in cases where the minimum heap and maximum heap of the worker process are very different, the memory freed up before the process starts may not be close to sufficient for the eventual size of the process.
  • Gradle now attempts to acquire enough memory to satisfy the new process's maximum heap requirements.
  • This causes the physical memory management to be more aggressive when starting up new processes, and in many cases, will result in better overall memory usage.
  • Easier consumption of Shared Build Services:
  • There is a new @ServiceReference annotation that makes it easier to consume shared build services.
  • By annotating a property with @ServiceReference, you no longer need to remember to explicitly declare that your task uses a shared build service via Task#usesService().
  • If you also provide the name of the service in the annotation, you no longer need to obtain and assign a build service reference to the property explicitly; if a service registration with the given name exists, the corresponding reference is automatically assigned to the property.
  • More details in the Shared Build Services documentation on using build services.
  • New Dataflow Actions replace buildFinished listeners:
  • Previously, Gradle had only Gradle.buildFinished listeners to handle the result of the build. For many reasons, this API doesn't work well with the configuration cache, but there were no proper replacements. With the new Dataflow Actions you can now schedule pieces of work to process the result of the build in a way that is configuration-cache compatible. For example, you can add code to play a sound when the build completes successfully
  • Unlike callbacks, actions provide the necessary level of isolation to ensure safe configuration caching.
  • In this release, dataflow actions only provide a replacement for the deprecated Gradle.buildFinished callback, but more options to add work outside the task graph are planned.
  • Gradle user home caches are ignored by backup tools that honor CACHEDIR.TAG:
  • Caches in the Gradle user home can become very large and typically do not contain files that need to be searched or backed up. The CACHEDIR.TAG specification proposes a way for archive and backup tools to automatically skip these directories, which makes it unnecessary to explicitly exclude them. Gradle now marks directories that should be ignored with a CACHEDIR.TAG file.
  • IDE Integration:
  • The following improvements are for IDE integrators. They will be available for end-users in future IDE releases once they are used by IDE vendors.
  • Builds launched via the IDE use the same log level as the command-line
  • Previously, when executing a build via the IDE, the log level settings provided in the project's gradle.properties file were ignored. Some IDE vendors worked around this shortcoming by setting the log level in other ways to meet user expectations.
  • The Tooling API now honors the org.gradle.logging.loglevel setting in the project's gradle.properties and applies it as expected to builds started from the IDE.
  • 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 manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Configuration cache:
  • The configuration cache feature is now officially out of incubation and is ready for general use. It is important to note, however, that utilizing this feature may require modifications to build logic and applied plugins to ensure full support.
  • The implementation of the configuration cache is not yet complete. However, you can expect the configuration cache to evolve with new features and enhancements in upcoming Gradle versions, offering support for a broader range of use cases. To explore the features currently under consideration for implementation, please refer to the documentation.
  • Enabling the configuration cache can yield a significant boost in build performance, as it caches the result of the configuration phase and reuses it for subsequent builds. This means that subsequent builds no longer have to re-execute the configuration phase, resulting in faster and more efficient builds.
  • Configuration cache was introduced as an experimental feature back in Gradle 6.6.
  • To learn how to benefit from this feature, refer to the Configuration Cache documentation.
  • Promoted features in the Provider API:
  • The ValueSource API is no longer incubating. The following classes and methods are now considered stable:
  • ProviderFactory.of(Class, Action)
  • ValueSource
  • ValueSourceParameters
  • ValueSourceParameters.None
  • ValueSourceSpec
  • Fixed issues:
  • 133 issues have been fixed in Gradle 8.1.
  • [#24236] - Artifact transforms should be allowed to run external processes
  • [#24229] - Upgrading to gradle 8.0.2 causes deadlock
  • [#24202] - Narrowing of return type in internal DepedencyResolutionServices breaks IDE tests
  • [#24197] - Gradle 8 reports incorrect Configuration flags despite being configured correctly
  • [#24149] - The `useJUnitPlatform` setting in `KotlinDSL` does not work correctly since Gradle 8.0
  • [#24103] - Gradle throws/catches a lot of exceptions in AttributeMatchingVariantSelector
  • [#24023] - `--scan` is ignored if configuration cache is reused
  • [#23997] - Exception thrown from ValueSource should be a configuration cache problem
  • [#23995] - JUnit 4.13 jar from gradle distribution should not leak into test runtime classpath
  • [#23968] - precompiled script plugin "is not supposed to be used along with regular Kotlin sources" in Gradle 8.1
  • [#23955] - The `kotlin-dsl` plugin using `afterEvaluate {}` to configure `KotlinCompile` tasks prevents further configuring them
  • [#23949] - Exclude rule merging: missing optimization
  • [#23919] - Reduce `OutputEventRenderer.onOutput()` locking by refine lock granularity
  • [#23885] - Configuration cache failure when tasks are excluded by path
  • [#23883] - Deprecate Test task default classpath and testClassesDirs
  • [#23861] - Anchor around example captions in the docs includes formatting tags verbatim
  • [#23818] - Remove testng from Maven migration integration test
  • [#23804] - buildSrc precompiled script plugin named `init.gradle.kts` causes obscure error: Failed to apply plugin class, Char sequence is empty
  • [#23785] - Gradle generates broken links in logs
  • [#23766] - gradle :help produces wrong output on warm configuration cache
  • [#23733] - Make help tasks plugin work with configuration cache/load-after-store
  • [#23732] - Make `dependencyInsight` work with CC/load-after-store
  • [#23728] - Make :dependentComponents work with Configuration Cache
  • [#23721] - Refactor the configuration cache instrumentation/interception machinery
  • [#23662] - Dependency verification documentation snippets should reference XSD
  • [#23625] - Potentially bad assertion in ClasspathUtil
  • [#23620] - Java toolchain auto-detection on linux should look in /usr/local/java
  • [#23614] - Building Java Modules with Blackbox Tests Sample new sample returns 404
  • [#23602] - Since Gradle 7.6 my integration tests fail - but report "BUILD SUCCESSFUL"
  • [#23564] - --offline is not respected for "synthetic root projects"
  • [#23554] - Fix Toolchain related test failures on M1 Macs
  • [#23546] - Consider supporting assignment overload for ConfigurableFileCollection
  • [#23534] - Reintroduce worker api for CodeNarc
  • [#23533] - Deprecate org.gradle.cache.cleanup property
  • [#23521] - Dependency graph resolution: Equivalent excludes can cause un-necessary graph mutations
  • [#23504] - Add documentation for Kotlin DSL assignment overloads
  • [#23502] - Dogfood Kotlin DSL assignment overload
  • [#23496] - Configure implicit receiver for `KotlinBuildScript`, `KotlinInitScript` and `KotlinSettingsScript`
  • [#23494] - Intermittent: "You must specify a base url or at least one artifact pattern for an Ivy repository" even when a base url is specified
  • [#23490] - Deprecate running Gradle workers on Java runtimes below 8
  • [#23489] - Support compiling and testing with Java 20
  • [#23362] - Document and promote use of ServiceReferences
  • [#23360] - When configuration cache is enabled report usages of `Gradle.useLogger()`
  • [#23305] - Investigate project.layout.buildDirectory property resolution errors on a warm cache
  • [#23302] - Signing plugin does not sign Gradle module metadata artifact for Ivy publication
  • [#23299] - Should avoid publishing an artifact if the task that created it was skipped
  • [#23298] - Use testSourceSets.add(sourceSets.functionalTest) instead of testSourceSets(sourceSets.functionalTest)
  • [#23297] - Enable agent-based instrumentation by default
  • [#23296] - Regression: Running codenarc against Groovy4 projects is broken
  • [#23286] - VersionConstraint.branch and ModuleDependency.endorsing are not copied when a dependency is copied.
  • [#23279] - Update documentation for configuration cache improvements in Gradle 8.1
  • [#23204] - Stricter validation in BuildServicesRegistry.registerIfAbsent fails in cases it worked before
  • [#23177] - Remove/replace retired lgtm
  • [#23160] - The `Gradle` type does not expose that it is `ExtensionAware` making accessing extensions and extra properties difficult in the Kotlin DSL
  • [#23155] - Add nagging for using `JvmVendorSpec.IBM_SEMERU`
  • [#23129] - Missing 'archiveName' attribute in eclipse wtp
  • [#23125] - `ValidatePlugins` task fails if configured Java Toolchain > Java running the build
  • [#23106] - Version catalogs: library names cannot end with `-class`
  • [#23032] - Allow configuration of Eclipse build directory
  • [#23021] - change title of upgrade doc for "7.x to latest" to "7.x to 8.0"
  • [#22999] - Sporadic NPEs when compiling Java code
  • [#22996] - Shared Build Services consumed using @ServiceReference are instantiated even if not used
  • [#22977] - DefaultWorkerProcessBuilder asking for too little memory
  • [#22960] - Inconsistency between javadocElements and javadoc variants
  • [#22939] - Support instrumenting signed build logic JARs
  • [#22921] - Gradle complains about invalid tool chain - picking up the source package location - it should just ignore them
  • [#22910] - Nag for deprecation of StartParameter.buildFile/settingsFile
  • [#22909] - Nag for deprecation of GradleBuild.buildFile
  • [#22797] - Version catalog accessors for plugin aliases shown as errors in IDE kotlin script editor
  • [#22781] - Fix dependency reporting tasks to be compatible with configuration caching
  • [#22682] - Java projects generated with `gradle init` should use toolchains
  • [#22656] - Allow directory listing to be an input to config cache.
  • [#22629] - Add API to configure SourceSetOutput classesDirs
  • [#22578] - Lock Configuration Usage at Creation
  • [#22522] - Configuration cache should report a problem when a task extension is accessed at execution time
  • [#22482] - publishToMavenLocal does not generate checksums
  • [#22337] - Disallow BuildServices to be used as inputs to ValueSources obtained at configuration time
  • [#22091] - Kotlin-dsl plugin modifies kotlinOptions.freeCompilerArgs in task action
  • [#21989] - Log deprecation for applying Kotlin precompiled script plugins published with Gradle < 6.0
  • [#21985] - Load tasks from the configuration cache in the same build they are stored
  • [#21967] - includeGroupByRegex with exclusiveContent can be easily misconfigured leading to poor security
  • [#21914] - Add deprecation logging to org.gradle.util.ConfigureUtil.configureByMap(props,delegate)
  • [#21902] - Add deprecation logging to org.gradle.util.VersionNumber
  • [#21900] - Add deprecation logging to org.gradle.util.GUtil.toCamelCase(string)
  • [#21882] - Add deprecation logging to org.gradle.util.WrapUtil.toDomainObjectSet()
  • [#21786] - gradlew init should set parallel and caching to true
  • [#21742] - Configuration cache should report Task.getProject access inside Task.onlyIf, TaskOutputs.cacheIf, and TasksOutputs.upToDateWhen predicates
  • [#21692] - Validate unknown implementation snapshots earlier
  • [#21505] - application.defaultJvmArgs aren't applied when running from the configuration cache
  • [#21436] - [KTS] Pre-release classes were found in dependencies. Remove them from the classpath, recompile with a release compiler or use '-Xskip-prerelease-check' to suppress errors
  • [#21355] - Share more information (licensing, repo url) about the Kotlin DSL Plugin both on the Plugin Page and in the published Maven POM
  • [#21266] - Support SARIF format in Checkstyle plugin
  • [#20850] - In tooling API FileDownloadResult is successful for HTTP 404
  • [#20837] - "Error while evaluating property 'javaVersion' of task ':compileJava' > No value present" when using relative javac path
  • [#20820] - Provider gets evaluated twice with configuration cache enabled
  • [#20775] - Avoid degraded performance for missing task dependency detection
  • [#20581] - Laziness issue between historical metadata and GMM metadata for publishing
  • [#20368] - Provide explicit path on parse error from toml Version Catalog file
  • [#20209] - Mark global cache directories
  • [#20151] - Build finished event now deprecated
  • [#20126] - Configuration cache should report problems when dehydrating `Closure`s
  • [#20081] - Gradle doesn't recognize disabled parameterized junit5 tests
  • [#19933] - Promote configuration caching as a stable feature
  • [#19793] - `ISE: GradleProperties has not been loaded yet` for included build when restoring from the configuration cache
  • [#19716] - Make dependency verification compatible with configuration cache
  • [#19571] - Improve naming in DirectorySnapshotter for filtered snapshots
  • [#19340] - Build launched via TAPI ignores logger level settings of target build
  • [#19184] - Configuration cache doesn't load system properties from included build `gradle.properties` files
  • [#19047] - Gradle configuration cache failure when using Gradle Enterprise
  • [#18897] - Adding a formerly-missing `build.gradle` to a multi-project build with configuration-cache doesn't get picked up
  • [#17916] - Path sensitivity `NONE` in incremental task causes same file to be added then removed
  • [#17831] - Build fails when kotlin-dsl plugin is used and src/main/resources/init.gradle.kts file exists
  • [#17659] - Introduce a mechanism to obtain the build result when using configuration caching
  • [#17610] - Make Gradle's memory management work appropriately in memory constrained docker containers
  • [#17305] - Test.forkEvery property awkward to use from Kotlin because of getter/setter nullability mismatch
  • [#16170] - Automatically register a build service user when it is wired to a managed property
  • [#16168] - Simplify consumption of Shared Build Services
  • [#15655] - Builds fail if root project is in root of mount point, with further implications
  • [#15577] - Promote incubating `org.gradle.api.provider.ValueSource` and family
  • [#15263] - Enable the "Gradle User Manual" page show the vertical menu located in the left for a mobile device
  • [#13705] - Configuration cache should support dynamic dependencies with ivy file system repositories
  • [#13665] - Restore default excludes from the configuration cache
  • [#13509] - Configuration cache should support file-system based repositories
  • [#13504] - Possibility to automatically use "latest" Gradle version for wrapper task
  • [#13473] - Make `project-report` plugin support the configuration cache
  • [#13470] - Make `signing` plugin support the configuration cache
  • [#13469] - Make `ivy-publish` plugin support the configuration cache
  • [#13363] - Introduce RegularFileProperty to represent output of WriteProperties task
  • [#13198] - Misleading javadoc on org.gradle.api.java.archives.Manifest.from() methods
  • [#13061] - Gradle should warn against using COD in combination with Kotlin DSL
  • [#12955] - Spurious console output when generating accessors for precompiled Kotlin scripts
  • [#12593] - Gradle wrapper can't recover from corrupted download
  • [#5975] - JUnit 5 Dynamic tests not showing with their displayName

New in Gradle 8.0.2 (Mar 4, 2023)

  • It fixes the following issues:
  • Gradle 8 RC2 runs out of metaspace
  • Java/Scala build with no explicit toolchain: build fails with Gradle 8.0.1 / Scala 2.13
  • Gradle 8.0.+ silently dropped support for custom compilers in JavaCompile
  • InstrumentingTransformer generates different class files in Gradle 8 and 7.6 which leads to Remote Build-Cache misses
  • Extending an already resolved configuration no longer works correctly
  • Update configuration cache state for some plugins
  • includeBuild in PluginManagementSpec deincubated in Gradle 8, docs still say it's incubating
  • Issues fixed in the first patch release:
  • Document integration of Scala plugin with toolchains and problems with target flag
  • no-rebuild suddenly gone without new deprecation cycle and without the reason for its undeprecation being void
  • Gradle 8.0 fails Scala build with isBlank not found in String class error

New in Gradle 7.6.1 (Feb 25, 2023)

  • It fixes the following issues:
  • #19065 Platform dependencies not possible in dependency block of test suite plugin
  • #22688 Increased memory usage (with -p option)
  • #22796 Building gradle itself fails during toolchain download: permission denied copying a file within .gradle/jdks
  • #22875 Regression with 7.6: @​pom artifact in JVM library project is no longer found
  • #22937 Remove safe credentials reference
  • #22973 Kotlin MPP plugin broken with Gradle 7.6 due to signature change in TestResultProcessor
  • #23016 toolchainManagement.jvm.javaRepositories should not expose the full surface of NamedDomainObjectList
  • #23025 Back-port toolchain related fixes to 7.6.1
  • #23053 Auto-provisioning/auto-detection of IBM Semeru toolchains is broken with Gradle 7.6
  • #23074 Docs: Build Lifecycle starts halfway through a point
  • #23096 Classifiers of version catalog are discarded while copied to anothor dependency
  • #23111 Ant closures are broken with Gradle 7.6
  • #23178 Mention the Foojay Toolchain Resolver plugin in the Gradle manual
  • #23215 Gradle 7.6: high memory usage (android project)
  • #23224 Backport to 7.6.1 "Fix for Incremental compilation with modules"
  • #23294 "Unable to make progress running work" together with --continue and failing tasks (Backport to 7.6.1)
  • #23555 Improve Toolchain related deprecation nagging in 7.6
  • #23894 Update EOL policy
  • #23910 Backport trusting only full GPG keys in dependency verification [Backport 7.6.1]
  • #23941 Typo in v7.6 docs about disabling_the_daemon
  • #23985 Resolving of manually created configuration creates a ResolveException

New in Gradle 8.0.1 (Feb 18, 2023)

  • It fixes the following issues:
  • Document integration of Scala plugin with toolchains and problems with target flag
  • --no-rebuild suddenly gone without new deprecation cycle and without the reason for its undeprecation being void
  • Gradle 8.0 fails Scala build with isBlank not found in String class error

New in Gradle 8.0 (Feb 13, 2023)

  • New features, performance and usability improvements
  • Kotlin DSL
  • Gradle's Kotlin DSL provides an alternative syntax to the traditional Groovy DSL with an enhanced editing experience in supported IDEs, with superior content assistance, refactoring, documentation, and more.
  • Improved script compilation performance
  • Gradle 8.0 introduces an interpreter for the declarative plugins {} blocks in .gradle.kts scripts that make the overall build time around 20% faster. Calling the Kotlin compiler for declarative plugins {} blocks is avoided by default.
  • To utilize this performance, ensure you are using the supported formats in the declarative plugins {} blocks, for example:
  • plugins {
  • id("java-library") // <1>
  • id("com.acme.example") version "1.0" apply false // <2>
  • kotlin("jvm") version "1.7.21" // <3>
  • Plugin specification by plugin identifier string
  • Plugin specification with version and/or the plugin application flag
  • Kotlin plugin specification helper
  • Note that using version catalog aliases for plugins (e.g. plugins { alias(libs.plugins.acme) }) or plugin specification type-safe accessors (e.g. plugins { `acme-plugin` }) is not supported by the plugins {} block interpreter. This support will be added in a later version.
  • In unsupported cases, Gradle falls back to the Kotlin compiler, providing the same performance as previous Gradle releases.
  • For more information on plugin syntax, read the documentation on constrained syntax.
  • Updated the Kotlin DSL to Kotlin API level 1.8
  • Previously, the Kotlin DSL used Kotlin API level 1.4. Starting with Gradle 8.0, the Kotlin DSL uses Kotlin API level 1.8. This change brings all the improvements made to the Kotlin language and standard library since Kotlin 1.4.0.
  • For information about breaking and non-breaking changes in this upgrade, visit the upgrading guide.
  • Enhanced script compilation to use the Gradle JVM as Kotlin JVM target
  • Previously, the compilation of .gradle.kts scripts always used Java 8 as the Kotlin JVM target. Starting with Gradle 8.0, it now uses the version of the JVM running the build.
  • If your team is using e.g., Java 11 to run Gradle, this allows you to use Java 11 libraries and language features in your build scripts.
  • Note that this doesn't apply to precompiled script plugins, see below.
  • Precompiled script plugins now use the configured Java Toolchain
  • Previously, the compilation of precompiled script plugins used the JVM target as configured on kotlinDslPluginOptions.jvmTarget.
  • Starting with Gradle 8.0, it now uses the configured Java Toolchain, or Java 8 if none is configured.
  • See the kotlin-dsl plugin manual for more information on how to configure the Java Toolchain for precompiled script plugins and the migration guide for more information on changed behaviour.
  • Improvements for buildSrc builds
  • This release includes several improvements for buildSrc builds to behave more like included builds. Included builds are an alternative way to organize your build logic to separate project configurations to better utilize incremental builds and task caching. Now they offer the same benefits.
  • Run buildSrc tasks directly
  • It is now possible to run the tasks of a buildSrc build from the command-line, using the same syntax used for tasks of included builds. For example, you can use gradle buildSrc:build to run the build task in the buildSrc build.
  • For more details, see the user manual
  • buildSrc can include other builds
  • The buildSrc build can now include other builds by declaring them in buildSrc/settings.gradle.kts or buildSrc/settings.gradle. This allows you to better orgaize your build logic while still using buildSrc.
  • You can use pluginsManagement { includeBuild(someDir) } or includeBuild(someDir) in this settings script to include other builds in buildSrc.
  • For more details, see the user manual
  • Tests for buildSrc are no longer automatically run
  • When Gradle builds the output of buildSrc it only runs the tasks that produce that output. It no longer runs the build task. In particular, this means that the tests of buildSrc and its subprojects are not built and executed when they are not needed.
  • You can run the tests for buildSrc in the same way as other projects, as described above.
  • Init scripts are applied to buildSrc
  • Init scripts specified on the command-line using --init-script are now applied to buildSrc, in addition to the main build and all included builds.
  • For more details, see the user manual
  • Configuration cache
  • The configuration cache improves build time by caching the result of the configuration phase and reusing this for subsequent builds. This is an incubating feature that can significantly improve build performance.
  • Improved configuration cache for parallelism on the first run
  • Configuration cache now enables more fine-grained parallelism than using the parallel execution. Starting in Gradle 8.0, tasks run in parallel from the first build when using the configuration cache.
  • Gradle has always run tasks in parallel when it reuses a configuration cache entry. All tasks run in parallel by default, even those within the same project, subject to dependency constraints. Now, it does this also when storing a cache entry.
  • When the configuration cache is enabled and Gradle is able to find a compatible cache entry for the current build, it will load the tasks from the cache and run them in isolation. If Gradle cannot find a suitable cache entry, it will run the configuration phase to determine the necessary tasks, store them in a new cache entry, and then immediately run the build based on the saved state.
  • This new behavior has several benefits:
  • • Any issues that occur during deserialization will be easier to detect because they will be reported in the cache miss build.
  • • Tasks have the same state in both cache miss and cache hit builds, allowing for consistency between builds.
  • • Gradle can release memory used by the configuration state before task execution in the cache miss build, which reduces peak memory usage.
  • This consistent behavior between cache miss and cache hit builds will help those who are transitioning to using the configuration cache, as more problems can be discovered on the first (cache miss) build.
  • For more details, see the user manual.
  • Improved compatibility with core plugins
  • The gradle init command can be used with the configuration cache enabled.
  • The ANTLR plugin and Groovy DSL precompiled scripts are now compatible with the configuration cache.
  • The current status of the configuration cache support for all core Gradle plugins can be found in the configuration cache documentation.
  • Java Toolchains improvements
  • Updated toolchain download repositories
  • Gradle 7.6 introduced toolchain repositories for increased flexibility. In Gradle 8.0, there is no longer a default toolchain provisioner. You have to declare at least one Java Toolchain repository explicitly. This can be done via toolchain repository plugins, like the Foojay Toolchains Plugin:
  • plugins {
  • id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0")
  • For more details, see the user manual.
  • General improvements
  • Improved Gradle user home cache cleanup
  • Previously, cleanup of the caches in Gradle user home used fixed retention periods (30 days or 7 days, depending on the cache). These retention periods can now be configured via the settings object in an init script in Gradle user home.
  • beforeSettings { settings ->
  • settings.caches {
  • downloadedResources.removeUnusedEntriesAfterDays = 45
  • Furthermore, it was previously only possible to partially disable cache cleanup via the org.gradle.cache.cleanup Gradle property in Gradle user home. Disabling cache cleanup now affects more caches under Gradle user home and can also be configured via the settings object in an init script in Gradle user home.
  • For more details, see the user manual.
  • Enhanced warning modes all and fail are now more verbose
  • Before Gradle 8.0, warning modes that were supposed to print all warnings were printing only one for each specific warning message. This resulted in some missing warning messages. For example, if there were two warnings with the same message, but originating from different steps of the build process (i.e., different stack traces), only one was printed.
  • Now one gets printed for each combination of message and stack trace. This result is more verbose, but also more complete.
  • For more details, see the user manual.
  • Improved dependency verification metadata
  • Dependency verification metadata helps keep your project secure by ensuring the dependency being used matches the checksum of that dependency. This metadata is located in an XML configuration file and now accepts a reason attribute. This reason attribute allows for more details on why an artifact is trusted or why a selected checksum verification is required for an artifact directly in the verification-metadata.xml.
  • The following nodes with dependency verification metadata file verification-metadata.xml now support a reason attribute:
  • • the trust xml node under trusted-artifacts
  • • the md5, sha1, sha256 and sha512 nodes under component
  • A reason is helpful to provide more details on why an artifact is trusted or why a selected checksum verification is required for an artifact directly in the verification-metadata.xml.
  • For more details, see the user manual.
  • Improved dependency verification CLI:
  • To minimize the number of times CI builds communicate with key servers, we use a local keyring file. This file should be frequently exported to remain accurate. There is no longer a need to write verification metadata when exporting trusted keys, simplifying the process.
  • You can now use the export-keys flag to export all already trusted keys:
  • ./gradlew --export-keys
  • There is no longer a need to write verification metadata when exporting trusted keys.
  • For more details, see the user manual.
  • Code quality plugin improvements
  • CodeNarc plugin detects the Groovy runtime version
  • CodeNarc performs static analysis for Groovy projects. It now publishes separate versions for use with Groovy 4. Gradle still currently ships with Groovy 3.
  • To ensure future compatibility, the CodeNarc Plugin now automatically detects the appropriate version of CodeNarc for the current Groovy runtime.
  • You can still explicitly specify a CodeNarc version with the toolVersion property on the CodeNarcExtension.
  • Enhanced PMD tasks to execute in parallel by default
  • The PMD plugin performs quality checks on your project’s Java source files using a static code analyzer. It now uses the Gradle worker API and JVM toolchains. This tool now performs analysis via an external worker process, and therefore its tasks may now run in parallel within one project.
  • In Java projects, this tool will use the same version of Java required by the project. In other types of projects, it will use the same version of Java that is used by the Gradle daemon.
  • For more details, see the user manual.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Promoted features in the Tooling API:
  • The GradleConnector.disconnect() method is now considered stable.
  • Promoted features in the antlr plugin
  • The AntlrSourceDirectorySet interface is now considered stable.
  • Promoted features in the ear plugin
  • The Ear.getAppDirectory() method is now considered stable.
  • Promoted features in the eclipse plugin
  • The EclipseClasspath.getContainsTestFixtures() method is now considered stable.
  • Promoted features in the groovy plugin
  • The following type and method are now considered stable:
  • GroovySourceDirectorySet
  • GroovyCompileOptions.getDisabledGlobalASTTransformations()
  • Promoted features in the scala plugin
  • The ScalaSourceDirectorySet interface is now considered stable.
  • Promoted features in the war plugin
  • The War.getWebAppDirectory() method is now considered stable.
  • Promoted features in the Settings API
  • The methods Settings.dependencyResolutionManagement(Action) and Settings.getDependencyResolutionManagement() are now considered stable.
  • All the methods in DependencyResolutionManagement are now stable, except the ones for central repository declaration.
  • Fixed issues
  • 208 issues have been fixed in Gradle 8.0.
  • [#23316] - CVE-2022-36033: Bump version for "jsoup" plugin
  • [#23293] - "Unable to make progress running work" together with --continue and failing tasks
  • [#23253] - ZipFileTree Cache not respecting relocated build directory
  • [#23193] - compileScala throws java.lang.UnsupportedOperationException since 8.0-milestone-5
  • [#23148] - Caused by: java.lang.ClassCastException: class com.android.build.gradle.internal.plugins.AppPlugin$ApplicationAndroidComponentsExtensionImplCompat_Decorated cannot be cast to class kotlin.Unit
  • [#23141] - Don't store broken values to the configuration cache
  • [#23139] - Do not discard build services that are build event listeners after storing the configuration cache entry
  • [#23137] - CVE-2022-31159: Bump version for the "aws-java-sdk-s3" plugin
  • [#23130] - Make a decision wrt staying on Kotlin 1.7 with language 1.5 or moving to Kotlin 1.8 with language 1.8 for 8.0
  • [#23121] - Build services closed twice with configuration cache in 8.0
  • [#23116] - Failure while populating the build operation queue: Value for unknown value has not been calculated yet.
  • [#23067] - Incremental compilation of java modules is broken with Gradle 7.6
  • [#23066] - Easier debugging of CompileTransaction path selection in incremental task execution
  • [#23027] - Change deprecation of custom layout to be removed in 9.0 instead of 8.0
  • [#22964] - Incremental compilation is not observed for Scala 3
  • [#22955] - Show usage information (e.g. description) when @Option is specified incorrectly on command line
  • [#22952] - Variant ambiguity introduced by compileElements in Gradle 8.0-milestone4
  • [#22949] - IDE import fails with Project Isolation enabled: Expected unreportedProblemInCurrentCall to be called after enterDynamicCall
  • [#22944] - HashMap$Node cannot be cast to class java.util.HashMap$TreeNode
  • [#22918] - JacocoReportAggregationPlugin doesn't work with lockfiles
  • [#22889] - Task dependencies access becomes an error in 8.0 with STABLE_CONFIGURATION_CACHE
  • [#22859] - Upgrade embedded Kotlin to 1.7.21
  • [#22853] - Assertion failed in FinalizerGroup with Kotlin 1.7.21
  • [#22839] - Use absolute path to java agent jar when launching JaCoCo process
  • [#22836] - Dead Javadoc links in Gradle user guide
  • [#22824] - Remove deprecated PluginDependenciesSpecExtensions build-scan method
  • [#22822] - Explain need for deprecated DependencyHandlerScope constraints method
  • [#22803] - Java Toolchain auto-provisioning fails with permission errors
  • [#22750] - Docs: USER_HOME vs GRADLE_USER_HOME vs HOME?
  • [#22744] - Aggregration plugins not working with custom JVM Test Suites
  • [#22735] - Gradle 8.0-milestone-3 regression: Transform selection algorithm has changed (longer chain is selected)
  • [#22702] - Typo and ordering problem for org.gradle.welcome property in docs
  • [#22671] - forkOptions.jvmArgs.addAll() silently ignored
  • [#22645] - API: parameter is marked not-null while explicitly allowing null
  • [#22614] - Kotlin/Groovy Switch in Documentation
  • [#22612] - Add a sample demonstrating build service receiving task execution events
  • [#22531] - Groovy and Java joint compilation failure on Java class private dependency change
  • [#22502] - Inconsistent Javadoc in `ModuleVersionIdentifier`
  • [#22403] - Remove various deprecated fields from Usage class
  • [#22398] - Misleading toolchain logging when setting executable or java home on compileJava
  • [#22397] - Task compileJava fails if fork options executable or java home points to older JDK
  • [#22392] - Remove deprecated PluginCollection add/remove/addAll/removeAll/clear methods
  • [#22380] - Remove deprecated ResolvedComponentResult#getVariant method
  • [#22375] - Signing publications should be idempotent
  • [#22370] - Gradle not honoring Maven exclusions defined in pom.xml
  • [#22367] - Remove deprecated getAntBuilder from Checkstyle/Pmd/CodeNarc
  • [#22365] - Update WarPlugin and ScalaBasePlugin configureConfigurations to produce error instead of warning on misuse
  • [#22355] - Add dependency verification changes to release notes for Gradle 8
  • [#22354] - Publish dependency-verification-1.2.xsd schema
  • [#22340] - Restore removed IdeaModule.testSourceDirs and IdeaModule.testResourceDir
  • [#22333] - NoClassDefFoundError: LauncherSessionListener with plugin 'org.jetbrains.intellij' and JUnit 5
  • [#22299] - Preset Binary Compatibility Report Filter
  • [#22282] - Make binary compatibility changes report self-correcting
  • [#22278] - Add task to sort accepted-public-api-changes.json file
  • [#22246] - Restore `TestReport`'s removed `reportOn` and `setDestinationDir` methods
  • [#22230] - Report#getOutputLocation() should return a Property, not a Provider
  • [#22153] - Error upon consuming confs added JacocoPlugin#addJacocoConfigurations
  • [#22110] - Add nagging upon usage of deprecated destinationDir from AbstractCompile
  • [#22101] - Upgrade embedded Kotlin to 1.7.22
  • [#22088] - Restore warning for resolveToStateOrLater
  • [#22063] - Build Cache documentation link to Gradle Enterprise is broken
  • [#22023] - Centralize validation of executable configuration for tasks
  • [#21978] - Prepare to make more usage of `DeprecatableConfiguration` into errors
  • [#21954] - Remove DefaultConfiguration#resolveToStateOrLater
  • [#21948] - Investigate how to apply DependencyAdder pattern to "modifiers"
  • [#21907] - Remove deprecated KotlinDslOptions.experimentalWarning
  • [#21884] - Remove @Deprecated AbstractExternalModuleDependency#setForce method
  • [#21881] - Update DefaultRepositoryHandler#deprecateJCenter deprecation to Gradle 9.0
  • [#21879] - Remove @Deprecated DependencyNotationParser#create method
  • [#21876] - ProviderFactory: provide a way to get Gradle properties by a prefix
  • [#21872] - `JavaToolchainFactory#newInstance` silently discards original exception
  • [#21857] - Signing plugin: sign(publications) should be idempotent
  • [#21825] - CCH22-28: Adjust the `snippets/tutorial/configureTaskUsingProjectProperty` sample for configuration cache
  • [#21824] - CCH22-27: Adjust the `snippets/testing/test-suite-multi-configure-each-matching` sample for configuration cache
  • [#21823] - CCH22-26: Adjust the `snippets/testing/test-suite-multi-configure-each` sample for configuration cache
  • [#21822] - CCH22-25: Adjust the `snippets/testing/test-suite-multi-configure-each-extracted` sample for configuration cache
  • [#21821] - CCH22-24: Adjust the `snippets/tasks/incrementalTask` sample for configuration cache
  • [#21820] - CCH22-23: Adjust the `snippets/tasks/incrementalBuild-customTaskClass` sample for configuration cache
  • [#21819] - CCH22-22: Adjust the `snippets/providers/propertyConvention` sample for configuration cache
  • [#21818] - CCH22-21: Adjust the `snippets/kotlinDsl/multiProjectBuild` sample for configuration cache
  • [#21817] - CCH22-20: Adjust the `snippets/java/fixtures` sample for configuration cache
  • [#21816] - CCH22-19: Adjust the `snippets/java/customDirs` sample for configuration cache
  • [#21815] - CCH22-18: Adjust the `snippets/java/crossCompilation` sample for configuration cache
  • [#21814] - CCH22-17: Adjust the `snippets/files/fileCollections` sample for configuration cache
  • [#21813] - CCH22-16: Adjust the `snippets/files/archivesChangedBaseName` sample for configuration cache
  • [#21812] - CCH22-15: Adjust the `snippets/files/archiveNaming` sample for configuration cache
  • [#21811] - CCH22-14: Adjust the `snippets/dependencyManagement/managingTransitiveDependencies-excludeForDependency` sample for configuration cache
  • [#21810] - CCH22-13: Adjust the `snippets/dependencyManagement/managingTransitiveDependencies-excludeForConfiguration` sample for configuration cache
  • [#21809] - CCH22-12: Adjust the `snippets/dependencyManagement/dependencyVerification-disablingVerification` sample for configuration cache
  • [#21808] - CCH22-11: Adjust the `snippets/dependencyManagement/definingUsingConfigurations-custom` sample for configuration cache
  • [#21807] - CCH22-10: Adjust the `snippets/dependencyManagement/customizingResolution-metadataRule` sample for configuration cache
  • [#21806] - CCH22-9: Adjust the `snippets/dependencyManagement/customizingResolution-ivyMetadataRule` sample for configuration cache
  • [#21805] - CCH22-8: Adjust the `snippets/dependencyManagement/customizingResolution-conditionalSubstitutionRule` sample for configuration cache
  • [#21804] - CCH22-7: Adjust the `snippets/dependencyManagement/customizingResolution-classifierSubstitutionRule` sample for configuration cache
  • [#21803] - CCH22-6: Adjust the `snippets/dependencyManagement/customizingResolution-capabilitySubstitutionRule` sample for configuration cache
  • [#21802] - CCH22-5: Adjust the `snippets/buildlifecycle/projectEvaluateEvents` sample for configuration cache
  • [#21801] - CCH22-4: Adjust the `snippets/buildCache/cacheable-bundle-task` sample for configuration cache
  • [#21800] - CCH22-3: Adjust the `snippets/buildCache/cacheable-bundle` sample for configuration cache
  • [#21799] - CCH22-2: Adjust the `snippets/artifacts/generatedFileDependencies` sample for configuration cache
  • [#21794] - Turn invalid toolchain spec deprecation into error
  • [#21792] - De-incubate or remove ExternalPluginValidationPlugin
  • [#21790] - Remove deprecated AntlrSourceVirtualDirectory & AntlrSourceVirtualDirectoryImpl
  • [#21775] - Remove deprecated NamedDomainObjectContainerExtension.invoke
  • [#21772] - Remove deprecated members of the internal PrecompiledScriptPluginsSupport
  • [#21763] - Update dependency-management deprecation warnings to errors in Gradle 8
  • [#21760] - Update AbstractCodeQualityPlugin.createConfigurations to become an error in Gradle 8
  • [#21747] - Update Test.useTestFramework to throw error upon improper usage
  • [#21743] - AntlrPlugin.apply to become an error
  • [#21736] - Remove @Deprecated DefaultWorkerExecutor methods
  • [#21724] - Remove @Deprecated DefaultDependencyHandler.doAdd(Conf, Obj, Closure)
  • [#21718] - Snippet "snippet-init-scripts-configuration-injection" and "snippet-init-scripts-plugins" are not compatible with the configuration cache
  • [#21717] - Snippet "snippet-java-toolchain-filters" is not compatible with the configuration cache
  • [#21714] - Snippet "snippet-groovy-compilation-avoidance" is not compatible with the configuration cache
  • [#21712] - Off-by-one error on Windows path length checks
  • [#21705] - Docs: "Building Java Applications Sample" explanation of build.gradle incomplete
  • [#21683] - Remove @Deprecated VersionCatalog methods
  • [#21681] - Remove @Deprecated methods from TestReport
  • [#21679] - Remove @Deprecated JvmPluginsHelper.configureDocumentationVariantWithArtifact method
  • [#21671] - Configuration cache report misses implicit usages of project methods, resulting to a crash when reusing the cache
  • [#21661] - Remove @Deprecated methods from DependencySubstitutions
  • [#21657] - Remove @Deprecated Groovydoc.IncludePrivate
  • [#21653] - Remove @Deprecated DependencyInsightReportTask.setLegacyShowSinglePathToDependency
  • [#21650] - Remove @Deprecated JacocoPluginExtension.ReportsDir
  • [#21648] - Convert work validation warnings from 7.x into errors
  • [#21647] - Remove @Deprecated methods from DefaultDomainObjectSet, DefaultSourceDirectorySetFactory and SourceDirectorySetFactory
  • [#21642] - Sample "credentials-handling/publishing-credentials" is not compatible with the configuration cache
  • [#21640] - Snippet "snippet-maven-publish-conditional-publishing" is not compatible with the configuration cache
  • [#21594] - Update docs for adhoc-task property builder runtime API to describe equivalent for all annotations
  • [#21561] - `-U` short-form for `--refresh-dependencies`
  • [#21558] - Wrong documentation URL in error message
  • [#21553] - Remove @Deprecated JacocoMerge for Gradle 8.0
  • [#21515] - Add Upgrade Guide notes on Deprecations/Removals
  • [#21509] - Default to latest version of CodeNarc tool
  • [#21503] - Migrate `groovy.util.AntBuilder` → `groovy.ant.AntBuilder`
  • [#21463] - Don't clear `distributionSha256Sum` when updating Gradle wrapper
  • [#21421] - Remove Upload task
  • [#21386] - Make tasks emit Java toolchain usage when uses the current JVM
  • [#21372] - Re-enable disabled test GradleBuildSanityCheckConfigurationCacheSmokeTest
  • [#21334] - Cpp and Swift plugin classes use `Optional.orElse` inefficiently
  • [#21315] - SystemRoot environment variable needs to be defined for GradleRunner Tests on Windows
  • [#21289] - typo in Working with files doc in the user guide
  • [#21164] - Unix start script is overwriting the `APP_NAME` env var value
  • [#21109] - Configuration cache should support non-serializable lambdas
  • [#21085] - Do not track implementation of nested input
  • [#21041] - Do not fix JVM target to 8 when compiling build.gradle.kts files
  • [#21013] - Remove --add-opens for all Gradle worker processes
  • [#20416] - Make `org.gradle.kotlin.dsl.precompiled.accessors.strict` default to true
  • [#20260] - Add reason attribute for <component> elements in verification-metadata.xml
  • [#20156] - `gradle init` is skipped after generating one project with the configuration cache enabled
  • [#20101] - Scala Incremental Compilation for Multi-Module projects broken in 7.x
  • [#20060] - Version catalogs run into unexpected namespace conflicts
  • [#20007] - Ambiguous error when configuration cache entries discarded due to incompatible types
  • [#19829] - A flag to turn `buildSrc` into a composite build
  • [#19790] - Move @Internal for getExtensions from ExtensionAware to Task interface
  • [#19568] - Support Kotlin language/api 1.7 in Kotlin DSL build scripts and plugins
  • [#19538] - Make Task.getName() final
  • [#19382] - Error extracting downloaded toolchain for `JvmImplementation.J9`
  • [#19090] - Restore Test Option Fail Fast Behavior for Gradle 8
  • [#18957] - Missing upgrade docs from 6.9 to 7.0
  • [#18908] - DependencyHandler#add(String, Object, Closure) has incorrect nullability
  • [#18829] - "The Gradle Daemon" documentation FAQ duplicates content
  • [#18824] - Java Toolchains are Incompatible with `--add-exports` for System Modules
  • [#18567] - ./gradlew --export-keys does not do anything without --write-verification-metadata
  • [#17681] - eclipse-wtp EJB projects are not compatible with eclipse "jst.ejb" facet
  • [#17324] - Remove support for using equals() to determine whether a task input property has changed
  • [#17151] - Remove deprecated getters/setters that have a stable property as replacement since 7.0
  • [#17052] - Kotlin 1.5 ".kts" build source, invoke-dynamic for SAM wrappers, and gradle tasks not up to date
  • [#16884] - Repo libs-releases-local outdated, not containing artifacts after 6.1.1
  • [#16783] - Enable deprecation logging for deprecated methods currently used by Kotlin plugin
  • [#16782] - Enable deprecation logging for deprecated methods currently used by Android plugin
  • [#16688] - Make it possible to see all instances of a deprecation finding and not only the first one.
  • [#15888] - Remove pre 5.6 Worker APIs
  • [#15875] - Turn 'Using mustRunAfter/shouldRunAfter/finalizedBy to reference tasks from another build' into an error
  • [#15546] - Remove deprecated injecting the input artifact of a transform as a File
  • [#15503] - Treat outputs with relative path sensitivity
  • [#15496] - Remove `IncrementalTaskInputs`
  • [#15335] - Class 'Foo' is compiled by a new Kotlin compiler backend and cannot be loaded by the old compiler
  • [#14587] - Consolidate snapshotting missing elements in different file collections
  • [#13941] - Nested finalizers should honor task order across projects
  • [#13462] - Make `antlr` plugin support the configuration cache
  • [#13456] - Make `init` plugin support the configuration cache
  • [#12978] - Allow buildSrc to use and see other included builds
  • [#12388] - `Provider.map { nullableValue }` in Kotlin DSL does not work
  • [#12351] - Property 'xxx' with value '/tmp/bug.txt' cannot be serialized with RegularFileProperty
  • [#10066] - Remove old artifact transform API
  • [#9196] - Use worker API for built-in code quality tasks
  • [#8514] - PMD custom rule set documentation unclear
  • [#8423] - Warn if a class used in injection is not static
  • [#8224] - Can't easily run junit tests in buildSrc
  • [#9113] - Move stale output cleanup to execution engine
  • [#6305] - Remove --no-rebuild
  • [#2531] - Convert `buildSrc` to be an implicit, included build
  • [#1055] - Command-line init scripts not executed against `:buildSrc` project
  • [#23519] - Rectify Java toolchain related shortcomings
  • [#23440] - Gradle 8 compiled plugins are not usable with Gradle <7
  • [#23409] - Add SAM with receiver and compiler settings link to the Gradle Kotlin DSL page under the `kotlin-dsl` plugin
  • [#23408] - Fix remaining TODOs in upgrade guide for 8.0
  • [#23391] - 8.0 RC 1 regression: tartree does not work for .tar.gz files
  • [#23390] - Gradle 8 upgrade docs missing for TestReport removals
  • [#23378] - unzipped-distribution - Log4j Vulnerability on Enterprise File System Scans
  • [#23343] - 8.0 RC 1 regression: CodeNarc plugin cannot resolve its dependencies
  • [#22027] - Upgrade embedded Kotlin to 1.8.0
  • [#23645] - Broken link title in "Migrating Builds From Apache Maven"
  • [#23559] - Exception compiling Scala under Gradle 8
  • [#23520] - NoSuchMethodError org.gradle.api.DefaultTask.getOnlyIf when trying to run plugin compiled with Gradle 7.6 with Gradle 7.5.1
  • [#23491] - Build produces INFO log "Script 'build.gradle.kts' is not supposed to be used along with regular Kotlin sources, and will be ignored in the future versions by default."
  • [#17228] - Cannot use nested `build-logic` as included build for build logic
  • [#23700] - Build fails with configuration cache enabled: BuildServiceRegistration with name 'listener-service' not found

New in Gradle 8.0 RC 1 (Dec 30, 2022)

  • New features and usability improvements:
  • JVM:
  • Updated Toolchain Download Repositories:
  • Gradle 7.6 introduced arbitrary toolchain repositories. In Gradle 8.0, there is no longer a default toolchain provisioner. You have to declare at least one Java Toolchain repository explicitly. This can be done via toolchain repository plugins, like the Foojay Toolchains Plugin
  • Kotlin DSL:
  • Gradle's Kotlin DSL provides an alternative syntax to the traditional Groovy DSL with an enhanced editing experience in supported IDEs, with superior content assistance, refactoring, documentation, and more.
  • Updated the Kotlin DSL to Kotlin API Level 1.8
  • Previously, the Kotlin DSL used Kotlin API level 1.4. Starting with Gradle 8.0, the Kotlin DSL uses Kotlin API level 1.8. This change brings all the improvements made to the Kotlin language and standard library since Kotlin 1.4.0.
  • For information about breaking and nonbreaking changes in this upgrade, see the upgrading guide.
  • Enhanced script compilation to use the Gradle JVM as Kotlin JVM Target:
  • Previously, the compilation of .gradle.kts scripts always used Java 8 as the Kotlin JVM target. Starting with Gradle 8.0, it now uses the version of the JVM running the build.
  • If your team is using e.g. Java 11 to run Gradle, this allows you to use Java 11 libraries and language features in your build scripts.
  • Note that this doesn't apply to precompiled script plugins, see below.
  • Precompiled script plugins now use the configured Java Toolchain:
  • Previously, the compilation of precompiled script plugins used the JVM target as configured on kotlinDslPluginOptions.jvmTarget. Starting with Gradle 8.0, it now uses the configured Java Toolchain, or Java 8 if none is configured.
  • See the kotlin-dsl plugin manual for more information on how to configure the Java Toolchain for precompiled script plugins and the migration guide for more information on changed behaviour.
  • Improved Script compilation performance:
  • Gradle 8.0 introduces an interpreter for the declarative plugins {} blocks in .gradle.kts scripts that make the overall build time around 20% faster. By default, calling the Kotlin compiler for declarative plugins {} blocks is avoided.
  • Note that using version catalog aliases for plugins or plugin specification type-safe accessors is not supported by the plugins {} block interpreter. This support will be added in a later version.
  • In unsupported cases, Gradle falls back to the Kotlin compiler, providing the same performance as previous Gradle releases.
  • General Improvements:
  • Enhanced warning modes all and fail are now more verbose:
  • Warning modes that are supposed to print all warnings were printing only one for each specific warning message.
  • If there were two warnings with the same message, but originating from different steps of the build process (i.e. different stack traces), only one of them was printed.
  • Now one gets printed for each combination of message and stack trace.
  • For more information about warning modes, see Showing or hiding warnings.
  • Improved Dependency verification metadata:
  • The following nodes with dependency verification metadata file verification-metadata.xml now support a reason attribute:
  • the trust xml node under trusted-artifacts
  • the md5, sha1, sha256 and sha512 nodes under component
  • A reason is helpful to provide more details on why an artifact is trusted or why a selected checksum verification is required for an artifact directly in the verification-metadata.xml.
  • Improved Dependency verification CLI:
  • You can now use the export-keys flag to export all already trusted keys: ./gradlew --export-keys
  • There is no longer a need to write verification metadata when exporting trusted keys.
  • Configuration Cache:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing this for subsequent builds.
  • Consistent task execution for configuration cache hit and configuration cache miss builds:
  • In Gradle 8.0, tasks run in parallel from the first build when using the configuration cache. Gradle now loads the set of tasks from the cache entry after storing them on a cache miss. These tasks are isolated and can run in parallel. This is more fine-grained than using the --parallel flag.
  • When the configuration cache is enabled, and Gradle is able to locate a compatible configuration cache entry for the requested tasks, it loads the tasks to run from the cache entry and runs them as so-called 'isolated' tasks. Isolated tasks are able to run in parallel by default, subject to dependency constraints.
  • When Gradle is unable to locate a configuration cache entry to use, it runs the 'configuration' phase to calculate the set of tasks to run and then stores these tasks to a new cache entry. In previous versions, Gradle would then run these tasks directly. However, as these tasks are not isolated, they would not run in parallel.
  • There are some additional advantages to this new behavior:
  • Any problems that happen during deserialization will be reported in the cache miss build, making it easier to spot such problems.
  • Tasks have access to the same state in cache miss and cache hit builds.
  • Gradle can release all memory used by the configuration state prior to task execution in the cache miss build. Previously it would retain this state because the non-isolated tasks were able to access it.
  • This reduces the peak memory usage for a given set of tasks.
  • This consistent behavior for cache miss and cache hit builds can help people who are migrating to use the configuration cache, as more problems can now be discovered on the first (cache miss) build.
  • Improved compatibility with core plugins:
  • The gradle init command can be used with the configuration cache enabled.
  • The ANTLR plugin and Groovy DSL precompiled scripts are now compatible with the configuration cache.
  • The current status of the configuration cache support for all core Gradle plugins can be found in the configuration cache documentation.
  • Improved Gradle User Home Cache Cleanup:
  • Previously, cleanup of the caches in Gradle User Home used fixed retention periods (30 days or 7 days depending on the cache). These retention periods can now be configured via the Settings object in an init script in Gradle User Home. Furthermore, it was previously only possible to partially disable cache cleanup via the org.gradle.cache.cleanup Gradle property in Gradle User Home. Disabling cache cleanup now affects more caches under Gradle User Home and can also be configured via the Settings object in an init script in Gradle User Home.
  • Improvements for buildSrc builds:
  • This release includes several improvements for buildSrc builds to behave more like included builds.
  • Run buildSrc tasks directly:
  • It is now possible to run the tasks of a buildSrc build from the command-line, using the same syntax used for tasks of included builds. For example, you can use gradle buildSrc:build to run the build task in the buildSrc build.
  • buildSrc can include other builds:
  • The buildSrc build can now include other builds by declaring them in buildSrc/settings.gradle.kts or buildSrc/settings.gradle. You can use pluginsManagement { includeBuild(someDir) } or includeBuild(someDir) in this settings script to include other builds in buildSrc.
  • For more details, see the user manual
  • Tests for buildSrc are no longer automatically run:
  • When Gradle builds the output of buildSrc it only runs the tasks that produce that output. It no longer runs the build task. In particular, this means that the tests of buildSrc and its subprojects are not built and executed when they are not needed.
  • You can run the tests for buildSrc in the same way as other projects, as described above.
  • Init scripts are applied to buildSrc:
  • Init scripts specified on the command-line using --init-script are now applied to buildSrc, in addition to the main build and all included builds.
  • Code Quality Plugin Improvements:
  • Enhanced CodeNarc Plugin to automatically detects the appropriate version for the current Groovy runtime
  • The CodeNarc project now publishes separate versions for use with Groovy 4. Gradle still currently ships with Groovy 3.
  • To ensure future compatibility, the CodeNarc Plugin now automatically detects the appropriate version of CodeNarc for the current Groovy runtime.
  • You can still explicitly specify a CodeNarc version with the toolVersion property on the CodeNarcExtension.
  • Enhanced PMD tasks to execute in parallel by default:
  • The PMD plugin now uses the Gradle worker API and JVM toolchains. This tool now performs analysis via an external worker process, and therefore its tasks may now run in parallel within one project.
  • In Java projects, this tool will use the same version of Java required by the project. In other types of projects, it will use the same version of Java that is used by the Gradle daemon.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Promoted features in the Tooling API:
  • The GradleConnector.disconnect() method is now considered stable.
  • Promoted features in the antlr plugin:
  • The AntlrSourceDirectorySet interface is now considered stable.
  • Promoted features in the ear plugin:
  • The Ear.getAppDirectory() method is now considered stable.
  • Promoted features in the eclipse plugin:
  • The EclipseClasspath.getContainsTestFixtures() method is now considered stable.
  • Promoted features in the groovy plugin:
  • The following type and method are now considered stable:
  • GroovySourceDirectorySet
  • GroovyCompileOptions.getDisabledGlobalASTTransformations()
  • Promoted features in the scala plugin:
  • The ScalaSourceDirectorySet interface is now considered stable.
  • Promoted features in the war plugin:
  • The War.getWebAppDirectory() method is now considered stable.
  • Promoted features in the Settings API:
  • The methods Settings.dependencyResolutionManagement(Action) and Settings.getDependencyResolutionManagement() are now considered stable.
  • All the methods in DependencyResolutionManagement are now stable, except the ones for central repository declaration.
  • Fixed issues:
  • 189 issues have been fixed in Gradle 8.0.
  • [#23316] - CVE-2022-36033: Bump version for "jsoup" plugin
  • [#23293] - "Unable to make progress running work" together with --continue and failing tasks
  • [#23253] - ZipFileTree Cache not respecting relocated build directory
  • [#23193] - compileScala throws java.lang.UnsupportedOperationException since 8.0-milestone-5
  • [#23141] - Don't store broken values to the configuration cache
  • [#23139] - Do not discard build services that are build event listeners after storing the configuration cache entry
  • [#23137] - CVE-2022-31159: Bump version for the "aws-java-sdk-s3" plugin
  • [#23130] - Make a decision wrt staying on Kotlin 1.7 with language 1.5 or moving to Kotlin 1.8 with language 1.8 for 8.0
  • [#23121] - Build services closed twice with configuration cache in 8.0
  • [#23116] - Failure while populating the build operation queue: Value for unknown value has not been calculated yet.
  • [#23067] - Incremental compilation of java modules is broken with Gradle 7.6
  • [#23066] - Easier debugging of CompileTransaction path selection in incremental task execution
  • [#23027] - Change deprecation of custom layout to be removed in 9.0 instead of 8.0
  • [#22964] - Incremental compilation is not observed for Scala 3
  • [#22955] - Show usage information (e.g. description) when @Option is specified incorrectly on command line
  • [#22952] - Variant ambiguity introduced by compileElements in Gradle 8.0-milestone4
  • [#22949] - IDE import fails with Project Isolation enabled: Expected unreportedProblemInCurrentCall to be called after enterDynamicCall
  • [#22944] - HashMap$Node cannot be cast to class java.util.HashMap$TreeNode
  • [#22918] - JacocoReportAggregationPlugin doesn't work with lockfiles
  • [#22889] - Task dependencies access becomes an error in 8.0 with STABLE_CONFIGURATION_CACHE
  • [#22859] - Upgrade embedded Kotlin to 1.7.21
  • [#22853] - Assertion failed in FinalizerGroup with Kotlin 1.7.21
  • [#22839] - Use absolute path to java agent jar when launching JaCoCo process
  • [#22836] - Dead Javadoc links in Gradle user guide
  • [#22824] - Remove deprecated PluginDependenciesSpecExtensions build-scan method
  • [#22822] - Explain need for deprecated DependencyHandlerScope constraints method
  • [#22803] - Java Toolchain auto-provisioning fails with permission errors
  • [#22750] - Docs: USER_HOME vs GRADLE_USER_HOME vs HOME?
  • [#22744] - Aggregration plugins not working with custom JVM Test Suites
  • [#22735] - Gradle 8.0-milestone-3 regression: Transform selection algorithm has changed (longer chain is selected)
  • [#22702] - Typo and ordering problem for org.gradle.welcome property in docs
  • [#22671] - forkOptions.jvmArgs.addAll() silently ignored
  • [#22645] - API: parameter is marked not-null while explicitly allowing null
  • [#22614] - Kotlin/Groovy Switch in Documentation
  • [#22612] - Add a sample demonstrating build service receiving task execution events
  • [#22531] - Groovy and Java joint compilation failure on Java class private dependency change
  • [#22502] - Inconsistent Javadoc in `ModuleVersionIdentifier`
  • [#22403] - Remove various deprecated fields from Usage class
  • [#22398] - Misleading toolchain logging when setting executable or java home on compileJava
  • [#22397] - Task compileJava fails if fork options executable or java home points to older JDK
  • [#22392] - Remove deprecated PluginCollection add/remove/addAll/removeAll/clear methods
  • [#22380] - Remove deprecated ResolvedComponentResult#getVariant method
  • [#22375] - Signing publications should be idempotent
  • [#22370] - Gradle not honoring Maven exclusions defined in pom.xml
  • [#22367] - Remove deprecated getAntBuilder from Checkstyle/Pmd/CodeNarc
  • [#22365] - Update WarPlugin and ScalaBasePlugin configureConfigurations to produce error instead of warning on misuse
  • [#22355] - Add dependency verification changes to release notes for Gradle 8
  • [#22354] - Publish dependency-verification-1.2.xsd schema
  • [#22340] - Restore removed IdeaModule.testSourceDirs and IdeaModule.testResourceDir
  • [#22333] - NoClassDefFoundError: LauncherSessionListener with plugin 'org.jetbrains.intellij' and JUnit 5
  • [#22299] - Preset Binary Compatibility Report Filter
  • [#22282] - Make binary compatibility changes report self-correcting
  • [#22278] - Add task to sort accepted-public-api-changes.json file
  • [#22246] - Restore `TestReport`'s removed `reportOn` and `setDestinationDir` methods
  • [#22230] - Report#getOutputLocation() should return a Property, not a Provider
  • [#22153] - Error upon consuming confs added JacocoPlugin#addJacocoConfigurations
  • [#22110] - Add nagging upon usage of deprecated destinationDir from AbstractCompile
  • [#22101] - Upgrade embedded Kotlin to 1.7.22
  • [#22088] - Restore warning for resolveToStateOrLater
  • [#22063] - Build Cache documentation link to Gradle Enterprise is broken
  • [#22023] - Centralize validation of executable configuration for tasks
  • [#21978] - Prepare to make more usage of `DeprecatableConfiguration` into errors
  • [#21954] - Remove DefaultConfiguration#resolveToStateOrLater
  • [#21948] - Investigate how to apply DependencyAdder pattern to "modifiers"
  • [#21907] - Remove deprecated KotlinDslOptions.experimentalWarning
  • [#21884] - Remove @Deprecated AbstractExternalModuleDependency#setForce method
  • [#21881] - Update DefaultRepositoryHandler#deprecateJCenter deprecation to Gradle 9.0
  • [#21879] - Remove @Deprecated DependencyNotationParser#create method
  • [#21876] - ProviderFactory: provide a way to get Gradle properties by a prefix
  • [#21872] - `JavaToolchainFactory#newInstance` silently discards original exception
  • [#21857] - Signing plugin: sign(publications) should be idempotent
  • [#21825] - CCH22-28: Adjust the `snippets/tutorial/configureTaskUsingProjectProperty` sample for configuration cache
  • [#21824] - CCH22-27: Adjust the `snippets/testing/test-suite-multi-configure-each-matching` sample for configuration cache
  • [#21823] - CCH22-26: Adjust the `snippets/testing/test-suite-multi-configure-each` sample for configuration cache
  • [#21822] - CCH22-25: Adjust the `snippets/testing/test-suite-multi-configure-each-extracted` sample for configuration cache
  • [#21821] - CCH22-24: Adjust the `snippets/tasks/incrementalTask` sample for configuration cache
  • [#21820] - CCH22-23: Adjust the `snippets/tasks/incrementalBuild-customTaskClass` sample for configuration cache
  • [#21819] - CCH22-22: Adjust the `snippets/providers/propertyConvention` sample for configuration cache
  • [#21818] - CCH22-21: Adjust the `snippets/kotlinDsl/multiProjectBuild` sample for configuration cache
  • [#21817] - CCH22-20: Adjust the `snippets/java/fixtures` sample for configuration cache
  • [#21816] - CCH22-19: Adjust the `snippets/java/customDirs` sample for configuration cache
  • [#21815] - CCH22-18: Adjust the `snippets/java/crossCompilation` sample for configuration cache
  • [#21814] - CCH22-17: Adjust the `snippets/files/fileCollections` sample for configuration cache
  • [#21813] - CCH22-16: Adjust the `snippets/files/archivesChangedBaseName` sample for configuration cache
  • [#21812] - CCH22-15: Adjust the `snippets/files/archiveNaming` sample for configuration cache
  • [#21811] - CCH22-14: Adjust the `snippets/dependencyManagement/managingTransitiveDependencies-excludeForDependency` sample for configuration cache
  • [#21810] - CCH22-13: Adjust the `snippets/dependencyManagement/managingTransitiveDependencies-excludeForConfiguration` sample for configuration cache
  • [#21809] - CCH22-12: Adjust the `snippets/dependencyManagement/dependencyVerification-disablingVerification` sample for configuration cache
  • [#21808] - CCH22-11: Adjust the `snippets/dependencyManagement/definingUsingConfigurations-custom` sample for configuration cache
  • [#21807] - CCH22-10: Adjust the `snippets/dependencyManagement/customizingResolution-metadataRule` sample for configuration cache
  • [#21806] - CCH22-9: Adjust the `snippets/dependencyManagement/customizingResolution-ivyMetadataRule` sample for configuration cache
  • [#21805] - CCH22-8: Adjust the `snippets/dependencyManagement/customizingResolution-conditionalSubstitutionRule` sample for configuration cache
  • [#21804] - CCH22-7: Adjust the `snippets/dependencyManagement/customizingResolution-classifierSubstitutionRule` sample for configuration cache
  • [#21803] - CCH22-6: Adjust the `snippets/dependencyManagement/customizingResolution-capabilitySubstitutionRule` sample for configuration cache
  • [#21802] - CCH22-5: Adjust the `snippets/buildlifecycle/projectEvaluateEvents` sample for configuration cache
  • [#21801] - CCH22-4: Adjust the `snippets/buildCache/cacheable-bundle-task` sample for configuration cache
  • [#21800] - CCH22-3: Adjust the `snippets/buildCache/cacheable-bundle` sample for configuration cache
  • [#21799] - CCH22-2: Adjust the `snippets/artifacts/generatedFileDependencies` sample for configuration cache
  • [#21794] - Turn invalid toolchain spec deprecation into error
  • [#21792] - De-incubate or remove ExternalPluginValidationPlugin
  • [#21790] - Remove deprecated AntlrSourceVirtualDirectory & AntlrSourceVirtualDirectoryImpl
  • [#21775] - Remove deprecated NamedDomainObjectContainerExtension.invoke
  • [#21772] - Remove deprecated members of the internal PrecompiledScriptPluginsSupport
  • [#21763] - Update dependency-management deprecation warnings to errors in Gradle 8
  • [#21760] - Update AbstractCodeQualityPlugin.createConfigurations to become an error in Gradle 8
  • [#21747] - Update Test.useTestFramework to throw error upon improper usage
  • [#21743] - AntlrPlugin.apply to become an error
  • [#21736] - Remove @Deprecated DefaultWorkerExecutor methods
  • [#21724] - Remove @Deprecated DefaultDependencyHandler.doAdd(Conf, Obj, Closure)
  • [#21718] - Snippet "snippet-init-scripts-configuration-injection" and "snippet-init-scripts-plugins" are not compatible with the configuration cache
  • [#21717] - Snippet "snippet-java-toolchain-filters" is not compatible with the configuration cache
  • [#21714] - Snippet "snippet-groovy-compilation-avoidance" is not compatible with the configuration cache
  • [#21712] - Off-by-one error on Windows path length checks
  • [#21705] - Docs: "Building Java Applications Sample" explanation of build.gradle incomplete
  • [#21683] - Remove @Deprecated VersionCatalog methods
  • [#21681] - Remove @Deprecated methods from TestReport
  • [#21679] - Remove @Deprecated JvmPluginsHelper.configureDocumentationVariantWithArtifact method
  • [#21671] - Configuration cache report misses implicit usages of project methods, resulting to a crash when reusing the cache
  • [#21661] - Remove @Deprecated methods from DependencySubstitutions
  • [#21657] - Remove @Deprecated Groovydoc.IncludePrivate
  • [#21653] - Remove @Deprecated DependencyInsightReportTask.setLegacyShowSinglePathToDependency
  • [#21650] - Remove @Deprecated JacocoPluginExtension.ReportsDir
  • [#21648] - Convert work validation warnings from 7.x into errors
  • [#21647] - Remove @Deprecated methods from DefaultDomainObjectSet, DefaultSourceDirectorySetFactory and SourceDirectorySetFactory
  • [#21642] - Sample "credentials-handling/publishing-credentials" is not compatible with the configuration cache
  • [#21640] - Snippet "snippet-maven-publish-conditional-publishing" is not compatible with the configuration cache
  • [#21594] - Update docs for adhoc-task property builder runtime API to describe equivalent for all annotations
  • [#21561] - `-U` short-form for `--refresh-dependencies`
  • [#21558] - Wrong documentation URL in error message
  • [#21553] - Remove @Deprecated JacocoMerge for Gradle 8.0
  • [#21515] - Add Upgrade Guide notes on Deprecations/Removals
  • [#21509] - Default to latest version of CodeNarc tool
  • [#21503] - Migrate `groovy.util.AntBuilder` → `groovy.ant.AntBuilder`
  • [#21463] - Don't clear `distributionSha256Sum` when updating Gradle wrapper
  • [#21421] - Remove Upload task
  • [#21386] - Make tasks emit Java toolchain usage when uses the current JVM
  • [#21372] - Re-enable disabled test GradleBuildSanityCheckConfigurationCacheSmokeTest
  • [#21334] - Cpp and Swift plugin classes use `Optional.orElse` inefficiently
  • [#21315] - SystemRoot environment variable needs to be defined for GradleRunner Tests on Windows
  • [#21289] - typo in Working with files doc in the user guide
  • [#21164] - Unix start script is overwriting the `APP_NAME` env var value
  • [#21109] - Configuration cache should support non-serializable lambdas
  • [#21085] - Do not track implementation of nested input
  • [#21041] - Do not fix JVM target to 8 when compiling build.gradle.kts files
  • [#21013] - Remove --add-opens for all Gradle worker processes
  • [#20416] - Make `org.gradle.kotlin.dsl.precompiled.accessors.strict` default to true
  • [#20260] - Add reason attribute for <component> elements in verification-metadata.xml
  • [#20156] - `gradle init` is skipped after generating one project with the configuration cache enabled
  • [#20101] - Scala Incremental Compilation for Multi-Module projects broken in 7.x
  • [#20060] - Version catalogs run into unexpected namespace conflicts
  • [#20007] - Ambiguous error when configuration cache entries discarded due to incompatible types
  • [#19829] - A flag to turn `buildSrc` into a composite build
  • [#19790] - Move @Internal for getExtensions from ExtensionAware to Task interface
  • [#19568] - Support Kotlin language/api 1.7 in Kotlin DSL build scripts and plugins
  • [#19538] - Make Task.getName() final
  • [#19382] - Error extracting downloaded toolchain for `JvmImplementation.J9`
  • [#19090] - Restore Test Option Fail Fast Behavior for Gradle 8
  • [#18957] - Missing upgrade docs from 6.9 to 7.0
  • [#18908] - DependencyHandler#add(String, Object, Closure) has incorrect nullability
  • [#18829] - "The Gradle Daemon" documentation FAQ duplicates content
  • [#18824] - Java Toolchains are Incompatible with `--add-exports` for System Modules
  • [#18567] - ./gradlew --export-keys does not do anything without --write-verification-metadata
  • [#17681] - eclipse-wtp EJB projects are not compatible with eclipse "jst.ejb" facet
  • [#17324] - Remove support for using equals() to determine whether a task input property has changed
  • [#17151] - Remove deprecated getters/setters that have a stable property as replacement since 7.0
  • [#17052] - Kotlin 1.5 ".kts" build source, invoke-dynamic for SAM wrappers, and gradle tasks not up to date
  • [#16884] - Repo libs-releases-local outdated, not containing artifacts after 6.1.1
  • [#16783] - Enable deprecation logging for deprecated methods currently used by Kotlin plugin
  • [#16782] - Enable deprecation logging for deprecated methods currently used by Android plugin
  • [#16688] - Make it possible to see all instances of a deprecation finding and not only the first one.
  • [#15888] - Remove pre 5.6 Worker APIs
  • [#15875] - Turn 'Using mustRunAfter/shouldRunAfter/finalizedBy to reference tasks from another build' into an error
  • [#15546] - Remove deprecated injecting the input artifact of a transform as a File
  • [#15503] - Treat outputs with relative path sensitivity
  • [#15496] - Remove `IncrementalTaskInputs`
  • [#14587] - Consolidate snapshotting missing elements in different file collections
  • [#13462] - Make `antlr` plugin support the configuration cache
  • [#13456] - Make `init` plugin support the configuration cache
  • [#12978] - Allow buildSrc to use and see other included builds
  • [#12388] - `Provider.map { nullableValue }` in Kotlin DSL does not work
  • [#12351] - Property 'xxx' with value '/tmp/bug.txt' cannot be serialized with RegularFileProperty
  • [#10066] - Remove old artifact transform API
  • [#9196] - Use worker API for built-in code quality tasks
  • [#8514] - PMD custom rule set documentation unclear
  • [#8224] - Can't easily run junit tests in buildSrc
  • [#9113] - Move stale output cleanup to execution engine
  • [#6305] - Remove --no-rebuild
  • [#2531] - Convert `buildSrc` to be an implicit, included build
  • [#1055] - Command-line init scripts not executed against `:buildSrc` project

New in Gradle 7.6 (Nov 25, 2022)

  • Fixed issues:
  • 149 issues have been fixed in Gradle 7.6.
  • [#22484] - java.sourceSets.main.output.classesDirs no longer depends on the classes task in Gradle 7.6
  • [#22467] - File system events ignored after file watcher error
  • [#22464] - Issue with parallel project model building
  • [#22423] - frequent StackOverflowError in execution plan
  • [#22385] - Gradle-side API to power buildscan.background callbacks in configuration-cache compatible way
  • [#22320] - java.lang.ClassCastException: class org.gradle.execution.plan.CompositeNodeGroup cannot be cast to class org.gradle.execution.plan.OrdinalGroup
  • [#22305] - Custom ValueSource erroneously tracks files etc used in obtain() when ValueSource parameters are passed in
  • [#22295] - Dependency verification - rollback key ring disambiguation
  • [#22279] - Gradle 7.6 (UnsupportedOperationException -> PreResolvedResolvableArtifact.getModuleVersion)
  • [#22235] - ConcurrentModificationException when excluding multi tasks from command line (-x) in a subproject with configureondemand
  • [#22196] - Report @Input annotation misapplied to File/Directory-based properties as warnings
  • [#22144] - Investigate regression on changes to artifact resolution
  • [#22046] - Configuration cache fails when using includeBuild(".")
  • [#22013] - `test-report-aggregation` docs are missing mention of `--continue` flag
  • [#21990] - JacocoReportAggregationPlugin doesn't work with JvmTestSuitePlugin
  • [#21983] - Gradle build package has snakeyaml dependency for plugins has a CVE with high base score
  • [#21975] - 7.5.1 gradle version - java.lang.StackOverflowError at org.gradle.execution.plan.FinalizerGroup$FinalizesMembers.getFilteredSuccessorsFor(FinalizerGroup.java:297)
  • [#21962] - 7.5: mustRunAfter(configuration) causes ActionNode cannot be cast to TaskNode
  • [#21898] - Add deprecation logging to org.gradle.util.GradleVersion.getNextMajor()
  • [#21886] - Deprecate `org.gradle.api.internal.artifacts.dsl.dependencies.DependencyFactory`
  • [#21848] - Gradle distribution jar is not reproducible due to fastutil minification transform
  • [#21839] - Report deprecations for deprecated members from the org.gradle.util package
  • [#21783] - dependency resolution error should be thrown in the same way regardless of whether config caching is enabled or not
  • [#21781] - "withVariantReselection" API broken
  • [#21758] - JavaCompile and Test tasks silently ignore explicit executable if it does not exist
  • [#21748] - <task> --rerun fails on configuration cache hit
  • [#21708] - Can't exclude composite build tasks
  • [#21644] - Incremental compilation after failure issues when all classes are not removed
  • [#21624] - Could not set system property in the new Checkstyle task and finally failed by NPE when using "ENTITY" feature in configuration files
  • [#21616] - Toolchain probing cannot cope with warnings from java
  • [#21610] - Include klib extension as KNOWN_ZIP_EXTENSIONS for java normalization
  • [#21591] - NullPointerException when using convention mapping and a Property for the same name
  • [#21559] - chore: move JUnit and TestNG "dummy" tests to textFixtures
  • [#21542] - StackOverflowError in FinalizerGroup.isCanCancel when handling build failure
  • [#21529] - Add support for JDK19
  • [#21522] - Broken link to processResources on the Java Plugin doc page
  • [#21465] - Cannot extract contents of Renjin 3.5 beta76 archive
  • [#21325] - "Unable to make progress running work" redux
  • [#21323] - Poor performance for fully up-to-date builds on machines with many CPU cores
  • [#21306] - :incubationReport txt reporter broken on Kotlin function signatures spanning multiple lines
  • [#21252] - Gradle does not recover from dependency resolution failures that happen while writing to the cache
  • [#21209] - Introduce Strongly Typed Dependency Block
  • [#21203] - Incremental Annotation Processing Issue when recompiling annotated source dependency
  • [#21158] - Document behavior around `--` to differentiate between task options and Gradle command-line flags
  • [#21116] - StackOverflowError thrown from internal Gradle code.
  • [#21111] - Adding files to variants created from ComponentMetadataRules does not work when SNAPSHOT versions are used
  • [#21074] - ProjectBuilder tests failing when exercising Kotlin multiplatform plugin
  • [#21011] - Deprecate org.gradle.kotlin.dsl.precompiled.accessors.strict=false or unset
  • [#21001] - Add docs and snippets for Sharing Configuration Between Test Suites
  • [#20995] - can't view KDoc or source code of generated Kotlin dependency extensions in IDE
  • [#20981] - Gradle init doesn't escape single quotes
  • [#20977] - Upgrade Kotlin to 1.7.0 and maybe try out the K2 compiler?
  • [#20975] - Artifact transforms execute before all dependencies are ready
  • [#20956] - Add priority order for disambiguation rules to resolvableConfigurations report
  • [#20945] - Composite builds fail when reusing configuration cache
  • [#20928] - `Manifest.from(Object...)` does not support merging Manifest implementations
  • [#20902] - Accept Provider<String> for configuring testing framework versions
  • [#20891] - `startScripts` relies on `chmod` being in the PATH.
  • [#20883] - Stop computing a logging string that is not used
  • [#20857] - Incorrect warning in "Working with files" documentation
  • [#20852] - Typo in docs: version should be versionRef.
  • [#20847] - Plugin variants are ignored when plugin is added as buildSrc common dependency
  • [#20846] - Test task avoidance is not working since Gradle 7.4.x
  • [#20824] - Buildscript jars are not keeping their original compression
  • [#20813] - `CachingJvmMetadataDetector` caches metadata of invalid installations for the lifetime of the daemon, not build
  • [#20794] - Instrument invokedynamic-based Groovy bytecode for configuration cache input detection
  • [#20778] - IdentityTransform fails with FileNotFound after updating to 7.5-rc1
  • [#20740] - Gradle should log empty javac arguments as quotes pair in debug mode
  • [#20728] - Add https://pgp.mit.edu to the list of default key servers.
  • [#20722] - Task buildNeeded and buildDependents resolve configuration too early
  • [#20709] - Config cache exception on JDK 17: InaccessibleObjectException CopyOnWriteArrayList.writeObject
  • [#20708] - @Classpath with @NormalizeLineEndings fails to capture differences in zip entries on JDK8
  • [#20702] - Follow up for optimistic locking changes #20687
  • [#20695] - Precompiled Kotlin script plugins are broken in explicit API mode
  • [#20668] - Fix implicit command-line ordering test in AbstractIdeLifecycleIntegrationTest
  • [#20644] - JVM 9+ No Way to Enable Remote Debugging
  • [#20641] - Option to rerun only requested tasks
  • [#20630] - InitBuild task should convert Maven `compile` scope to `api`, not `implementation`
  • [#20626] - Documentation for how to access gradle.properties values in settings.gradle could be enhanced
  • [#20612] - error during build: BuildOperationType.java unmappable character (0x9D) for encoding windows-1252
  • [#20611] - No way to apply --no-daemon: current process arguments format bug
  • [#20579] - Re-use Scala compiler between runs
  • [#20517] - Implicit Dependency deprecation warning links to default "Authoring Tasks" in Build Scans
  • [#20510] - DirectDependenciesMetadata removals "mutate" previously returned DirectDependencyMetadata instances, removeAll(Collection) is completely broken‼
  • [#20482] - When using the jacoco report aggregation plugin, some classes are not clickable in the report.
  • [#20478] - Incremental java compiler does not detect changes to classes used in type parameters in some cases
  • [#20473] - `./gradlew projects` fails the second time with configuration cache enabled
  • [#20468] - Update vulnerable and old dependencies in gradle distribution (7.4.2)
  • [#20461] - "--offline" execution option should be considered as configuration input
  • [#20432] - JaCoCo Report Aggregation Plugin uses JARs not class directories in allCodeCoverageReportClassDirectories configuration
  • [#20372] - Support Java 19
  • [#20370] - Version Catalogs documentation is outdated regards using values defined in Versions scope
  • [#20243] - Consider removing the deprecation on catalog names
  • [#20142] - publish using maven-publish resulting in shrinked pom.xml version
  • [#20140] - Key exporting writes out duplicate keys
  • [#20062] - Regression in primary task ordering
  • [#19953] - Composite Builds Hierarchical Multirepo Sample - fails when following the instructions
  • [#19939] - Gradle 7.4 regression in toolchain support, gradle reports `Invalid encoding name "UTF8"`
  • [#19870] - JVM Test Suite Plugin for integrationTest, how to add all test dependencies to integrationTest task in multi module project
  • [#19842] - `publish` task from `maven-publish` plugin should work with configuration cache
  • [#19761] - Update DefaultJvmTestSuite and BuildInit to use JUnit 5 when applying useKotlinTest
  • [#19759] - Improve TestLauncher interface
  • [#19752] - VERSION_CATALOGS feature fails if any dir in project path starts with character "u": "illegal unicode escape"
  • [#19734] - Upgrade embedded Kotlin to 1.7.10
  • [#19608] - Improve outputContains output for integration testing
  • [#19602] - Make compile tasks incremental after a failure
  • [#19453] - Incremental cache lost after a compilation error when using Micronaut
  • [#19446] - Throws TimeoutException during configuration (after 1 minute, Gradle Kotlin IO impl)
  • [#19296] - Document where to find Options from tasks
  • [#19234] - JavaToolchainService not available on JVM ecosystem projects
  • [#19232] - gradleTestKit not available in test suite
  • [#19192] - Named argument notation not supported for dependencies in test suite plugin
  • [#19140] - Support "Zulu OpenJDK Discovery API" for auto provisioning toolchains
  • [#19085] - Remove internal `org.gradle.kotlin.dsl.accessors` feature flag
  • [#19077] - [Build Scans] Class-based Settings Plugin breaks build scans when using pluginManagement.includeBuild(...)
  • [#18698] - Add a classifier property to the Distribution type
  • [#18627] - Update bundled JUnit 5 launcher
  • [#18227] - Precompiled Kotlin DSL scripts fix the JVM target to 8
  • [#17575] - Allow setting a custom timeout for gradle wrapper download
  • [#17470] - `dependencies` task is not compatible with the configuration cache
  • [#17334] - Report the number of tasks scheduled for execution to TAPI clients
  • [#17327] - Support serializable lambdas for up-to-date checks
  • [#16897] - IBM JDK is detected but never selected
  • [#16865] - DependencyHandler create method is missing configure with Action overload
  • [#16702] - "properties" task is not configuration cache compatible
  • [#16642] - Retry connection connection closed during resolution.
  • [#16596] - Support auto-download of Java toolchains for more vendors than just AdoptOpenJDK
  • [#16423] - Configuration cache - patterns are not serialized for the file tree
  • [#16295] - TestLauncher TAPI improvements
  • [#16140] - Gradle javaToolChains - output is misleading
  • [#15918] - javaToolchains task provides insufficient error information
  • [#15326] - gradle init should not create buildSrc but use included build logic builds
  • [#14375] - Public API for deciding whether config caching is enabled
  • [#13601] - No java incremental compile after compile failure - "unable to get source-classes mapping relationship from last compilation."
  • [#13274] - Re-use compiler daemons between builds
  • [#12912] - Improve test setup and documentation for Java & JVM projects
  • [#11703] - Build script class names depend on the absolute path
  • [#9166] - Ability to re-run selected tasks
  • [#7923] - Task action implementation is not tracked when added via Task.doLast(String, Action)
  • [#7541] - Add ability to specify "name" for task.onlyIf actions (and possibly others like upToDateWhen)
  • [#3605] - Remove wrapper zip after unzipping
  • [#1775] - Project.afterEvaluate execution order is not specified in documentation
  • [#22582] - Regression in 7.6-rc-1 when using invalid Maven repository name
  • [#22566] - Add extra entries to JavaVersion for future compatibility
  • [#22552] - 7.6 RC1: UnsupportedNotationException for version catalog dependency bundle
  • [#22650] - 7.6 RC1/2: UnsupportedNotationException for version catalog bundle dependency constraint
  • [#22761] - "Unable to make progress running work" redux2
  • [#22734] - "Unable to make progress running work" using 7.6-rc-3
  • [#22720] - 7.6 RC3: DependencyAdder.invoke cannot be called with the arguments supplied

New in Gradle 7.5.1 (Aug 6, 2022)

  • It fixes the following issues:
  • JavaVersion.VERSION_18 is still marked @Incubating
  • NullPointerException when passing certain types of config properties to Checkstyle
  • Finalizers of finalizers no longer execute when upstream task fails
  • CheckStyle fails because it has no javaLauncher configured
  • Update upgrading guide to warn about change in Checkstyle working directory
  • Storing a task property set to a ValueSource provider with ValueSourceParameters.None parameter type into configuration cache fails
  • Gradle 7.5 Javadoc plugin is broken for multi-module aggregation (due to setting --source-path)
  • Scala compilation fails with 'rt.jar (class sbt.internal.inc.DummyVirtualFile) is not supported'

New in Gradle 7.5 RC 3 (Jun 30, 2022)

  • Support for Java 18:
  • Gradle now supports running on and building with Java 18.
  • Support for Groovy 4:
  • Gradle now supports building software using Groovy 4.0. Note that Groovy DSL buildscripts still use Groovy 3.
  • Scala Zinc has been updated:
  • The default Scala Zinc version was updated to 1.6.1
  • Zinc is the Scala incremental compiler that allows Gradle to always compile the minimal set of files needed by the current file changes. It takes into account which methods are being used and which have changed, which means it’s much more granular than just interfile dependencies.
  • Continuous Build is much more responsive on Windows and macOS with Java 9+:
  • Continuous Build automatically re-executes the build with the same requested tasks when inputs change. This allows for continuous feedback during development.
  • Because of the internal changes in the JDK, Continuous Build did not work well on Windows and macOS on Java 9 and higher. It could take up to 10 seconds to detect a change and trigger a build.
  • Now Gradle picks up changes nearly instantly on Windows and macOS for all Java versions as well, making Continuous Build respond quickly on all major operating systems. This is because Gradle now uses its own robust and natively implemented file system watching system instead of relying on the generic API in the JDK.
  • Improved diagnostic reports for dependency resolution:
  • Outgoing Variants:
  • The outgoingVariants report now provides additional information that allows further insight into variant aware dependency resolution results.
  • This report is useful when determining why a particular variant of this producer project was selected by another consumer project when the producer depends upon the consumer. Run the report from the producer project, to list every variant built by it (including secondary variants only visible to other local projects). The output contains the capabilities and attributes present on each variant of the producer, along with other information detailed below. This output can be compared against the output of the new resolvableConfigurations report run in the consumer.
  • Descriptions are now printed for secondary variants, if present.
  • Configurations using @Incubating attributes are marked with an (i).
  • The legend at the bottom of the report clarifies the usage of secondary variants.
  • The formatting (and coloring for rich console) of the output is now clearer and more consistent with other reports.
  • Capabilities, Attributes and Artifact lists are alphabetically sorted.
  • (not shown) Classifiers are now printed next to artifacts if present.
  • (not shown) New messages when using --all and --variant options to better describe results (or the lack thereof)
  • Description available on secondary variants:
  • When defining secondary variants, which are variants available only to other local Gradle projects, there is a new ConfigurationVariant method available to supply a note or description for the variant. These descriptions will be printed by the outgoingVariants report and defaults have been added for existing secondary variants produced by the Java plugin.
  • Resolvable Configurations:
  • There is a new resolvableConfigurations report available which will display information about all the configurations in a project that can be resolved.
  • This report compliments the outgoingVariants report and is meant to be run from the consumer side of a dependency to determine why a particular variant of a producer project was selected by this consumer project when the consumer depends upon the producer. It includes the following information:
  • Description, Attributes and (directly) extended Configurations
  • A --recursive option flag can be set to display all configurations which are extended transitively
  • Attributes affected by Compatibility or Disambiguation rules during resolution listed
  • A --configuration option can limit this report to a single configuration
  • A --all option flag can be set to include legacy configurations which are both resolvable and consumable; these will be hidden by default
  • See the ResolvableConfigurationsReportTask DSL reference for more details.
  • Dependency Insights:
  • The dependencyInsight report provides information about a specific dependency, including what variant was selected, and the attributes used during resolution.
  • The report now uses a table to display variants, which makes it easier to tell where attribute values are from, and see why a particular variant was selected
  • The variant name is listed at the top, after the word "Variant"
  • The variant output is now in table format.
  • Attributes only present in the variant's metadata only contain text in the "Provided" column
  • Attributes present in both the variant's metadata and requested by the configuration contain text in both columns
  • Attributes only requested by the configuration only contain text in the "Requested" column
  • As seen in (3) and (5), items are colored orange if they are not present in one column. The table is sorted first by groups (3), (4), and (5); then alphabetically inside each group.
  • Dependency resolution results can be used as task inputs:
  • Tasks may need to access dependency resolution results. For example, built-in tasks like dependencies and dependencyInsight do so in order to provide reporting about resolved artifacts and dependency graphs. Other tasks may produce file outputs based on dependency resolution results. Previously, it was only possible by performing dependency resolution in a task action. However, this resulted in suboptimal performance.
  • Starting with Gradle 7.5 it is now possible to declare dependency resolution results as task inputs.
  • This allows writing tasks which consume dependency resolution results. Declaring such inputs instead of doing undeclared dependency resolution in task actions allows Gradle to optimise for build incrementality. Additionally, these new types of task inputs are fully supported by the configuration cache.
  • You can learn more in the Authoring Tasks user manual chapter and with the dedicated sample.
  • Configuration cache improvements:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing this for subsequent builds.
  • Running external processes at configuration time:hg
  • Previously, external processes started with exec or javaexec APIs were ignored by configuration cache, and it could be a potential correctness issue if the output of the external process affects the configuration.
  • A new Provider-based API is now available to obtain the output of the external process in the configuration-cache-compatible way. The exec and javaexec APIs are now disallowed if the configuration cache is enabled in order to prevent potential issues.
  • If a more complex interaction with the external process is necessary, then a custom ValueSource implementation can be used. The injected ExecOperations service should be used to run the external process.
  • Files read at configuration time become build configuration inputs:
  • Files read at configuration time with FileInputStream or some Kotlin APIs now automatically become build configuration inputs. The configuration cache is invalidated if the contents of such file(s) change between builds.
  • Previously, file reads were ignored, and it could be a potential correctness issue if the contents of the file(s) affected the configuration.
  • New ways to access environment without unnecessary invalidations of the configuration cache:
  • Since the automatic build configuration inputs detection was introduced in Gradle 7.4, some common patterns of reading subsets of environment variables or system properties were causing excessive invalidations of the configuration cache, leading to suboptimal performance. For example, iterating over all environment variables to find the ones with names starting with some prefix caused all available variables, even the unrelated ones, to become configuration inputs.
  • Two new options are now available to mitigate that. For simpler use cases, there are the Provider-based APIs to access system properties or environment variables with names starting with some prefix. Advanced processing, like filtering names with regular expression, can be done inside a custom ValueSource implementation. Reading a file, an environment variable, or a system property no longer adds a build configuration input inside the implementation of the ValueSource. The value of the ValueSource is recomputed each time the build runs, and the configuration cache entry is only invalidated if the value changes.
  • New compatible plugins and tasks:
  • The kotlin-dsl plugin is now compatible with the configuration cache.
  • The dependencyInsight, outgoingVariants and resolvableConfigurations tasks are now compatible with the configuration cache.
  • New STABLE_CONFIGURATION_CACHE feature flag:
  • Configuration caching introduces a number of requirements regarding the build logic. Many problems are already reported in the HTML report. At the moment, adjusting the build logic to be fully compatible with configuration cache can be a significant effort for complex builds.
  • This release introduces the STABLE_CONFIGURATION_CACHE flag allowing gradual rollout of the most potentially disruptive requirements. This flag currently enables validations like detecting undeclared shared build service usage and external processes used at configuration time.
  • It is recommended to enable this flag as soon as possible in order to be ready for when the flag is removed and make the linked features enabled by default.
  • JVM toolchains improvements:
  • Java toolchains provide an easy way to declare which Java version your project should be built with. By default, Gradle will detect installed JDKs or automatically download new toolchain versions.
  • Java toolchains can download any JDK by automatically selecting between Adoptium and AdoptOpenJDK
  • Gradle now checks the Adoptium API first when downloading JDKs, rather than only using the legacy AdoptOpenJDK API. This allows downloading the new JDK 18 releases, which are not available via AdoptOpenJDK, while still maintaining the ability to download versions that are no longer supported by Adoptium, such as JDK 9-10 and 12-16.
  • In case you are using an internal mirror to download JDKs, there is a new Gradle property org.gradle.jvm.toolchain.install.adoptium.baseUri to control the Adoptium base URI. This is in addition to theorg.gradle.jvm.toolchain.install.adoptopenjdk.baseUri property, which is still used if a JDK is not found in the Adoptium API.
  • IDE integration improvements:
  • Improved test sources separation in Eclipse:
  • This release provides improved support for test sources in Eclipse.
  • The Eclipse classpath file generated by the eclipse plugin has the following changes:
  • Project dependencies defined in test configurations get the test=true classpath attribute
  • All source sets and dependencies defined by the JVM Test Suite plugin are also marked as test code by default
  • The eclipse plugin DSL exposes properties to configure test sources
  • Query a single property with the properties task:
  • The built-in properties task prints all project properties to the console. Now, the task takes an optional --property argument which configures it to display the selected property only.This is useful for keeping track of specific properties on CI systems, and requires much less parsing and filtering than before.
  • Groovydoc exposes more options:
  • The Groovydoc task now exposes more options:
  • access: for controlling the access levels included in the documentation, defaults to PROTECTED
  • includeAuthor: for controlling whether the author is displayed in the documentation, defaults to false
  • processScripts: for controlling whether scripts are included in the documentation, defaults to true
  • includeMainForScripts: for controlling whether a script's main method is included in the documentation, defaults to true
  • These defaults are the same as what was previously used, so there should be no changes to the default behavior.
  • --show-version (-V) flag:
  • The -V flag (long form --show-version) instructs Gradle to first print version information and then continue executing any requested tasks. This is in contrast to the pre-existing -v (long form --version) flag which prints version information and then immediately exits.
  • This flag may be useful in CI environments to record Gradle version information in the log as part of a single Gradle execution.
  • Performance Improvements:
  • Checkstyle tasks use toolchains and execute in parallel by default
  • The Checkstyle plugin now uses the Gradle worker API to run Checkstyle as an external worker process, so that multiple Checkstyle tasks may now run in parallel within a project. This can greatly increase overall build performance when several of these tasks exist within a single project. You can adjust the memory used by the Checkstyle process via the minHeapSize and maxHeapSize properties on the Checkstyle task. In case of out of memory errors please see the Gradle 7.x upgrade guide.
  • Checkstyle now uses JVM toolchains in order to minimize JDK installation requirements. In Java projects, Checkstyle will use the same version of Java required by the project. In other types of projects, Checkstyle will use the version of Java that is used by the Gradle daemon.
  • Run a single PMD task on multiple threads:
  • PMD is a quality analysis tool that runs on the Java source files of your project.
  • With this version of Gradle, the thread parameter PMD offers is now exposed through the PMD extension and tasks. This allows configuration of PMD to run its analysis on more than one thread.
  • See the documentation for more information.
  • Better test compatibility with Java 9+:
  • When running on Java 9+, Gradle no longer opens the java.base/java.util and java.base/java.lang JDK modules for all Test tasks. In some cases, this would cause code to pass during testing but fail at runtime.
  • This change may cause new test failures and warnings. When running on Java 16+, code performing reflection on JDK internals will now fail tests. When running on Java 9-15, illegal access warnings will appear in logs. While this change may break some existing builds, most failures are likely to uncover suppressed issues which would have only been detected at runtime.
  • For a detailed description on how to mitigate this change, please see the upgrade guide for details.
  • Fixed issues:
  • 88 issues have been fixed in Gradle 7.5.
  • [#21125] - "Unable to make progress running work" using 7.5-rc-3
  • [#21116] - StackOverflowError thrown from internal Gradle code.
  • [#20987] - Broken links for 7.5-rc-2 release notes
  • [#20668] - Fix implicit command-line ordering test in AbstractIdeLifecycleIntegrationTest
  • [#20910] - `mustRunAfter` constraint is violated by `finalizedBy` dependency
  • [#20897] - Incorrect task ordering in Gradle 7.5-rc-1 (and possibly earlier versions)
  • [#20892] - Build fails with "Task was never scheduled for execution" exception when configuration cache is enabled
  • [#20800] - Misdetected cycle on combination of `finalizedBy` and `mustRunAfter` constraints
  • [#20785] - `ResolvedArtifactResult` cannot be fingerprinted when there are outputs in 7.5-rc-1
  • [#20780] - Remember to double check the releases.xml update after RC2 is built
  • [#20779] - `ArtifactCollection.getResolvedArtifacts()` is not compatible with configuration cache if combined with artifact views
  • [#21000] - Misdetected cycle issue after upgrading to 7.5-rc-2
  • [#20684] - Gradle refresh in IntelliJ IDEA fails with IllegalStateException: Unexpected parent dependency id error with spring-boot 2.6.7
  • [#19771] - Gradle worker should not open any packages during tests
  • [#20741] - 7.5 nightly slows down or hangs when many tasks are requested on the command-line
  • [#20680] - Wrong inputs detected when using large filtered file trees
  • [#20659] - Regression in ArtifactTransforms for transforming artifactType from jar to directory
  • [#20559] - Creator-destroyer relationship for tasks from different projects not upheld during parallel execution
  • [#20508] - Possible unexpected state in scheduler causing deadlock
  • [#20485] - Clarify docs re: CLI task ordering
  • [#20406] - Toolchain not downloading Java18 for specific vendor
  • [#20398] - Failing to fingerprint the class API should not fail the entire zip/jar
  • [#20394] - Support latest JDK features while inspecting classes
  • [#20391] - Task outputs are wrongly detected in conjunction with filtered file trees
  • [#20390] - Using `rename { ... }` in `Copy` task silently breaks configuration cache
  • [#20377] - configureondemand causes build failure in multi module project with different group name
  • [#20375] - Adjust documentation in Jacoco Report Agreggation plugin and Test Report Aggregation
  • [#20371] - Configuration cache failure in 7.4.2 caused by kapt
  • [#20344] - Toolchain cannot download JDK 18
  • [#20329] - Dependency resolution depends on existence of external POMs
  • [#20254] - Build with included builds fails with "Unable to make progress running work"
  • [#20224] - gradle depends on an insecure third-party JAR package that contains the CVE vulnerability
  • [#20182] - Imported BOM parsing fails if published with Gradle Module Metadata
  • [#20178] - Add "threads" configuration option to PmdExtension
  • [#20113] - Support annotationProcessor in Test Suites' dependencies block
  • [#20098] - Dependency verification fails for signed klib artifacts
  • [#20079] - Build cache miss with TYPESAFE_PROJECT_ACCESSORS
  • [#20033] - Plugin Development plugin declares inputs with custom equals()
  • [#19959] - notCompatibleWithConfigurationCache failed to force errors into warnings
  • [#19914] - Tests should run after `jar` task
  • [#19882] - Dependency constraint on project with newer version does not upgrade dependency on Maven artifact
  • [#19817] - Setting bootClasspath can cause build failure with obscure message on Windows only after upgrade to 7.3.x
  • [#19786] - Support xfs for file watching. Report file system type when found to be unsupported
  • [#19780] - Pattern `fileCollection.filter(predicate).getAsFileTree().matching(patternSet)` is not supported by the configuration cache
  • [#19753] - Fix DefaultMutableAttributeContainer behavior when updating attributes using both eager and lazy values
  • [#19751] - Default checkstyle version does not support sealed modifier
  • [#19682] - Unix start script doesn't respect JAVA_OPTS when xargs isn't installed
  • [#19621] - Document limitations of continuous build
  • [#19605] - Remove https://keys.fedoraproject.org from key servers
  • [#19525] - Add new ResolvableVariants Report
  • [#19493] - Extend `PropertyReportTask` to allow specifying which property to query
  • [#19470] - Allow Gradle Enterprise plugin to read access key files during configuration phase
  • [#19426] - Relative paths for detected file inputs are wrong in the configuration cache report
  • [#19408] - Take filename into account for caching artifact transform results
  • [#19308] - Upgrade embedded Kotlin to 1.6.10
  • [#19283] - Support JDK 18
  • [#19282] - Make obscure "no signature of method" error message useful
  • [#18935] - Strange JVM target warning from Kotlin DSL in buildSrc
  • [#18823] - Wrong Gradle 7.2 documentation for version conflict resolution when only ranges involved
  • [#18746] - Generalize `TaskInputsListeners`
  • [#18637] - Kotlin DSL "classpath mode" leniency doesn't capture after evaluation exceptions
  • [#18566] - Incorrect result when TestNG 7.x test times out
  • [#18528] - Be able to skip implicit adding of gradlePluginPortal repo
  • [#18486] - Properly analyze jar files without directory entries during test scanning
  • [#18432] - Configuration cache doesn't capture system property updates during configuration
  • [#18177] - `project.sync` is not allowing to specify `preserve` even though the `Sync` task does and the documentation explicitly mentions it
  • [#18138] - Eclipse classpath should be able to use test fixtures in implementation dependencies
  • [#17558] - dependencyInsight task is not configuration cache compatible
  • [#17543] - Review types excluded from annotation analysis
  • [#17208] - Confusing error message when build cache can't clean output directory
  • [#17013] - Deadlock when task outputs are calculated from input configuration
  • [#16998] - IterationOrderRetainingSetElementSource#add takes time linear in the collection size
  • [#16982] - NullPointerException during isolation of artifact transform parameters and shared build service configuration
  • [#15491] - Scala 2.13 with Zinc 1.4.3 fails with NoSuchMethodError
  • [#15428] - Gradle Windows scripts don't propagate exit codes correctly
  • [#15128] - DirectoryProperty.files() resolves incorrectly
  • [#14984] - Invalid closure configuration methods lead to cryptic error messages
  • [#14874] - Custom Remote Build Cache does not work with configuration cache enabled
  • [#13819] - Provide a configuration cache friendly way of looking up a subset of system properties and environment variables
  • [#13623] - Task dependency is silently dropped with mismatching setter.
  • [#13362] - Project properties not accessible from settingsEvaluated
  • [#12871] - Introduce APIs to represent a resolved dependency graph in a lazy manner
  • [#12550] - Add flag to hide welcome message
  • [#11834] - Use same infrastructure for VFS retention and continuous build
  • [#10507] - Gradle 5.6.2 and TestNG 7.0.0 incompatibility
  • [#9048] - Deprecate `IncrementalTaskInputs`
  • [#4841] - Javadoc does not take into account custom options
  • [#3427] - Continuous build responsiveness is too slow on mac

New in Gradle 7.5 RC 2 (Jun 10, 2022)

  • Support for Java 18:
  • Gradle now supports running on and building with Java 18.
  • Support for Groovy 4:
  • Gradle now supports building software using Groovy 4.0. Note that Groovy DSL buildscripts still use Groovy 3.
  • Scala Zinc has been updated
  • The default Scala Zinc version was updated to 1.6.1:
  • Zinc is the Scala incremental compiler that allows Gradle to always compile the minimal set of files needed by the current file changes. It takes into account which methods are being used and which have changed, which means it’s much more granular than just interfile dependencies.
  • Continuous Build is much more responsive on Windows and macOS with Java 9+:
  • Continuous Build automatically re-executes the build with the same requested tasks when inputs change. This allows for continuous feedback during development.
  • Because of the internal changes in the JDK, Continuous Build did not work well on Windows and macOS on Java 9 and higher. It could take up to 10 seconds to detect a change and trigger a build.
  • Now Gradle picks up changes nearly instantly on Windows and macOS for all Java versions as well, making Continuous Build respond quickly on all major operating systems. This is because Gradle now uses its own robust and natively implemented file system watching system instead of relying on the generic API in the JDK.
  • Improved diagnostic reports for dependency resolution:
  • Outgoing Variants:
  • The outgoingVariants report now provides additional information that allows further insight into variant aware dependency resolution results.
  • This report is useful when determining why a particular variant of this producer project was selected by another consumer project when the producer depends upon the consumer. Run the report from the producer project, to list every variant built by it (including secondary variants only visible to other local projects). The output contains the capabilities and attributes present on each variant of the producer, along with other information detailed below. This output can be compared against the output of the new resolvableConfigurations report run in the consumer.
  • Descriptions are now printed for secondary variants, if present.
  • Configurations using @Incubating attributes are marked with an (i).
  • The legend at the bottom of the report clarifies the usage of secondary variants.
  • The formatting (and coloring for rich console) of the output is now clearer and more consistent with other reports.
  • Capabilities, Attributes and Artifact lists are alphabetically sorted.
  • (not shown) Classifiers are now printed next to artifacts if present.
  • (not shown) New messages when using --all and --variant options to better describe results (or the lack thereof)
  • Description available on secondary variants:
  • When defining secondary variants, which are variants available only to other local Gradle projects, there is a new ConfigurationVariant method available to supply a note or description for the variant. These descriptions will be printed by the outgoingVariants report and defaults have been added for existing secondary variants produced by the Java plugin.
  • Resolvable Configurations:
  • There is a new resolvableConfigurations report available which will display information about all the configurations in a project that can be resolved.
  • This report compliments the outgoingVariants report and is meant to be run from the consumer side of a dependency to determine why a particular variant of a producer project was selected by this consumer project when the consumer depends upon the producer. It includes the following information
  • Dependency Insights:
  • The dependencyInsight report provides information about a specific dependency, including what variant was selected, and the attributes used during resolution.
  • The report now uses a table to display variants, which makes it easier to tell where attribute values are from, and see why a particular variant was selected
  • Dependency resolution results can be used as task inputs
  • Tasks may need to access dependency resolution results. For example, built-in tasks like dependencies and dependencyInsight do so in order to provide reporting about resolved artifacts and dependency graphs. Other tasks may produce file outputs based on dependency resolution results. Previously, it was only possible by performing dependency resolution in a task action. However, this resulted in suboptimal performance.
  • Starting with Gradle 7.5 it is now possible to declare dependency resolution results as task inputs.
  • This allows writing tasks which consume dependency resolution results. Declaring such inputs instead of doing undeclared dependency resolution in task actions allows Gradle to optimise for build incrementality. Additionally, these new types of task inputs are fully supported by the configuration cache.
  • You can learn more in the Authoring Tasks user manual chapter and with the dedicated sample.
  • Configuration cache improvements:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing this for subsequent builds.
  • Running external processes at configuration time:
  • Previously, external processes started with exec or javaexec APIs were ignored by configuration cache, and it could be a potential correctness issue if the output of the external process affects the configuration.
  • A new Provider-based API is now available to obtain the output of the external process in the configuration-cache-compatible way. The exec and javaexec APIs are now disallowed if the configuration cache is enabled in order to prevent potential issues.
  • If a more complex interaction with the external process is necessary, then a custom ValueSource implementation can be used. The injected ExecOperations service should be used to run the external process.
  • Files read at configuration time become build configuration inputs:
  • Files read at configuration time with FileInputStream or some Kotlin APIs now automatically become build configuration inputs. The configuration cache is invalidated if the contents of such file(s) change between builds.
  • Previously, file reads were ignored, and it could be a potential correctness issue if the contents of the file(s) affected the configuration.
  • New ways to access environment without unnecessary invalidations of the configuration cache:
  • Since the automatic build configuration inputs detection was introduced in Gradle 7.4, some common patterns of reading subsets of environment variables or system properties were causing excessive invalidations of the configuration cache, leading to suboptimal performance. For example, iterating over all environment variables to find the ones with names starting with some prefix caused all available variables, even the unrelated ones, to become configuration inputs.
  • Two new options are now available to mitigate that. For simpler use cases, there are the Provider-based APIs to access system properties or environment variables with names starting with some prefix. Advanced processing, like filtering names with regular expression, can be done inside a custom ValueSource implementation. Reading a file, an environment variable, or a system property no longer adds a build configuration input inside the implementation of the ValueSource. The value of the ValueSource is recomputed each time the build runs, and the configuration cache entry is only invalidated if the value changes.
  • New compatible plugins and tasks:
  • The kotlin-dsl plugin is now compatible with the configuration cache.
  • The dependencyInsight, outgoingVariants and resolvableConfigurations tasks are now compatible with the configuration cache.
  • New STABLE_CONFIGURATION_CACHE feature flag
  • Configuration caching introduces a number of requirements regarding the build logic. Many problems are already reported in the HTML report. At the moment, adjusting the build logic to be fully compatible with configuration cache can be a significant effort for complex builds.
  • This release introduces the STABLE_CONFIGURATION_CACHE flag allowing gradual rollout of the most potentially disruptive requirements. This flag currently enables validations like detecting undeclared shared build service usage and external processes used at configuration time.
  • It is recommended to enable this flag as soon as possible in order to be ready for when the flag is removed and make the linked features enabled by default.
  • Learn more about what this feature flag enables in the user manual.
  • JVM toolchains improvements:
  • Java toolchains provide an easy way to declare which Java version your project should be built with. By default, Gradle will detect installed JDKs or automatically download new toolchain versions.
  • Java toolchains can download any JDK by automatically selecting between Adoptium and AdoptOpenJDK
  • Gradle now checks the Adoptium API first when downloading JDKs, rather than only using the legacy AdoptOpenJDK API. This allows downloading the new JDK 18 releases, which are not available via AdoptOpenJDK, while still maintaining the ability to download versions that are no longer supported by Adoptium, such as JDK 9-10 and 12-16.
  • In case you are using an internal mirror to download JDKs, there is a new Gradle property org.gradle.jvm.toolchain.install.adoptium.baseUri to control the Adoptium base URI. This is in addition to theorg.gradle.jvm.toolchain.install.adoptopenjdk.baseUri property, which is still used if a JDK is not found in the Adoptium API.
  • IDE integration improvements
  • Improved test sources separation in Eclipse:
  • This release provides improved support for test sources in Eclipse.
  • The Eclipse classpath file generated by the eclipse plugin has the following changes:
  • Project dependencies defined in test configurations get the test=true classpath attribute
  • All source sets and dependencies defined by the JVM Test Suite plugin are also marked as test code by default
  • The eclipse plugin DSL exposes properties to configure test sources
  • Query a single property with the properties task:
  • The built-in properties task prints all project properties to the console. Now, the task takes an optional --property argument which configures it to display the selected property only.
  • This is useful for keeping track of specific properties on CI systems, and requires much less parsing and filtering than before.
  • Groovydoc exposes more options:
  • The Groovydoc task now exposes more options:
  • access: for controlling the access levels included in the documentation, defaults to PROTECTED
  • includeAuthor: for controlling whether the author is displayed in the documentation, defaults to false
  • processScripts: for controlling whether scripts are included in the documentation, defaults to true
  • includeMainForScripts: for controlling whether a script's main method is included in the documentation, defaults to true
  • These defaults are the same as what was previously used, so there should be no changes to the default behavior.
  • --show-version (-V) flag
  • The -V flag (long form --show-version) instructs Gradle to first print version information and then continue executing any requested tasks. This is in contrast to the pre-existing -v (long form --version) flag which prints version information and then immediately exits.
  • This flag may be useful in CI environments to record Gradle version information in the log as part of a single Gradle execution.
  • Performance Improvements:
  • Checkstyle tasks use toolchains and execute in parallel by default:
  • The Checkstyle plugin now uses the Gradle worker API to run Checkstyle as an external worker process, so that multiple Checkstyle tasks may now run in parallel within a project. This can greatly increase overall build performance when several of these tasks exist within a single project. The memory used by the process is controlled via the minHeapSize and maxHeapSize properties.
  • Checkstyle now uses JVM toolchains in order to minimize JDK installation requirements. In Java projects, Checkstyle will use the same version of Java required by the project. In other types of projects, Checkstyle will use the version of Java that is used by the Gradle daemon.
  • Run a single PMD task on multiple threads:
  • PMD is a quality analysis tool that runs on the Java source files of your project.
  • With this version of Gradle, the thread parameter PMD offers is now exposed through the PMD extension and tasks. This allows configuration of PMD to run its analysis on more than one thread.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • The TargetJvmEnvironment interface is now stable.
  • Fixed issues:
  • 81 issues have been fixed in Gradle 7.5.
  • [#20668] - Fix implicit command-line ordering test in AbstractIdeLifecycleIntegrationTest
  • [#20910] - `mustRunAfter` constraint is violated by `finalizedBy` dependency
  • [#20897] - Incorrect task ordering in Gradle 7.5-rc-1 (and possibly earlier versions)
  • [#20892] - Build fails with "Task was never scheduled for execution" exception when configuration cache is enabled
  • [#20800] - Misdetected cycle on combination of `finalizedBy` and `mustRunAfter` constraints
  • [#20785] - `ResolvedArtifactResult` cannot be fingerprinted when there are outputs in 7.5-rc-1
  • [#20780] - Remember to double check the releases.xml update after RC2 is built
  • [#20779] - `ArtifactCollection.getResolvedArtifacts()` is not compatible with configuration cache if combined with artifact views
  • [#20741] - 7.5 nightly slows down or hangs when many tasks are requested on the command-line
  • [#20680] - Wrong inputs detected when using large filtered file trees
  • [#20659] - Regression in ArtifactTransforms for transforming artifactType from jar to directory
  • [#20559] - Creator-destroyer relationship for tasks from different projects not upheld during parallel execution
  • [#20508] - Possible unexpected state in scheduler causing deadlock
  • [#20485] - Clarify docs re: CLI task ordering
  • [#20406] - Toolchain not downloading Java18 for specific vendor
  • [#20398] - Failing to fingerprint the class API should not fail the entire zip/jar
  • [#20394] - Support latest JDK features while inspecting classes
  • [#20391] - Task outputs are wrongly detected in conjunction with filtered file trees
  • [#20390] - Using `rename { ... }` in `Copy` task silently breaks configuration cache
  • [#20377] - configureondemand causes build failure in multi module project with different group name
  • [#20375] - Adjust documentation in Jacoco Report Agreggation plugin and Test Report Aggregation
  • [#20371] - Configuration cache failure in 7.4.2 caused by kapt
  • [#20344] - Toolchain cannot download JDK 18
  • [#20329] - Dependency resolution depends on existence of external POMs
  • [#20254] - Build with included builds fails with "Unable to make progress running work"
  • [#20224] - gradle depends on an insecure third-party JAR package that contains the CVE vulnerability
  • [#20182] - Imported BOM parsing fails if published with Gradle Module Metadata
  • [#20178] - Add "threads" configuration option to PmdExtension
  • [#20113] - Support annotationProcessor in Test Suites' dependencies block
  • [#20098] - Dependency verification fails for signed klib artifacts
  • [#20079] - Build cache miss with TYPESAFE_PROJECT_ACCESSORS
  • [#20033] - Plugin Development plugin declares inputs with custom equals()
  • [#19959] - notCompatibleWithConfigurationCache failed to force errors into warnings
  • [#19914] - Tests should run after `jar` task
  • [#19882] - Dependency constraint on project with newer version does not upgrade dependency on Maven artifact
  • [#19817] - Setting bootClasspath can cause build failure with obscure message on Windows only after upgrade to 7.3.x
  • [#19786] - Support xfs for file watching. Report file system type when found to be unsupported
  • [#19780] - Pattern `fileCollection.filter(predicate).getAsFileTree().matching(patternSet)` is not supported by the configuration cache
  • [#19753] - Fix DefaultMutableAttributeContainer behavior when updating attributes using both eager and lazy values
  • [#19751] - Default checkstyle version does not support sealed modifier
  • [#19682] - Unix start script doesn't respect JAVA_OPTS when xargs isn't installed
  • [#19621] - Document limitations of continuous build
  • [#19605] - Remove https://keys.fedoraproject.org from key servers
  • [#19525] - Add new ResolvableVariants Report
  • [#19493] - Extend `PropertyReportTask` to allow specifying which property to query
  • [#19470] - Allow Gradle Enterprise plugin to read access key files during configuration phase
  • [#19426] - Relative paths for detected file inputs are wrong in the configuration cache report
  • [#19408] - Take filename into account for caching artifact transform results
  • [#19308] - Upgrade embedded Kotlin to 1.6.10
  • [#19283] - Support JDK 18
  • [#19282] - Make obscure "no signature of method" error message useful
  • [#18935] - Strange JVM target warning from Kotlin DSL in buildSrc
  • [#18823] - Wrong Gradle 7.2 documentation for version conflict resolution when only ranges involved
  • [#18746] - Generalize `TaskInputsListeners`
  • [#18637] - Kotlin DSL "classpath mode" leniency doesn't capture after evaluation exceptions
  • [#18566] - Incorrect result when TestNG 7.x test times out
  • [#18528] - Be able to skip implicit adding of gradlePluginPortal repo
  • [#18486] - Properly analyze jar files without directory entries during test scanning
  • [#18432] - Configuration cache doesn't capture system property updates during configuration
  • [#18177] - `project.sync` is not allowing to specify `preserve` even though the `Sync` task does and the documentation explicitly mentions it
  • [#18138] - Eclipse classpath should be able to use test fixtures in implementation dependencies
  • [#17543] - Review types excluded from annotation analysis
  • [#17208] - Confusing error message when build cache can't clean output directory
  • [#17013] - Deadlock when task outputs are calculated from input configuration
  • [#16998] - IterationOrderRetainingSetElementSource#add takes time linear in the collection size
  • [#16982] - NullPointerException during isolation of artifact transform parameters and shared build service configuration
  • [#15491] - Scala 2.13 with Zinc 1.4.3 fails with NoSuchMethodError
  • [#15428] - Gradle Windows scripts don't propagate exit codes correctly
  • [#15128] - DirectoryProperty.files() resolves incorrectly
  • [#14984] - Invalid closure configuration methods lead to cryptic error messages
  • [#14874] - Custom Remote Build Cache does not work with configuration cache enabled
  • [#13819] - Provide a configuration cache friendly way of looking up a subset of system properties and environment variables
  • [#13623] - Task dependency is silently dropped with mismatching setter.
  • [#13362] - Project properties not accessible from settingsEvaluated
  • [#12871] - Introduce APIs to represent a resolved dependency graph in a lazy manner
  • [#12550] - Add flag to hide welcome message
  • [#11834] - Use same infrastructure for VFS retention and continuous build
  • [#10507] - Gradle 5.6.2 and TestNG 7.0.0 incompatibility
  • [#9048] - Deprecate `IncrementalTaskInputs`
  • [#4841] - Javadoc does not take into account custom options
  • [#3427] - Continuous build responsiveness is too slow on mac

New in Gradle 7.5 RC 1 (May 13, 2022)

  • Support for Java 18:
  • Gradle now supports running on and building with Java 18.
  • Support for Groovy 4:
  • Gradle now supports building software using Groovy 4.0. Note that Groovy DSL buildscripts still use Groovy 3.
  • Scala Zinc has been updated:
  • The default Scala Zinc version was updated to 1.6.1.
  • Zinc is the Scala incremental compiler that allows Gradle to always compile the minimal set of files needed by the current file changes. It takes into account which methods are being used and which have changed, which means it’s much more granular than just interfile dependencies.
  • Continuous Build is much more responsive on Windows and macOS with Java 9+:
  • Continuous Build automatically re-executes the build with the same requested tasks when inputs change. This allows for continuous feedback during development.
  • Because of the internal changes in the JDK, Continuous Build did not work well on Windows and macOS on Java 9 and higher. It could take up to 10 seconds to detect a change and trigger a build.
  • Now Gradle picks up changes nearly instantly on Windows and macOS for all Java versions as well, making Continuous Build respond quickly on all major operating systems. This is because Gradle now uses its own robust and natively implemented file system watching system instead of relying on the generic API in the JDK.
  • Improved diagnostic reports for dependency resolution:
  • Outgoing Variants:
  • The outgoingVariants report now provides additional information that allows further insight into variant aware dependency resolution results.
  • This report is useful when determining why a particular variant of this producer project was selected by another consumer project when the producer depends upon the consumer. Run the report from the producer project, to list every variant built by it (including secondary variants only visible to other local projects). The output contains the capabilities and attributes present on each variant of the producer, along with other information detailed below. This output can be compared against the output of the new resolvableConfigurations report run in the consumer.
  • Descriptions are now printed for secondary variants, if present.
  • Configurations using @Incubating attributes are marked with an (i).
  • The legend at the bottom of the report clarifies the usage of secondary variants.
  • The formatting (and coloring for rich console) of the output is now clearer and more consistent with other reports.
  • Capabilities, Attributes and Artifact lists are alphabetically sorted.
  • (not shown) Classifiers are now printed next to artifacts if present.
  • (not shown) New messages when using --all and --variant options to better describe results (or the lack thereof)
  • Description available on secondary variants:
  • When defining secondary variants, which are variants available only to other local Gradle projects, there is a new ConfigurationVariant method available to supply a note or description for the variant. These descriptions will be printed by the outgoingVariants report and defaults have been added for existing secondary variants produced by the Java plugin.
  • Resolvable Configurations:
  • There is a new resolvableConfigurations report available which will display information about all the configurations in a project that can be resolved.
  • This report compliments the outgoingVariants report and is meant to be run from the consumer side of a dependency to determine why a particular variant of a producer project was selected by this consumer project when the consumer depends upon the producer. It includes the following information:
  • Description, Attributes and (directly) extended Configurations
  • A --recursive option flag can be set to display all configurations which are extended transitively
  • Attributes affected by Compatibility or Disambiguation rules during resolution listed
  • A --configuration option can limit this report to a single configuration
  • A --all option flag can be set to include legacy configurations which are both resolvable and consumable; these will be hidden by default
  • See the ResolvableConfigurations DSL reference for more details.
  • Dependency Insights:
  • The dependencyInsight report provides information about a specific dependency, including what variant was selected, and the attributes used during resolution.
  • The report now uses a table to display variants, which makes it easier to tell where attribute values are from, and see why a particular variant was selected
  • The variant name is listed at the top, after the word "Variant"
  • The variant output is now in table format.
  • Attributes only present in the variant's metadata only contain text in the "Provided" column
  • Attributes present in both the variant's metadata and requested by the configuration contain text in both columns
  • Attributes only requested by the configuration only contain text in the "Requested" column
  • As seen in (3) and (5), items are colored orange if they are not present in one column. The table is sorted first by groups (3), (4), and (5); then alphabetically inside each group.
  • Dependency resolution results can be used as task inputs:
  • Tasks may need to access dependency resolution results. For example, built-in tasks like dependencies and dependencyInsight do so in order to provide reporting about resolved artifacts and dependency graphs. Other tasks may produce file outputs based on dependency resolution results. Previously, it was only possible by performing dependency resolution in a task action. However, this resulted in suboptimal performance.
  • Starting with Gradle 7.5 it is now possible to declare dependency resolution results as task inputs.
  • This allows writing tasks which consume dependency resolution results. Declaring such inputs instead of doing undeclared dependency resolution in task actions allows Gradle to optimise for build incrementality. Additionally, these new types of task inputs are fully supported by the configuration cache.
  • You can learn more in the Authoring Tasks user manual chapter and with the dedicated sample.
  • Configuration cache improvements:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing this for subsequent builds.
  • Running external processes at configuration time:
  • Previously, external processes started with exec or javaexec APIs were ignored by configuration cache, and it could be a potential correctness issue if the output of the external process affects the configuration.
  • A new Provider-based API is now available to obtain the output of the external process in the configuration-cache-compatible way. The exec and javaexec APIs are now disallowed if the configuration cache is enabled in order to prevent potential issues.
  • If a more complex interaction with the external process is necessary, then a custom ValueSource implementation can be used. The injected ExecOperations service should be used to run the external process.
  • Files read at configuration time become build configuration inputs:
  • Files read at configuration time with FileInputStream or some Kotlin APIs now automatically become build configuration inputs. The configuration cache is invalidated if the contents of such file(s) change between builds.
  • Previously, file reads were ignored, and it could be a potential correctness issue if the contents of the file(s) affected the configuration.
  • New ways to access environment without unnecessary invalidations of the configuration cache:
  • Since the automatic build configuration inputs detection was introduced in Gradle 7.4, some common patterns of reading subsets of environment variables or system properties were causing excessive invalidations of the configuration cache, leading to suboptimal performance. For example, iterating over all environment variables to find the ones with names starting with some prefix caused all available variables, even the unrelated ones, to become configuration inputs.
  • Two new options are now available to mitigate that. For simpler use cases, there are the Provider-based APIs to access system properties or environment variables with names starting with some prefix. Advanced processing, like filtering names with regular expression, can be done inside a custom ValueSource implementation. Reading a file, an environment variable, or a system property no longer adds a build configuration input inside the implementation of the ValueSource. The value of the ValueSource is recomputed each time the build runs, and the configuration cache entry is only invalidated if the value changes.
  • New compatible plugins and tasks:
  • The kotlin-dsl plugin is now compatible with the configuration cache.
  • The dependencyInsight, outgoingVariants and resolvableConfigurations tasks are now compatible with the configuration cache.
  • New STABLE_CONFIGURATION_CACHE feature flag:
  • Configuration caching introduces a number of requirements regarding the build logic. Many problems are already reported in the HTML report. At the moment, adjusting the build logic to be fully compatible with configuration cache can be a significant effort for complex builds.
  • This release introduces the STABLE_CONFIGURATION_CACHE flag allowing gradual rollout of the most potentially disruptive requirements. This flag currently enables validations like detecting undeclared shared build service usage and external processes used at configuration time.
  • It is recommended to enable this flag as soon as possible in order to be ready for when the flag is removed and make the linked features enabled by default.
  • Learn more about what this feature flag enables in the user manual.
  • JVM toolchains improvements:
  • Java toolchains provide an easy way to declare which Java version your project should be built with. By default, Gradle will detect installed JDKs or automatically download new toolchain versions.
  • Java toolchains can download any JDK by automatically selecting between Adoptium and AdoptOpenJDK
  • IDE integration improvements:
  • Improved test sources separation in Eclipse:
  • This release provides improved support for test sources in Eclipse.
  • The Eclipse classpath file generated by the eclipse plugin has the following changes:
  • Project dependencies defined in test configurations get the test=true classpath attribute
  • All source sets and dependencies defined by the JVM Test Suite plugin are also marked as test code by default
  • The eclipse plugin DSL exposes properties to configure test sources
  • Gradle now checks the Adoptium API first when downloading JDKs, rather than only using the legacy AdoptOpenJDK API. This allows downloading the new JDK 18 releases, which are not available via AdoptOpenJDK, while still maintaining the ability to download versions that are no longer supported by Adoptium, such as JDK 9-10 and 12-16.
  • In case you are using an internal mirror to download JDKs, there is a new Gradle property org.gradle.jvm.toolchain.install.adoptium.baseUri to control the Adoptium base URI. This is in addition to theorg.gradle.jvm.toolchain.install.adoptopenjdk.baseUri property, which is still used if a JDK is not found in the Adoptium API.
  • These changes are reflected also when the project is synchronized in Buildship.
  • See the documentation for more details.
  • Query a single property with the properties task:
  • The built-in properties task prints all project properties to the console. Now, the task takes an optional --property argument which configures it to display the selected property only.
  • This is useful for keeping track of specific properties on CI systems, and requires much less parsing and filtering than before.
  • Groovydoc exposes more options:
  • The Groovydoc task now exposes more options:
  • access: for controlling the access levels included in the documentation, defaults to PROTECTED
  • includeAuthor: for controlling whether the author is displayed in the documentation, defaults to false
  • processScripts: for controlling whether scripts are included in the documentation, defaults to true
  • includeMainForScripts: for controlling whether a script's main method is included in the documentation, defaults to true
  • These defaults are the same as what was previously used, so there should be no changes to the default behavior.
  • --show-version (-V) flag:
  • The -V flag (long form --show-version) instructs Gradle to first print version information and then continue executing any requested tasks. This is in contrast to the pre-existing -v (long form --version) flag which prints version information and then immediately exits.
  • This flag may be useful in CI environments to record Gradle version information in the log as part of a single Gradle execution.
  • Performance Improvements:
  • Checkstyle tasks use toolchains and execute in parallel by default:
  • The Checkstyle plugin now uses the Gradle worker API to run Checkstyle as an external worker process, so that multiple Checkstyle tasks may now run in parallel within a project. This can greatly increase overall build performance when several of these tasks exist within a single project. The memory used by the process is controlled via the minHeapSize and maxHeapSize properties.
  • Checkstyle now uses JVM toolchains in order to minimize JDK installation requirements. In Java projects, Checkstyle will use the same version of Java required by the project. In other types of projects, Checkstyle will use the version of Java that is used by the Gradle daemon.
  • Run a single PMD task on multiple threads:
  • PMD is a quality analysis tool that runs on the Java source files of your project
  • With this version of Gradle, the thread parameter PMD offers is now exposed through the PMD extension and tasks. This allows configuration of PMD to run its analysis on more than one thread.

New in Gradle 7.4.2 (Mar 31, 2022)

  • It fixes the following issues:
  • Tasks that show up later on the command line can be mysteriously skipped
  • A task that is finalized by a task specified earlier on the command line causes the build to hang
  • Deadlock between test task execution and dependency resolution
  • Race condition with build service registration and configuration on demand
  • Using a Version Catalog plugin in the plugins block still produces an @Incubating warning in 7.4.1
  • NPE when VerificationException is thrown by a task and configuration cache is enabled
  • Issues fixed in the first patch release:
  • Applying Build Scan Plugin (--scan) cause the following error 'Cannot mutate content repository descriptor 'Gradle Central Plugin Repository' after repository has been used'
  • Configuration cache captures system property value set by the build logic causing no cache hits afterward
  • Dependency resolution hangs with IDEA parallel model fetch
  • Plugins resolution from settings convention plugin [possible regression]
  • Type-safe dependency accessors are reported as an incubating feature despite version catalog stabilization
  • CLI options fail with "linked to multiple elements in class" error when inherited from interface and defined in class
  • Test-aggregation-plugin and jacoco-aggregation-plugin should eagerly configure objects
  • 7.4 regression: exclusiveContent in buildscript doesn't work with plugins {} block
  • Failure with configuration cache: Could not find build 'buildSrc'

New in Gradle 7.4.1 (Mar 9, 2022)

  • Fixed:
  • Applying Build Scan Plugin (--scan) cause the following error 'Cannot mutate content repository descriptor 'Gradle Central Plugin Repository' after repository has been used'
  • Configuration cache captures system property value set by the build logic causing no cache hits afterward
  • Dependency resolution hangs with IDEA parallel model fetch
  • plugins resolution from settings convention plugin [possible regression]
  • Type-safe dependency accessors are reported as an incubating feature despite version catalog stabilization
  • CLI options fail with "linked to multiple elements in class" error when inherited from interface and defined in class
  • test-aggregation-plugin and jacoco-aggregation-plugin should eagerly configure objects
  • 7.4 regression: exclusiveContent in buildscript doesn't work with plugins {} block
  • Failure with configuration cache: Could not find build 'buildSrc'

New in Gradle 7.4 (Feb 8, 2022)

  • New features and usability improvements:
  • Generate a single report for tests from multiple projects:
  • By default, Gradle produces a separate HTML test report for every test task in each project. Previously, it was difficult to combine those reports across multiple projects in a safe and convenient way.
  • This release adds the new test-report-aggregation plugin to make it easy to aggregate test results from multiple projects into a single HTML report. This plugin uses test suites registered with the jvm-test-suite plugin.
  • When this plugin is applied to a Java project, Gradle will automatically create an aggregated test report for each test suite with test results from a compatible test suite in every project that the Java project depends on. See the sample in the user manual.
  • If you want more control over the set of projects that are included in the aggregated report or which test suites are used, see another sample that requires you to provide this configuration in the user manual.
  • Generate a single JaCoCo code coverage from multiple projects:
  • Gradle comes with a JaCoCo code coverage plugin that produces a coverage report for the built-in test task. Previously, it was difficult to combine such reports across multiple projects in a safe and convenient way.
  • This release adds the new jacoco-report-aggregation plugin to make it easy to aggregate code coverage from multiple projects into a single report. This plugin uses test suites registered with the jvm-test-suite plugin.
  • When this plugin is applied to a Java project, Gradle will automatically create an aggregated code coverage report for each test suite with code coverage data from a compatible test suite in every project that the Java project depends on. See the sample in the user manual.
  • If you want more control over the set of projects that are included in the aggregated report or which test suites are used, see another sample that requires you to provide this configuration in the user manual.
  • Usability improvements:
  • Mark additional test source directories as tests in IntelliJ IDEA:
  • The JVM Test Suite Plugin makes it easier to create additional sets of tests in a Java project.
  • The IntelliJ IDEA Plugin plugin will now automatically mark all source directories used by a JVM Test Suite as test source directories within the IDE.
  • The Eclipse plugin will be updated in a future version of Gradle.
  • This change does not affect additional test source directories created in Android projects that will still need to be manually configured to be considered test directories. These test sources are not created using JVM test suites.
  • Type-safe accessors for extensions of repositories {} in Kotlin DSL:
  • Starting with this version of Gradle, Kotlin DSL generates type-safe model accessors for custom extensions added to the repositories {} block. Custom extensions now have full content assist in the IDE.
  • Stable dependency verification file generation:
  • Dependency verification allows Gradle to verify the checksums and signatures of the plugins and dependencies that are used by the build of your project to improve supply chain security.
  • With this release, the generation of the dependency verification file has been improved to produce stable output. This means that Gradle will always produce the same output if the build configuration and the verification file did not change.
  • This allows the the verification metadata generation feature to be used as a convenient update strategy. This is now a recommended way to update the dependency verification files.
  • Plugins can be declared with a version in a subproject in more cases:
  • The plugins DSL provides a succinct and convenient way to declare plugin dependencies.
  • Previously, it was not possible to declare a plugin with a version in a subproject when the parent project also declared the same plugin. Now, this is allowed when Gradle can track the version of the plugin (currently when using included build plugins or externally resolved plugins), and the version of the plugin in both are the same.
  • This change was required to allow the use of dependency catalog plugin aliases in both a parent and subproject's plugins {}.
  • Changes following migration from AdoptOpenJDK to Adoptium:
  • Java toolchains provide an easy way to declare which Java version your project should be built with. By default, Gradle will detect installed JDKs or automatically download new toolchain versions.
  • Following the migration of AdoptOpenJDK to Eclipse Adoptium, a number of changes have been made for toolchains:
  • ADOPTIUM and IBM_SEMERU are now recognized as vendors,
  • Both of the above can be used as vendors and trigger auto-provisioning,
  • Using ADOPTOPENJDK as a vendor and having it trigger auto-provisioning will emit a deprecation warning.
  • Configuration cache improvements:
  • The configuration cache improves build time by caching the result of the configuration phase and reusing this for subsequent builds.
  • Automatic detection of environment variables, system properties and Gradle properties used at configuration time
  • Previously, Gradle required build and plugin authors to use specific APIs to read external values such as environment variables, system properties and Gradle properties in order to take these values into consideration as configuration cache inputs. When one of those values changed, Gradle would re-execute the configuration phase of the build and create a new cache entry. Gradle also required marking external values used at configuration time with an explicit opt-in Provider.forUseAtConfigurationTime() API.
  • This release makes it easier to adopt configuration cache by relaxing these requirements. Provider.forUseAtConfigurationTime() has been deprecated and external values can be read using standard Java and Gradle APIs. Environment variables, system properties and Gradle properties used at configuration time are automatically detected without requiring build or plugin authors to migrate to Gradle specific APIs. In case any of those inputs change, the configuration cache is invalidated automatically. Moreover, the detected configuration inputs are now presented in the configuration-cache HTML report to make it easier to investigate unexpected configuration cache misses.
  • Disable configuration caching when incompatible tasks are executed:
  • The configuration cache works by caching the entire task graph for each set of requested tasks.
  • Prior to this release, all tasks used by the project needed to be compatible with configuration cache before the configuration cache could be enabled.
  • It is now possible to declare that a particular task is not compatible with the configuration cache. Gradle will disable the configuration cache automatically whenever an incompatible task is scheduled to run. This makes it possible to enable the configuration cache without having to first migrate all tasks to be compatible. Builds will still benefit from the configuration cache when only compatible tasks are executed. This enables more gradual adoption of the configuration cache.
  • Other improvements:
  • Additional Gradle daemon debug options:
  • The Gradle daemon can be started in a debug mode that allows you to connect a debugger to troubleshoot build scripts or plugin code execution. By default, Gradle assumes a particular set of debugging options.
  • In this release, additional options have been added to specify the port, server mode, and suspend mode for the Gradle daemon. This is useful when the default options are not sufficient to connect to the Gradle daemon to debug build scripts or plugin code.
  • This does not affect the debugging options used with --debug-jvm when used with Test or JavaExec tasks.
  • Conflicts of precompiled plugins with core plugins is now an error:
  • Precompiled plugins are plugins written in either Groovy or Kotlin DSLs. They are used to easily share build logic between projects using a DSL language and without the need to write a full plugin class.
  • In previous versions, it was possible to name a precompiled plugin with a name that conflicted with any core plugin id. Since core plugins take precedence over other plugins this caused the precompiled plugin to be silently ignored.
  • With this release, a name conflict between a precompiled plugin and a core plugin causes an error.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Shared build services:
  • Shared build services is promoted to a stable feature.
  • Version catalogs:
  • Version catalogs is promoted to a stable feature.
  • Fixed issues:
  • 93 issues have been fixed in Gradle 7.4:
  • [#19623] - Update JvmTestSuite DSL Reference with Test Type Propery
  • [#19603] - Custom test suite named unitTest conflicts with default test suite
  • [#19693] - Inconsistent Javadoc annotations for org.gradle.api.tasks.testing.TestReport (gradle 7.4)
  • [#19683] - Project dependency jar does not exist when resolving project dependency
  • [#19663] - Gradle caches keyserver information even when it is disabled
  • [#19658] - Configuration cache fails to serialize chain of mapped `Provider`s
  • [#19649] - Configuration cache fails to store zipped `Provider`
  • [#19645] - The IntelliJ IDEA Plugin does not mark JVM Test Suite sources as test source in the IDE
  • [#19634] - jacoco-report-aggregation should gracefully handle missing execution data
  • [#19627] - Aggregated test report does not respect java.testReportDir in some cases
  • [#19622] - `notCompatibleWithConfigurationCache` and `org.gradle.unsafe.configuration-cache-problems=warn`
  • [#18440] - Gradle dependency verification caches keys for too long
  • [#19526] - Upgrade Gradle checks for Log4j 2.17.1
  • [#19383] - Changes to toolChain implementation are ignored
  • [#19353] - Java compiler constant analysis seems to be broken on 8u301
  • [#19270] - Complete documentation for new aggregation plugins
  • [#19258] - Fix links in new test suite samples
  • [#19250] - Disk files cleanup on Teamcity causes problems with file system watching on Linux
  • [#19231] - Add usage checks for verification variants - revised plan
  • [#19167] - Missing Settings.includeFlat(Iterable<String>) method
  • [#19152] - Revert usage of generic argument to objects.named extension in Kotlin samples and snippets, and build-logic scripts
  • [#19151] - Documentation contains `{user-manual}` references causing malformed links
  • [#19103] - Name conflict with new test suites and versionCatalog entry named `testing`
  • [#19098] - Additional sanity checks for building variants
  • [#19097] - Additional sanity checks for test suites - one suite per type per project
  • [#19089] - Dependency verification does not find a verification-metadata entry on Android Studio sync
  • [#19088] - Provider#map doesn't allows to transform into nullable type in Kotlin DSL
  • [#19052] - ConcurrentModificationException during Ivy resolve
  • [#19046] - Add Maven Toolchains support to Java Toolchains detection
  • [#19043] - Configuration cache false positive when changing gradle.properties
  • [#19027] - Configuration cache issue when loading JNA lib during configuration
  • [#19026] - Problems reading data from Binary store when replacement rule is in place and original module has a dependency on the new module in POM file
  • [#19014] - Remove ambiguity in overloaded AttributeContainer#attribute methods
  • [#19009] - Only allow consumption of outgoing variants for Test Suites if feature preview flag is set
  • [#19008] - Update outgoing variants for Test Suites and add additional sanity checking
  • [#19007] - Guarantee new variants for test suites are not published
  • [#19003] - Gradle 7.4 nightly breaks artifact transforms
  • [#18984] - GenerateSourceRootsFile fails when buildSrc references included build
  • [#18975] - Inconsistent behavior of versionCatalogs { } in buildSrc during IDEA sync
  • [#18967] - Refactor `TestReport` task to support lazy wiring of inputs
  • [#18963] - Broken links in 7.0 upgrade guide > custom build layout
  • [#18940] - Is ConfigurableReport.setDestination(Provider) meant to be deprecated?
  • [#18914] - Aggregate test results and coverage data from multiple projects
  • [#18913] - Expose test results and JaCoCo coverage data as resolvable artifacts
  • [#18912] - Allow tasks to consume outputs from tasks that produce verification failures
  • [#18906] - Minor English improvements in the Structuring Large Projects example
  • [#18857] - Clean up Javascript included in dependencies HTML report
  • [#18854] - Deprecate tar tree without a backing file
  • [#18791] - Expose outputs from Test tasks as variants to dependency management
  • [#18752] - Add descriptions to build-init, testing-base, jvm-testing, testing-junit-platform subprojects
  • [#18727] - Improve dependency verification file generation
  • [#18644] - Provide alternative for flat project structure
  • [#18618] - Upgrade Gradle wrapper task on Windows missing chars
  • [#18617] - Missing Kotlin DSL overload on `DependencyHandler` for `ProviderConvertible`
  • [#18571] - Doc outdated on embedded Kotlin
  • [#18535] - Can't use library from version catalog in constraint if it has child aliases
  • [#18511] - Build cache configuration is not inherited from top-level build in included build inside pluginManagement block
  • [#18498] - Gradle dependency verification breaks Android Studio Gradle sync in an obscure way
  • [#18496] - @Option on interfaces (implemented by tasks) is not respected
  • [#18494] - Return of Problems reading data from Binary store
  • [#18467] - 7.2: PluginDependenciesSpec interface adds non-default methods, thus breaking backward compatibility
  • [#18394] - Gradle crashes when writing verification metadata
  • [#18290] - Unexpected behavior of Java toolchains
  • [#18281] - Multiple Publications warning specify names of overlapping publications
  • [#18272] - Gradle module metadata publication should allow more formats
  • [#18246] - Warn or fail when precompiled script plugin name collides with plugin ID
  • [#18236] - Version Catalogs: Omit version for plugins already on the classpath
  • [#18233] - Catalog version entry without version and `.withoutVersion()` call produces non-trivial errors
  • [#18179] - Only modify task history in StoreExecutionStateStep
  • [#18097] - Inconsistent name in TOML vs API. [libraries] versus findDependencies
  • [#18084] - Allow JVM debug options to be configurable
  • [#18027] - Toolchain: AdoptOpenJDK vendor rebranded to "Eclipse Foundation"
  • [#18004] - Add Temurin to `JvmVendorSpec`
  • [#17967] - "only id(String) method calls allowed in plugins {} script block" is not correct
  • [#17905] - Random errors or build hanging forever with task outputs derived from a configuration
  • [#17839] - Better Error reporting for name mismatch in catalog dependencies
  • [#17792] - ScriptHandlerScope with configuration does not support version catalogs (MinimalExternalModuleDependency)
  • [#17464] - Allow progressive adoption of the configuration cache
  • [#16169] - Document requirements for concurrent access restrictions of shared build services
  • [#15856] - Misleading error message when invalid blocks are placed before the plugins block in the settings file
  • [#15820] - Configuration cache checks fingerprint of included build against properties from root build
  • [#15732] - repositoriesMode FAIL_ON_PROJECT_REPOS fails on IntelliJ import
  • [#14951] - Timeouts when using the remote Build Cache in a GitHub workflow
  • [#14885] - Leave comments and ordering untouched in the verification-metadata.xml file
  • [#14380] - Document usage of `usesService` when working with build services
  • [#13708] - Make --stacktrace and --full-stacktrace options available through gradle.properties
  • [#13357] - finalizer tasks are not up to date when finalized tasks are up to date
  • [#13018] - Add Settings.include(List) to include more than 250 subprojects in one call
  • [#10889] - When 'clean' depends on another task, it can happen in the middle of a build, breaking it
  • [#9980] - Use input snapshots to skip empty work
  • [#2792] - Provide a declarative way to define separate test suites
  • [#2488] - `gradle clean build` can run clean after tasks that produce output by depending on other tasks
  • [#1031] - Gradle compile of groovy should not include grab/grapes annotation transform

New in Gradle 7.4 RC 2 (Feb 2, 2022)

  • Fixed issues:
  • [#19623] - Update JvmTestSuite DSL Reference with Test Type Propery
  • [#19603] - Custom test suite named unitTest conflicts with default test suite
  • [#19693] - Inconsistent Javadoc annotations for org.gradle.api.tasks.testing.TestReport (gradle 7.4)
  • [#19683] - Project dependency jar does not exist when resolving project dependency
  • [#19663] - Gradle caches keyserver information even when it is disabled
  • [#19658] - Configuration cache fails to serialize chain of mapped `Provider`s
  • [#19649] - Configuration cache fails to store zipped `Provider`
  • [#19645] - The IntelliJ IDEA Plugin does not mark JVM Test Suite sources as test source in the IDE
  • [#19634] - jacoco-report-aggregation should gracefully handle missing execution data
  • [#19627] - Aggregated test report does not respect java.testReportDir in some cases
  • [#19622] - `notCompatibleWithConfigurationCache` and `org.gradle.unsafe.configuration-cache-problems=warn`
  • [#18440] - Gradle dependency verification caches keys for too long
  • [#19526] - Upgrade Gradle checks for Log4j 2.17.1
  • [#19383] - Changes to toolChain implementation are ignored
  • [#19353] - Java compiler constant analysis seems to be broken on 8u301
  • [#19270] - Complete documentation for new aggregation plugins
  • [#19258] - Fix links in new test suite samples
  • [#19250] - Disk files cleanup on Teamcity causes problems with file system watching on Linux
  • [#19231] - Add usage checks for verification variants - revised plan
  • [#19167] - Missing Settings.includeFlat(Iterable<String>) method
  • [#19152] - Revert usage of generic argument to objects.named extension in Kotlin samples and snippets, and build-logic scripts
  • [#19151] - Documentation contains `{user-manual}` references causing malformed links
  • [#19103] - Name conflict with new test suites and versionCatalog entry named `testing`
  • [#19098] - Additional sanity checks for building variants
  • [#19097] - Additional sanity checks for test suites - one suite per type per project
  • [#19089] - Dependency verification does not find a verification-metadata entry on Android Studio sync
  • [#19088] - Provider#map doesn't allows to transform into nullable type in Kotlin DSL
  • [#19052] - ConcurrentModificationException during Ivy resolve
  • [#19046] - Add Maven Toolchains support to Java Toolchains detection
  • [#19043] - Configuration cache false positive when changing gradle.properties
  • [#19027] - Configuration cache issue when loading JNA lib during configuration
  • [#19026] - Problems reading data from Binary store when replacement rule is in place and original module has a dependency on the new module in POM file
  • [#19014] - Remove ambiguity in overloaded AttributeContainer#attribute methods
  • [#19009] - Only allow consumption of outgoing variants for Test Suites if feature preview flag is set
  • [#19008] - Update outgoing variants for Test Suites and add additional sanity checking
  • [#19007] - Guarantee new variants for test suites are not published
  • [#19003] - Gradle 7.4 nightly breaks artifact transforms
  • [#18984] - GenerateSourceRootsFile fails when buildSrc references included build
  • [#18975] - Inconsistent behavior of versionCatalogs { } in buildSrc during IDEA sync
  • [#18967] - Refactor `TestReport` task to support lazy wiring of inputs
  • [#18963] - Broken links in 7.0 upgrade guide > custom build layout
  • [#18940] - Is ConfigurableReport.setDestination(Provider) meant to be deprecated?
  • [#18914] - Aggregate test results and coverage data from multiple projects
  • [#18913] - Expose test results and JaCoCo coverage data as resolvable artifacts
  • [#18912] - Allow tasks to consume outputs from tasks that produce verification failures
  • [#18906] - Minor English improvements in the Structuring Large Projects example
  • [#18857] - Clean up Javascript included in dependencies HTML report
  • [#18854] - Deprecate tar tree without a backing file
  • [#18791] - Expose outputs from Test tasks as variants to dependency management
  • [#18752] - Add descriptions to build-init, testing-base, jvm-testing, testing-junit-platform subprojects
  • [#18727] - Improve dependency verification file generation
  • [#18644] - Provide alternative for flat project structure
  • [#18618] - Upgrade Gradle wrapper task on Windows missing chars
  • [#18617] - Missing Kotlin DSL overload on `DependencyHandler` for `ProviderConvertible`
  • [#18571] - Doc outdated on embedded Kotlin
  • [#18535] - Can't use library from version catalog in constraint if it has child aliases
  • [#18511] - Build cache configuration is not inherited from top-level build in included build inside pluginManagement block
  • [#18498] - Gradle dependency verification breaks Android Studio Gradle sync in an obscure way
  • [#18496] - @Option on interfaces (implemented by tasks) is not respected
  • [#18494] - Return of Problems reading data from Binary store
  • [#18467] - 7.2: PluginDependenciesSpec interface adds non-default methods, thus breaking backward compatibility
  • [#18394] - Gradle crashes when writing verification metadata
  • [#18290] - Unexpected behavior of Java toolchains
  • [#18281] - Multiple Publications warning specify names of overlapping publications
  • [#18272] - Gradle module metadata publication should allow more formats
  • [#18246] - Warn or fail when precompiled script plugin name collides with plugin ID
  • [#18236] - Version Catalogs: Omit version for plugins already on the classpath
  • [#18233] - Catalog version entry without version and `.withoutVersion()` call produces non-trivial errors
  • [#18179] - Only modify task history in StoreExecutionStateStep
  • [#18097] - Inconsistent name in TOML vs API. [libraries] versus findDependencies
  • [#18084] - Allow JVM debug options to be configurable
  • [#18027] - Toolchain: AdoptOpenJDK vendor rebranded to "Eclipse Foundation"
  • [#18004] - Add Temurin to `JvmVendorSpec`
  • [#17967] - "only id(String) method calls allowed in plugins {} script block" is not correct
  • [#17905] - Random errors or build hanging forever with task outputs derived from a configuration
  • [#17839] - Better Error reporting for name mismatch in catalog dependencies
  • [#17792] - ScriptHandlerScope with configuration does not support version catalogs (MinimalExternalModuleDependency)
  • [#17464] - Allow progressive adoption of the configuration cache
  • [#16169] - Document requirements for concurrent access restrictions of shared build services
  • [#15856] - Misleading error message when invalid blocks are placed before the plugins block in the settings file
  • [#15820] - Configuration cache checks fingerprint of included build against properties from root build
  • [#15732] - repositoriesMode FAIL_ON_PROJECT_REPOS fails on IntelliJ import
  • [#14951] - Timeouts when using the remote Build Cache in a GitHub workflow
  • [#14885] - Leave comments and ordering untouched in the verification-metadata.xml file
  • [#14380] - Document usage of `usesService` when working with build services
  • [#13708] - Make --stacktrace and --full-stacktrace options available through gradle.properties
  • [#13357] - finalizer tasks are not up to date when finalized tasks are up to date
  • [#13018] - Add Settings.include(List) to include more than 250 subprojects in one call
  • [#10889] - When 'clean' depends on another task, it can happen in the middle of a build, breaking it
  • [#9980] - Use input snapshots to skip empty work
  • [#2792] - Provide a declarative way to define separate test suites
  • [#2488] - `gradle clean build` can run clean after tasks that produce output by depending on other tasks
  • [#1031] - Gradle compile of groovy should not include grab/grapes annotation transform

New in Gradle 7.4 RC 1 (Jan 17, 2022)

  • Fixed issues:
  • Upgrade Gradle checks for Log4j 2.17.1[#19383] - Changes to toolChain implementation are ignored
  • Java compiler constant analysis seems to be broken on 8u301
  • Complete documentation for new aggregation plugins
  • Fix links in new test suite samples
  • Disk files cleanup on Teamcity causes problems with file system watching on Linux
  • Add usage checks for verification variants - revised plan
  • Missing Settings.includeFlat(Iterable<String>) method
  • Revert usage of generic argument to objects.named extension in Kotlin samples and snippets, and build-logic scripts
  • Documentation contains `{user-manual}` references causing malformed links
  • Name conflict with new test suites and versionCatalog entry named `testing`
  • Additional sanity checks for building variants
  • Additional sanity checks for test suites - one suite per type per project
  • Dependency verification does not find a verification-metadata entry on Android Studio sync
  • Provider#map doesn't allows to transform into nullable type in Kotlin DSL
  • ConcurrentModificationException during Ivy resolve
  • Add Maven Toolchains support to Java Toolchains detection
  • Configuration cache false positive when changing gradle.properties
  • Configuration cache issue when loading JNA lib during configuration
  • Problems reading data from Binary store when replacement rule is in place and original module has a dependency on the new module in POM file
  • Remove ambiguity in overloaded AttributeContainer#attribute methods
  • Only allow consumption of outgoing variants for Test Suites if feature preview flag is set
  • Update outgoing variants for Test Suites and add additional sanity checking
  • Guarantee new variants for test suites are not published
  • Gradle 7.4 nightly breaks artifact transforms
  • GenerateSourceRootsFile fails when buildSrc references included build
  • Inconsistent behavior of versionCatalogs { } in buildSrc during IDEA sync
  • Refactor `TestReport` task to support lazy wiring of inputs
  • Broken links in 7.0 upgrade guide > custom build layout
  • Is ConfigurableReport.setDestination(Provider) meant to be deprecated?
  • Aggregate test results and coverage data from multiple projects
  • Expose test results and JaCoCo coverage data as resolvable artifacts
  • Allow tasks to consume outputs from tasks that produce verification failures
  • Minor English improvements in the Structuring Large Projects example
  • Clean up Javascript included in dependencies HTML report
  • Deprecate tar tree without a backing file
  • Expose outputs from Test tasks as variants to dependency management
  • Add descriptions to build-init, testing-base, jvm-testing, testing-junit-platform subprojects
  • Improve dependency verification file generation
  • Provide alternative for flat project structure
  • Missing Kotlin DSL overload on `DependencyHandler` for `ProviderConvertible`
  • Doc outdated on embedded Kotlin
  • Can't use library from version catalog in constraint if it has child aliases
  • Build cache configuration is not inherited from top-level build in included build inside pluginManagement block
  • Gradle dependency verification breaks Android Studio Gradle sync in an obscure way
  • @Option on interfaces (implemented by tasks) is not respected
  • Return of Problems reading data from Binary store
  • 7.2: PluginDependenciesSpec interface adds non-default methods, thus breaking backward compatibility
  • Gradle crashes when writing verification metadata
  • Unexpected behavior of Java toolchains
  • Multiple Publications warning specify names of overlapping publications
  • Gradle module metadata publication should allow more formats
  • Warn or fail when precompiled script plugin name collides with plugin ID
  • Version Catalogs: Omit version for plugins already on the classpath
  • Catalog version entry without version and `.withoutVersion()` call produces non-trivial errors
  • Only modify task history in StoreExecutionStateStep
  • Inconsistent name in TOML vs API. [libraries] versus findDependencies
  • Allow JVM debug options to be configurable
  • Toolchain: AdoptOpenJDK vendor rebranded to "Eclipse Foundation"
  • Add Temurin to `JvmVendorSpec`
  • "only id(String) method calls allowed in plugins {} script block" is not correct
  • Random errors or build hanging forever with task outputs derived from a configuration
  • Better Error reporting for name mismatch in catalog dependencies
  • ScriptHandlerScope with configuration does not support version catalogs (MinimalExternalModuleDependency)
  • Allow progressive adoption of the configuration cache
  • Shared build services
  • Misleading error message when invalid blocks are placed before the plugins block in the settings file
  • Configuration cache checks fingerprint of included build against properties from root build
  • Timeouts when using the remote Build Cache in a GitHub workflow
  • Leave comments and ordering untouched in the verification-metadata.xml file
  • Document usage of `usesService` when working with build services
  • Make --stacktrace and --full-stacktrace options available through gradle.properties
  • Finalizer tasks are not up to date when finalized tasks are up to date
  • Add Settings.include(List) to include more than 250 subprojects in one call
  • When 'clean' depends on another task, it can happen in the middle of a build, breaking it
  • Use input snapshots to skip empty work
  • Provide a declarative way to define separate test suites
  • `gradle clean build` can run clean after tasks that produce output by depending on other tasks
  • Gradle compile of groovy should not include grab/grapes annotation transform

New in Gradle 7.3.3 (Dec 22, 2021)

  • It fixes the following issues:
  • #19360 Upgrade checks to Log4j 2.17.0

New in Gradle 7.3.2 (Dec 15, 2021)

  • Mitigations for log4j vulnerability in Gradle builds
  • Incremental java compilation fails when renaming classname with $ character

New in Gradle 7.3.1 (Dec 1, 2021)

  • Fixes the following issues:
  • Consider reverting breaking change about test configuration
  • Fix multiple annotation processing issues discovered by Micronaut

New in Gradle 7.3 (Nov 10, 2021)

  • New features and usability improvements:
  • Support for Java 17:
  • Gradle now supports running on and building with Java 17.
  • In previous Gradle versions, running Gradle itself on Java 17 resulted in an error. JVM projects could have been built with Java 17 using toolchains.
  • As of Gradle 7.3, both running Gradle itself and building JVM projects with Java 17 is fully supported.
  • Declarative test suites in JVM projects:
  • When testing Java & JVM projects, you often need to group tests classes together to organize them into manageable chunks, so that you can run them with different frequencies or at distinct points in your build pipeline. For example, you may want to define groups of unit tests, integration tests, and functional tests.
  • Previously, grouping tests correctly required thorough knowledge of how to modify and connect various domain objects in Gradle, like SourceSets, configurations and tasks. If you wanted to divide tests into different groups, you needed to understand how these separate parts interact with one another.
  • With Gradle 7.3, the JVM Test Suite Plugin simplifies the creation of such groups of tests. We refer to these groups as Test Suites. Note that this is not to be confused with testing framework suites, like JUnit4’s Suite.
  • Test Suites are a high-level concept which can be referred to directly and consistently in build scripts. You can configure dependencies, sources and the testing framework used by the tests without having to worry about the low-level details.
  • This functionality is available automatically for all JVM-based projects that apply the java plugin. The built-in test task has been re-implemented on top of test suites. See more in the user manual.
  • This API is incubating and will likely change in future releases as more functionality is added.
  • Scala 3 support:
  • The Scala plugin allows users to compile their Scala code using Gradle and the Zinc incremental compiler underneath.
  • The Scala plugin is now able to compile Scala 3 code. All existing configuration options should still be usable with the newest language version.
  • The newest version of Scala 3 brings about numerous features while keeping compatibility with most of the existing Scala 2 code. To see more about the language features go to overview of the new features in Scala 3.
  • Explore new behavior with gradle init:
  • When you initialize a new Gradle project using gradle init, Gradle will now ask if you want to try new but unstable features in the build. This will allow you to try out new features before they become stable. You can always ask for this behavior by running gradle init --incubating when generating a new project.
  • Currently, builds generated with this option will only enable Test Suites, but other new APIs or behaviors may be added as they are introduced.
  • Version catalog improvements:
  • Version catalog is a feature preview that provides a convenient API for referencing dependencies and their versions. It received the following improvement in this release.
  • Lifted restrictions for alias names:
  • In previous Gradle releases it was not possible to declare aliases with the suffix plugin, version and other restricted keywords. With this release these restrictions are now lifted. Check the documentation for details.
  • Version catalog type unsafe API changes:
  • When using the type unsafe API, all methods accepting alias references now can use the exact same string as the alias definition. This means that you can declare and reference groovy-json instead of being forced to use groovy.json in the type unsafe API.
  • Note that access to the type unsafe API has changed, please see the upgrade guide.
  • Consistent version catalog accessors support in more scenarios:
  • With more possibilities for declaring aliases, some accessors were not supported in specific APIs related to plugin or dependency declarations. This release fixes those issues and accessors can be used consistently in more contexts.
  • For plugins, if you have kotlin.js and kotlin.js.action plugins, both can be used in the plugins block.
  • Declarations of dependencies with platform, enforcedPlatform, testFixtures and force support all accessor types.
  • Reliability improvements:
  • More robust file system watching:
  • When running an incremental build, Gradle needs to understand what has changed since the previous build on the file system. To do this it relies on the operating system's file system events whenever possible.
  • In some rare environments these events can be unreliable, and would cause Gradle to ignore some changes. To prevent this, Gradle now verifies that file system events are delivered in a timely fashion before enabling optimization based on them.
  • Allow copying single files into directories which contain unreadable files:
  • Sometimes you want to copy files into a directory that contains unreadable files or into one that is not exclusively owned by the build. For example when you are deploying single files into application servers or installing executables.
  • Doing so may fail or be slow because Gradle tries to track all the content in the destination directory.
  • In order to work around such issues, you can now use the method Task.doNotTrackState() on Copy tasks that forces Gradle to ignore content in the destination directory.
  • See the samples in the user manual about Deploying single files into application servers and Installing executables.
  • Input normalization support in configuration cache:
  • The input normalization is now correctly tracked by the experimental configuration cache. Task up-to-date checks now consider normalization rules when the configuration cache is enabled, leading to faster builds.
  • Plugin development improvements:
  • Initializing new plugin projects using the Build Init Plugin can also benefit from the --incubating option.
  • Allow plugin authors to declare tasks as untracked:
  • For up-to-date checks and the build cache, Gradle needs to track the state of the inputs and outputs of a task. It is not always desirable or possible for Gradle to fully track the state of the input and output files.
  • For example:
  • The input or output locations contain unreadable files like pipes where Gradle cannot track the content.
  • The input or output is stored remotely, for example in a database, and its state cannot be tracked.
  • Another tool like Git already takes care of keeping the state, so it doesn't make sense for Gradle to do additional bookkeeping.
  • The build does not own the output location exclusively and Gradle would need to track the state of a potentially large amount of content.
  • Gradle 7.3 introduces the annotation @UntrackedTask and the method Task.doNotTrackState() to declare that Gradle should not track the state of a task. This allows tasks to implement the above use-cases.
  • If a task is untracked, then Gradle does not do any optimizations when running the task. For example, such a task will always be out of date and never come from the build cache.
  • @UntrackedTask and Task.doNotTrackState are a replacement for Task.outputs.upToDateWhen { false } if you want your task to never be up-to-date. It has the advantage that it is faster since Task.outputs.upToDateWhen { false } still spends time on capturing task state.
  • See the samples in the user manual about Integrating an external tool which does its own up-to-date checking.
  • Improvements for tooling providers:
  • The Tooling API allows applications to embed Gradle. This API is used by IDEs such as IDEA, Android Studio and Buildship to integrate Gradle into the IDE.
  • File download progress events
  • When a build downloads many files or very large files, for example when resolving dependencies, Gradle may appear to be unresponsive due to the lack of any logging or console output.
  • This release adds new events that notify the IDE as files are downloaded. This allows IDEs to show better progress information while Gradle is running and during IDE import/sync.
  • Security improvements:
  • Both ant and common-compress bundled libraries have been updated to resolve reported vulnerabilities. Head over to the upgrade guide for version and resolved vulnerabilities.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Disabling caching by default:
  • The @DisableCachingByDefault annotation is now a stable feature.
  • Fixed issues:
  • 61 issues have been fixed in Gradle 7.3.
  • [#18660] - Move Untracked annotation to task level
  • [#18635] - Improve error message when --project-cache-dir is used together with --watch-fs
  • [#18632] - Test Suite cannot add version catalog item
  • [#18626] - 7.3-rc-1 --project-cache-dir incompatible with org.gradle.vfs.watch=true
  • [#18622] - SourceSet with name 'test' not found in KMP
  • [#18606] - 7.3-rc-1: Incubating test suite changes breaks existing build
  • [#18598] - Fix minor JvmTestSuitePlugin docs formatting issue
  • [#9095] - Disable caching and up-to-date checks completely for task
  • [#18840] - [Regression] Incremental annotation processor fails with "Attempt to recreate a file for type"
  • [#18559] - Regression in Intellij Idea integration for Scala 3
  • [#18506] - Support for Scaladoc with Scala 3
  • [#18465] - JDK17 + JUnit broken test scanning
  • [#18460] - Gradle 7.3 snapshot: dependencies task fails with "Build output cleanup registry has already been finalized - cannot register more outputs"
  • [#18454] - Document the danger of publishing a library with a dependency on an enforcedPlatform
  • [#18412] - Configuration cache corrupted: NonSerializableMemoizingSupplier, DefaultJvmInstallationMetadata, JavaToolchain
  • [#18388] - Implement JvmTestSuite#useTestNG
  • [#18387] - Add javadoc for JvmTestSuite#useSpock and #useKotlinTest
  • [#18381] - Investigate possible breakage with test suite classpath
  • [#18324] - gradle depends on an insecure third-party JAR package that contains the CVE vulnerability
  • [#18294] - VFS couldn't add watch, error = 2
  • [#18269] - Make DisableCachingByDefault non-incubating
  • [#18243] - Update existing test coverage to use new test suite API
  • [#18241] - Add documentation to user manual for test suite API
  • [#18239] - Support TestNG and Spock as a testing framework options
  • [#18238] - Update build init to provide opt-in to best practices based on incubating APIs
  • [#18229] - Allow version catalog sub-accessors for platform, enforcedPlatform, test-fixtures and variantOf
  • [#18228] - Ignore empty directories on Java sourcepath compile option
  • [#18211] - Scala plugin doesn't pick jvm-target from java targetCompatability / toolchain
  • [#18198] - Configuration Cache: ClassNotFoundException when reusing cache for java-gradle-plugin project
  • [#18167] - In version catalog libs, alias 'jme3-plugins' is not a valid alias — Works in 7.1.1, fails in 7.2
  • [#18161] - Add more tests for untracked properties
  • [#18160] - Document untracked task properties
  • [#18159] - Allow Copy tasks to mark their output as untracked
  • [#18142] - Version Catalog: Sub-accessors and alias overload not supported for plugins.
  • [#18115] - Cannot import project using Gradle 7.3 snapshot into IntelliJ
  • [#18079] - Dependency resolution fails with 'Corrupt serialized resolution result'
  • [#18068] - Allow declaring untracked task properties
  • [#18064] - Configuration cache issue with :pluginUnderTestMetadata when java-gradle-plugin has project dependency
  • [#18002] - Please document Kotlin language compatibility with Gradle Build tool versions.
  • [#17986] - Version catalog should allow users to configure libraries with plugin suffix
  • [#17974] - Documentation: Incorrect instructions to increase inotify limits
  • [#17964] - The exclude won't be able to exclude rewritten dependency
  • [#17882] - Make MinimalExternalModuleDependency#toString work
  • [#17849] - Provide override for enforcedPlatform(Provider<MinimalExternalModuleDependency>) similar to platform
  • [#17829] - Inconsistent task selector behavior in multi-projects build
  • [#17812] - Gradle sometimes deadlocks at the start of task execution
  • [#17785] - Ensure `JavaToolchain` API compatibility with the configuration cache
  • [#17746] - Performance regression for multi-stage incremental annotation processors
  • [#17563] - Configuration Cache fails to load after Dynamic Version TTL expires.
  • [#17415] - providedRuntime is added to compileClasspath when using the war plugin
  • [#17039] - Deprecation Warning Appears after Upgrading to Gradle 7.0
  • [#16857] - Support JDK 17
  • [#16527] - Support for Scala3
  • [#13706] - Configuration cache should capture input normalization
  • [#12232] - Endless creation of crashing daemons after upgrading to 6.0.1 or 6.1.1
  • [#11587] - Gradle should not add non-existing paths to class paths
  • [#9903] - Proper incremental Java/Groovy joint compilation
  • [#7508] - ConcurrentModificationException in AbstractStyledTextOutput
  • [#8749] - For idea plugin, `.add`ing an excluded folder does not work, only reassignment works
  • [#18732] - ScalaDoc for Scala 3 breaks multi-module build
  • [#18726] - NullPointerException when building with gradle-7.3-rc2 and java 17

New in Gradle 7.3 RC 5 (Nov 5, 2021)

  • Fixed issues:
  • Move Untracked annotation to task level
  • Improve error message when --project-cache-dir is used together with --watch-fs
  • Test Suite cannot add version catalog item
  • 7.3-rc-1 --project-cache-dir incompatible with org.gradle.vfs.watch=true
  • SourceSet with name 'test' not found in KMP
  • 7.3-rc-1: Incubating test suite changes breaks existing build
  • Fix minor JvmTestSuitePlugin docs formatting issue
  • Disable caching and up-to-date checks completely for task
  • [Regression] Incremental annotation processor fails with "Attempt to recreate a file for type"
  • Regression in Intellij Idea integration for Scala 3
  • Support for Scaladoc with Scala 3
  • JDK17 + JUnit broken test scanning
  • Gradle 7.3 snapshot: dependencies task fails with "Build output cleanup registry has already been finalized - cannot register more outputs"
  • Document the danger of publishing a library with a dependency on an enforcedPlatform
  • Configuration cache corrupted: NonSerializableMemoizingSupplier, DefaultJvmInstallationMetadata, JavaToolchain
  • Implement JvmTestSuite#useTestNG
  • Add javadoc for JvmTestSuite#useSpock and #useKotlinTest
  • Investigate possible breakage with test suite classpath
  • Gradle depends on an insecure third-party JAR package that contains the CVE vulnerability
  • VFS couldn't add watch, error = 2
  • Make DisableCachingByDefault non-incubating
  • Update existing test coverage to use new test suite API
  • Add documentation to user manual for test suite API
  • Update build init to provide opt-in to best practices based on incubating APIs
  • Allow version catalog sub-accessors for platform, enforcedPlatform, test-fixtures and variantOf
  • Ignore empty directories on Java sourcepath compile option
  • Scala plugin doesn't pick jvm-target from java targetCompatability / toolchain
  • Configuration Cache: ClassNotFoundException when reusing cache for java-gradle-plugin project
  • In version catalog libs, alias 'jme3-plugins' is not a valid alias — Works in 7.1.1, fails in 7.2
  • Add more tests for untracked properties
  • Document untracked task properties
  • Allow Copy tasks to mark their output as untracked
  • Version Catalog: Sub-accessors and alias overload not supported for plugins.
  • Cannot import project using Gradle 7.3 snapshot into IntelliJ
  • Dependency resolution fails with 'Corrupt serialized resolution result'
  • Allow declaring untracked task properties
  • Configuration cache issue with :pluginUnderTestMetadata when java-gradle-plugin has project dependency
  • Please document Kotlin language compatibility with Gradle Build tool versions.
  • Version catalog should allow users to configure libraries with plugin suffix
  • Documentation: Incorrect instructions to increase inotify limits
  • The exclude won't be able to exclude rewritten dependency
  • Make MinimalExternalModuleDependency#toString work
  • Provide override for enforcedPlatform(Provider<MinimalExternalModuleDependency>) similar to platform
  • Inconsistent task selector behavior in multi-projects build
  • Gradle sometimes deadlocks at the start of task execution
  • Ensure `JavaToolchain` API compatibility with the configuration cache
  • Performance regression for multi-stage incremental annotation processors
  • Configuration Cache fails to load after Dynamic Version TTL expires.
  • ProvidedRuntime is added to compileClasspath when using the war plugin
  • Deprecation Warning Appears after Upgrading to Gradle 7.0
  • Support JDK 17
  • Support for Scala3
  • Configuration cache should capture input normalization
  • Endless creation of crashing daemons after upgrading to 6.0.1 or 6.1.1
  • Gradle should not add non-existing paths to class paths
  • Proper incremental Java/Groovy joint compilation
  • ConcurrentModificationException in AbstractStyledTextOutput
  • For idea plugin, `.add`ing an excluded folder does not work, only reassignment works
  • ScalaDoc for Scala 3 breaks multi-module build
  • NullPointerException when building with gradle-7.3-rc2 and java 17

New in Gradle 7.3 RC 3 (Oct 26, 2021)

  • Fix minor JvmTestSuitePlugin docs formatting issue
  • Move Untracked annotation to task level
  • Improve error message when --project-cache-dir is used together with --watch-fs
  • Test Suite cannot add version catalog item
  • 7.3-rc-1 --project-cache-dir incompatible with org.gradle.vfs.watch=true
  • SourceSet with name 'test' not found in KMP
  • 7.3-rc-1: Incubating test suite changes breaks existing build
  • Disable caching and up-to-date checks completely for task
  • Regression in Intellij Idea integration for Scala 3
  • Support for Scaladoc with Scala 3
  • JDK17 + JUnit broken test scanning
  • Gradle 7.3 snapshot: dependencies task fails with "Build output cleanup registry has already been finalized - cannot register more outputs"
  • Document the danger of publishing a library with a dependency on an enforcedPlatform
  • Configuration cache corrupted: NonSerializableMemoizingSupplier, DefaultJvmInstallationMetadata, JavaToolchain
  • Implement JvmTestSuite#useTestNG
  • Add javadoc for JvmTestSuite#useSpock and #useKotlinTest
  • Investigate possible breakage with test suite classpath
  • Gradle depends on an insecure third-party JAR package that contains the CVE vulnerability
  • VFS couldn't add watch, error = 2
  • Make DisableCachingByDefault non-incubating
  • Update existing test coverage to use new test suite API
  • Add documentation to user manual for test suite API
  • Update build init to provide opt-in to best practices based on incubating APIs
  • Allow version catalog sub-accessors for platform, enforcedPlatform, test-fixtures and variantOf
  • Ignore empty directories on Java sourcepath compile option
  • Scala plugin doesn't pick jvm-target from java targetCompatability / toolchain
  • Configuration Cache: ClassNotFoundException when reusing cache for java-gradle-plugin project
  • In version catalog libs, alias 'jme3-plugins' is not a valid alias — Works in 7.1.1, fails in 7.2
  • Add more tests for untracked properties
  • Document untracked task properties
  • Allow Copy tasks to mark their output as untracked
  • Version Catalog: Sub-accessors and alias overload not supported for plugins.
  • Cannot import project using Gradle 7.3 snapshot into IntelliJ
  • Dependency resolution fails with 'Corrupt serialized resolution result'
  • Allow declaring untracked task properties
  • Configuration cache issue with :pluginUnderTestMetadata when java-gradle-plugin has project dependency
  • Please document Kotlin language compatibility with Gradle Build tool versions.
  • Version catalog should allow users to configure libraries with plugin suffix
  • Documentation: Incorrect instructions to increase inotify limits
  • The exclude won't be able to exclude rewritten dependency
  • Make MinimalExternalModuleDependency#toString work
  • Provide override for enforcedPlatform(Provider<MinimalExternalModuleDependency>) similar to platform
  • Inconsistent task selector behavior in multi-projects build
  • Gradle sometimes deadlocks at the start of task execution
  • Ensure `JavaToolchain` API compatibility with the configuration cache
  • Performance regression for multi-stage incremental annotation processors
  • Configuration Cache fails to load after Dynamic Version TTL expires.
  • ProvidedRuntime is added to compileClasspath when using the war plugin
  • Deprecation Warning Appears after Upgrading to Gradle 7.0
  • Support JDK 17
  • Support for Scala3
  • Configuration cache should capture input normalization
  • Endless creation of crashing daemons after upgrading to 6.0.1 or 6.1.1
  • Gradle should not add non-existing paths to class paths
  • Proper incremental Java/Groovy joint compilation
  • ConcurrentModificationException in AbstractStyledTextOutput
  • For idea plugin, `.add`ing an excluded folder does not work, only reassignment works
  • ScalaDoc for Scala 3 breaks multi-module build
  • NullPointerException when building with gradle-7.3-rc2 and java 17

New in Gradle 7.3 RC 2 (Oct 21, 2021)

  • New features and usability improvements:
  • Support for Java 17:
  • Gradle now supports running on and building with Java 17.
  • In previous Gradle versions, running Gradle itself on Java 17 resulted in an error. JVM projects could have been built with Java 17 using toolchains.
  • As of Gradle 7.3, both running Gradle itself and building JVM projects with Java 17 is fully supported.
  • Declarative test suites in JVM projects:
  • When testing Java & JVM projects, you often need to group tests classes together to organize them into manageable chunks, so that you can run them with different frequencies or at distinct points in your build pipeline. For example, you may want to define groups of unit tests, integration tests, and functional tests.
  • Previously, grouping tests correctly required thorough knowledge of how to modify and connect various domain objects in Gradle, like SourceSets, configurations and tasks. If you wanted to divide tests into different groups, you needed to understand how these separate parts interact with one another.
  • With Gradle 7.3, the JVM Test Suite Plugin simplifies the creation of such groups of tests. We refer to these groups as Test Suites. Note that this is not to be confused with testing framework suites, like JUnit4’s Suite.
  • Test Suites are a high-level concept which can be referred to directly and consistently in build scripts. You can configure dependencies, sources and the testing framework used by the tests without having to worry about the low-level details.
  • For example, you can create an integration testing, test suite by adding the following snippet to a Java project:
  • testing {
  • suites {
  • // Add a new test suite
  • integrationTest(JvmTestSuite) {
  • // Use JUnit Jupiter as a testing framework
  • useJUnitJupiter('5.7.1')
  • // depend on the production code for tests
  • dependencies {
  • implementation project
  • // Run integration tests as part of check
  • tasks.named('check') {
  • dependsOn(testing.suites.integrationTest)
  • This functionality is available automatically for all JVM-based projects that apply the java plugin. The built-in test task has been re-implemented on top of test suites. See more in the user manual.
  • This API is incubating and will likely change in future releases as more functionality is added.
  • Scala 3 support:
  • The Scala plugin allows users to compile their Scala code using Gradle and the Zinc incremental compiler underneath.
  • The Scala plugin is now able to compile Scala 3 code. All existing configuration options should still be usable with the newest language version.
  • The newest version of Scala 3 brings about numerous features while keeping compatibility with most of the existing Scala 2 code. To see more about the language features go to overview of the new features in Scala 3.
  • Explore new behavior with gradle init:
  • When you initialize a new Gradle project using gradle init, Gradle will now ask if you want to try new but unstable features in the build. This will allow you to try out new features before they become stable. You can always ask for this behavior by running gradle init --incubating when generating a new project.
  • Currently, builds generated with this option will only enable Test Suites, but other new APIs or behaviors may be added as they are introduced.
  • Version catalog improvements:
  • Version catalog is a feature preview that provides a convenient API for referencing dependencies and their versions. It received the following improvement in this release.
  • Lifted restrictions for alias names:
  • In previous Gradle releases it was not possible to declare aliases with the suffix plugin, version and other restricted keywords. With this release these restrictions are now lifted. Check the documentation for details.
  • Version catalog type unsafe API changes
  • When using the type unsafe API, all methods accepting alias references now can use the exact same string as the alias definition. This means that you can declare and reference groovy-json instead of being forced to use groovy.json in the type unsafe API.
  • Note that access to the type unsafe API has changed, please see the upgrade guide.
  • Consistent version catalog accessors support in more scenarios:
  • With more possibilities for declaring aliases, some accessors were not supported in specific APIs related to plugin or dependency declarations. This release fixes those issues and accessors can be used consistently in more contexts.
  • For plugins, if you have kotlin.js and kotlin.js.action plugins, both can be used in the plugins block.
  • Declarations of dependencies with platform, enforcedPlatform, testFixtures and force support all accessor types.
  • Reliability improvements:
  • More robust file system watching:
  • When running an incremental build, Gradle needs to understand what has changed since the previous build on the file system. To do this it relies on the operating system's file system events whenever possible.
  • However, these file system events can be unreliable in some environments, which could cause Gradle to ignore some changes.
  • To prevent this, Gradle now detects the reliability of file system events and automatically disables the file system watching optimization in case of issues.
  • Allow copying single files into directories which contain unreadable files:
  • Sometimes you want to copy files into a directory that contains unreadable files or into one that is not exclusively owned by the build. For example when you are deploying single files into application servers or installing executables.
  • Doing so may fail or be slow because Gradle tries to track all the content in the destination directory.
  • In order to work around such issues, you can now use the method Task.doNotTrackState() on Copy tasks that forces Gradle to ignore content in the destination directory.
  • See the samples in the user manual about Deploying single files into application servers and Installing executables.
  • Input normalization support in configuration cache:
  • The input normalization is now correctly tracked by the experimental configuration cache. Task up-to-date checks now consider normalization rules when the configuration cache is enabled, leading to faster builds.
  • Plugin development improvements:
  • Initializing new plugin projects using the Build Init Plugin can also benefit from the --incubating option.
  • Allow plugin authors to declare tasks as untracked:
  • For up-to-date checks and the build cache, Gradle needs to track the state of the inputs and outputs of a task. It is not always desirable or possible for Gradle to fully track the state of the input and output files.
  • For example:
  • The input or output locations contain unreadable files like pipes where Gradle cannot track the content.
  • The input or output is stored remotely, for example in a database, and its state cannot be tracked.
  • Another tool like Git already takes care of keeping the state, so it doesn't make sense for Gradle to do additional bookkeeping.
  • The build does not own the output location exclusively and Gradle would need to track the state of a potentially large amount of content.
  • Gradle 7.3 introduces the annotation @UntrackedTask and the method Task.doNotTrackState() to declare that Gradle should not track the state of a task. This allows tasks to implement the above use-cases.
  • If a task is untracked, then Gradle does not do any optimizations when running the task. For example, such a task will always be out of date and never come from the build cache.
  • The method Task.doNotTrackState() is a replacement for Task.outputs.upToDateWhen { false } if you want your task to never be up-to-date. It has the advantage that there is no time spent on capturing state that would be discarded anyway.
  • See the samples in the user manual about Integrating an external tool which does its own up-to-date checking.
  • Improvements for tooling providers:
  • The Tooling API allows applications to embed Gradle. This API is used by IDEs such as IDEA, Android Studio and Buildship to integrate Gradle into the IDE.
  • File download progress events:
  • When a build downloads many files or very large files, for example when resolving dependencies, Gradle may appear to be unresponsive due to the lack of any logging or console output.
  • This release adds new events that notify the IDE as files are downloaded. This allows IDEs to show better progress information while Gradle is running and during IDE import/sync.
  • Security improvements:
  • Both ant and common-compress bundled libraries have been updated to resolve reported vulnerabilities. Head over to the upgrade guide for version and resolved vulnerabilities.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Disabling caching by default
  • The @DisableCachingByDefault annotation is now a stable feature.
  • Fixed issues:
  • 57 issues have been fixed in Gradle 7.3.
  • [#18598] - Fix minor JvmTestSuitePlugin docs formatting issue
  • [#18660] - Move Untracked annotation to task level
  • [#18635] - Improve error message when --project-cache-dir is used together with --watch-fs
  • [#18632] - Test Suite cannot add version catalog item
  • [#18626] - 7.3-rc-1 --project-cache-dir incompatible with org.gradle.vfs.watch=true
  • [#18622] - SourceSet with name 'test' not found in KMP
  • [#18606] - 7.3-rc-1: Incubating test suite changes breaks existing build
  • [#9095] - Disable caching and up-to-date checks completely for task
  • [#18559] - Regression in Intellij Idea integration for Scala 3
  • [#18506] - Support for Scaladoc with Scala 3
  • [#18465] - JDK17 + JUnit broken test scanning
  • [#18460] - Gradle 7.3 snapshot: dependencies task fails with "Build output cleanup registry has already been finalized - cannot register more outputs"
  • [#18454] - Document the danger of publishing a library with a dependency on an enforcedPlatform
  • [#18412] - Configuration cache corrupted: NonSerializableMemoizingSupplier, DefaultJvmInstallationMetadata, JavaToolchain
  • [#18388] - Implement JvmTestSuite#useTestNG
  • [#18387] - Add javadoc for JvmTestSuite#useSpock and #useKotlinTest
  • [#18381] - Investigate possible breakage with test suite classpath
  • [#18324] - gradle depends on an insecure third-party JAR package that contains the CVE vulnerability
  • [#18294] - VFS couldn't add watch, error = 2
  • [#18269] - Make DisableCachingByDefault non-incubating
  • [#18243] - Update existing test coverage to use new test suite API
  • [#18241] - Add documentation to user manual for test suite API
  • [#18238] - Update build init to provide opt-in to best practices based on incubating APIs
  • [#18229] - Allow version catalog sub-accessors for platform, enforcedPlatform, test-fixtures and variantOf
  • [#18228] - Ignore empty directories on Java sourcepath compile option
  • [#18211] - Scala plugin doesn't pick jvm-target from java targetCompatability / toolchain
  • [#18198] - Configuration Cache: ClassNotFoundException when reusing cache for java-gradle-plugin project
  • [#18167] - In version catalog libs, alias 'jme3-plugins' is not a valid alias — Works in 7.1.1, fails in 7.2
  • [#18161] - Add more tests for untracked properties
  • [#18160] - Document untracked task properties
  • [#18159] - Allow Copy tasks to mark their output as untracked
  • [#18142] - Version Catalog: Sub-accessors and alias overload not supported for plugins.
  • [#18115] - Cannot import project using Gradle 7.3 snapshot into IntelliJ
  • [#18079] - Dependency resolution fails with 'Corrupt serialized resolution result'
  • [#18068] - Allow declaring untracked task properties
  • [#18064] - Configuration cache issue with :pluginUnderTestMetadata when java-gradle-plugin has project dependency
  • [#18002] - Please document Kotlin language compatibility with Gradle Build tool versions.
  • [#17986] - Version catalog should allow users to configure libraries with plugin suffix
  • [#17974] - Documentation: Incorrect instructions to increase inotify limits
  • [#17964] - The exclude won't be able to exclude rewritten dependency
  • [#17882] - Make MinimalExternalModuleDependency#toString work
  • [#17849] - Provide override for enforcedPlatform(Provider<MinimalExternalModuleDependency>) similar to platform
  • [#17829] - Inconsistent task selector behavior in multi-projects build
  • [#17812] - Gradle sometimes deadlocks at the start of task execution
  • [#17785] - Ensure `JavaToolchain` API compatibility with the configuration cache
  • [#17746] - Performance regression for multi-stage incremental annotation processors
  • [#17563] - Configuration Cache fails to load after Dynamic Version TTL expires.
  • [#17415] - providedRuntime is added to compileClasspath when using the war plugin
  • [#17039] - Deprecation Warning Appears after Upgrading to Gradle 7.0
  • [#16857] - Support JDK 17
  • [#16527] - Support for Scala3
  • [#13706] - Configuration cache should capture input normalization
  • [#12232] - Endless creation of crashing daemons after upgrading to 6.0.1 or 6.1.1
  • [#11587] - Gradle should not add non-existing paths to class paths
  • [#9903] - Proper incremental Java/Groovy joint compilation
  • [#7508] - ConcurrentModificationException in AbstractStyledTextOutput
  • [#8749] - For idea plugin, `.add`ing an excluded folder does not work, only reassignment works

New in Gradle 7.2 RC 1 (Jul 29, 2021)

  • New features and usability improvements:
  • Java toolchain support for Scala projects:
  • Java toolchains provide an easy way to declare which Java version your project should be built with. By default, Gradle will detect installed JDKs or automatically download new toolchain versions.
  • With this release, toolchain support has been added to the Scala plugin.
  • Preserving escape sequences when copying files:
  • Previously, it was impossible to prevent Gradle from expanding escape sequences in a copied file when a Copy task also used expand(Map). The default behavior is to convert each escape sequence into the corresponding character in the destination file. For example, the literal string t becomes a tab character. This might be undesirable when escape sequences in processed files should be preserved as-is
  • This release adds Copy.expand(Map,Action) that allows you to disable the automatic conversion of escape sequences.
  • This method is available to all tasks and specs of type ContentFilterable.
  • Improved credentials handling for HTTP header-based authentication
  • Like for password credentials and AWS credentials for repositories, Gradle now looks for credentials for repositories that use HTTP header-based authentication in Gradle properties.
  • If the name of your project's repository is mySecureRepository, Gradle will search for properties with the names mySecureRepositoryAuthHeaderName and mySecureRepositoryAuthHeaderValue once you've configured the repository to use HttpHeaderCredentials.
  • The dependencies task and depedencyInsight task reports can be used to list the dependencies used by your project and to identify why a particular version of a dependency was selected
  • When using those reports from the command line and selecting a configuration using the --configuration parameter, you can now use an abbreviated camelCase notation in the same way as subproject and task names
  • For example, the command-line gradle dependencies --configuration tRC can be used instead of gradle dependencies --configuration testRuntimeClasspath as long as the abbreviation tRC is unambiguous
  • Version catalog improvements:
  • Version catalog is a feature preview that provides a convenient API for referencing dependencies and their versions.
  • Declaring sub-accessors:
  • In previous Gradle releases, it wasn't possible to declare a version catalog where an alias would also contain sub-aliases. For example, it wasn't possible to declare both an alias jackson and jackson.xml, you would have had to create aliases jackson.core and jackson.xml.
  • This limitation is now lifted.
  • Declaring plugin versions:
  • Version catalogs already supported declaring versions of your libraries, but they were not accessible to the plugins and buildscript blocks. This limitation is now lifted, and it's possible to declare plugins, for example in the TOML file
  • Performance improvements:
  • More cache hits between operating systems:
  • For up-to-date checks and the build cache, Gradle needs to determine if two directory structures contain the same contents. When line endings in text files differ (e.g. when checking out source code on different operating systems) this can appear like the inputs of a task are different, even though the task may not actually produce different outputs. This difference can cause tasks to re-execute unnecessarily, producing identical outputs that could otherwise have been retrieved from the build cache.
  • A new annotation has been introduced that allows task authors to specify that an input should not be sensitive to differences in line endings. Inputs annotated with @InputFiles, @InputDirectory or @Classpath can additionally be annotated with @NormalizeLineEndings to specify that line endings in text files should be normalized during build cache and up-to-date checks so that files that only differ by line endings will be considered identical. Binary files, on the other hand, will not be affected by this annotation.
  • The JavaCompile task has been updated to normalize line endings in source files when doing up-to-date checks and build cache key calculations.
  • Configuration cache support for Groovy and Scala projects:
  • Projects that are written in Groovy or Scala can enable the experimental configuration cache without generating errors from the built-in groovy and scala plugins. Configuration caching is a feature that reduces build times by caching the result of the configuration phase and reusing the result for subsequent builds.
  • Remote build cache reliability improvements:
  • The Gradle build cache is a cache mechanism that aims to save time by reusing outputs produced by other builds. A remote build cache works by storing build outputs and allowing builds to fetch these outputs from the cache when it is determined that inputs have not changed, avoiding the expensive work of regenerating them.
  • This release improves the reliability of interactions with a remote build cache.
  • Automatic retry of uploads on temporary network error:
  • Previously, only load (i.e. GET) requests that failed during request transmission would be automatically retried. Now, store (i.e. PUT) requests are also retried.
  • This prevents temporary problems, such as connection drops, read or write timeouts, or low-level network failures, to cause cache operations to fail and disable the remote cache for the remainder of the build.
  • Requests will be retried up to 3 times. If the problem persists, the cache operation will fail and the remote cache will be disabled for the remainder of the build.
  • Follow redirects by default:
  • Redirect responses are now followed by default with no additional configuration needed.
  • This can be leveraged to gracefully migrate to new cache locations, utilize some form of request signing to read to and write from other systems, or reroute requests from certain users or geographies to other locations.
  • For more information on the effect of different types of redirects, consult the User manual.
  • Use Expect-Continue to avoid redundant uploads:
  • It is now possible to opt-in to the use of Expect-Continue for upload requests.
  • This is useful when build cache upload requests are regularly rejected or redirected by the server, as it avoids the overhead of transmitting the large file just to have it rejected or redirected.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • Fixed issues:
  • [#17816] - GRADLE_CYGPATTERN should be injected into the template adjusted to the built application like GRADLE_OPTS
  • [#17815] - Root level files get not path-translated for Cygwin (and msys) in the generated shell scripts
  • [#17807] - Linux to Windows path transformation in bash wrapper and start scripts do not work with a cygdrive mount at root
  • [#17644] - Provider.zip throws exception on isPresent call when one or both values are missing
  • [#17626] - Polish release notes for 7.2
  • [#17619] - Kotlin precompiled script plugins fail to compile when plugins declared in inner classes are on the classpath
  • [#17592] - Documentation for expected property type for input and output annotations is wrong
  • [#17572] - Annotated `package-info.java` breaks incremental compilation for 6.8+
  • [#17561] - Gradle erroneously detects missing task dependency between missing output file and input filter containing **
  • [#17551] - Gradle's up-to-date checks do not work on Windows FAT drives
  • [#17509] - Confusing behavior of "vendor" selection with Java toolchains
  • [#17465] - Upgrade embedded Kotlin to 1.5.x
  • [#17433] - Update status of the shutdown/deprecation of JCenter APIs and repository
  • [#17423] - Regression in latest nightly around `dependencyInsight` changes
  • [#17410] - PMD shows "Error during type resolution" while reported class is available on runtimeClasspath
  • [#17383] - Build init plugin is locale sensitive
  • [#17340] - Configuration Cache exception: ClassNotFoundException: org.gradle.api.tasks.diagnostics.internal.DefaultGroupTaskReportModel$$Lambda$2118/0x0000000801804840
  • [#17274] - Max open file limits are not considered on MacOs
  • [#17273] - Adding custom `PublishArtifact` to `MavenPublication` fails
  • [#17227] - Missing Javadoc for Project.relativePath() throwing IllegalArgumentException
  • [#17179] - Making a Configuration Copy throws ClassCastException if Type other than DefaultDependencyConstraint among Constraints
  • [#17170] - Better error message for typed deps from a TOML file.
  • [#17128] - Do not load file-events library in the tooling API client
  • [#17086] - Improve the error message about lambdas used as additional action
  • [#17075] - Struggling to define KotlinCompileDaemon params with gradle 7.0
  • [#16946] - Base plugin overrides project.status and sets it to non-default value
  • [#16919] - `ResolvedArtifactResult.getVariant().getCapabilities()` is empty if artifact comes from an `ArtifactCollection`
  • [#16555] - Mistakenly recognized 0.7.0+26 as maven incompatible
  • [#16409] - Use DisableCachingByDefault annotation on built-in tasks
  • [#16141] - Support camelCase shourtcuts for configuration selection in dependencies/dependencyInsinght task
  • [#16055] - unix gradle wrapper fails when path contains $ character
  • [#15961] - Cache entry for ScalaCompile task does not include compiled classes sometimes
  • [#15659] - Gradle Composite build throw IllegalStateException when call `dependencies` task
  • [#15405] - GradleConnector#disconnect can trigger undesirable download of a distribution
  • [#14563] - TAPI: Offer API to obtain all included builds with nested builds and buildSrc
  • [#13461] - Make `scala` plugin support the configuration cache
  • [#13460] - Make `groovy` plugin support the configuration cache
  • [#12989] - Support creating TAR archives containing files larger than 8 GB
  • [#12756] - Ignore `MODIFIED` events for directories on Windows
  • [#11651] - Plugin not found on nested composite builds
  • [#10808] - Class Cast exception from DefaultProjectDependencyMetadata to ModuleDependencyMetadata when using includeBuild and enforcedPlatform
  • [#10751] - Deprecate using Java lambda as task action
  • [#10492] - Add option to escape backslash in Copy task expand method
  • [#9932] - Receiving S3 input stream abort warnings when using an S3 maven repository
  • [#9117] - Measure execution time more strictly

New in Gradle 7.2-20210713113638 Nightly (Jul 13, 2021)

  • Version catalog improvements
  • In previous Gradle releases, it wasn't possible to declare a version catalog where an alias would also contain sub-aliases. For example, it wasn't possible to declare both an alias jackson and jackson.xml, you would have had to create aliases jackson.core and jackson.xml. This limitation is now lifted.
  • Improved credentials handling for HTTP Header-based authentication
  • It is now possible to provide credentials for HTTP header-based authentication via properties without additional configuration in the build script.
  • Automatic retry of uploads on temporary network error
  • Previously, only load (i.e. GET) requests that failed during request transmission, after having established a TCP connection, would be automatically retried. Now, store (i.e. PUT) requests are also retried.
  • This prevents temporary problems, such as connection drops, read or write timeouts, or low-level network failures, to cause cache operations to fail and disable the remote cache for the remainder of the build.
  • Requests will be retried up to 3 times. If the problem persists, the cache operation will fail and the remote cache will be disabled for the remainder of the build.
  • Follow redirects by default
  • Redirect responses are now followed by default with no additional configuration needed.
  • This can be leveraged to gracefully migrate to new cache locations, utilize some form of request signing to read to and write from other systems, or reroute requests from certain users or geographies to other locations.
  • For more information on the effect of different types of redirects, consult the User manual.
  • Use Expect-Continue to avoid redundant uploads
  • It is now possible to opt-in to the use of Expect-Continue for upload requests.
  • This is useful when build cache upload requests are regularly rejected or redirected by the server, as it avoids the overhead of transmitting the large file just to have it rejected or redirected.
  • More cache hits when switching platforms
  • For up-to-date checks and the build cache, Gradle needs to determine if two directory structures contain the same contents. When line endings in text files differ (e.g. when checking out source code on different platforms) this can appear like the inputs of a task are different, even though the task may not actually produce different outputs. This difference can cause tasks to re-execute unnecessarily, producing identical outputs that could otherwise have been retrieved from the build cache.
  • A new annotation has been introduced that allows task authors to specify that an input should not be sensitive to differences in line endings. Inputs annotated with @InputFiles, @InputDirectory or @Classpath can additionally be annotated with @NormalizeLineEndings to specify that line endings in text files should be normalized during build cache and up-to-date checks so that files that only differ by line endings will be considered identical. Binary files, on the other hand, will not be affected by this annotation. Note that line ending normalization only applies to text files encoded with the ASCII character set or one of its supersets (e.g. UTF-8). Text files encoded in a non-ASCII character set (e.g. UTF-16) will be treated as binary files and will not be subject to line ending normalization.

New in Gradle 7.1.1 (Jul 2, 2021)

  • Many Micronaut builds failing with NPE with Gradle 7.1 & JDK 8
  • [Configuration cache] Task not up-to-date for SantaTracker
  • [Configuration cache] Filtered FC with mapped elements stored incorrectly

New in Gradle 7.2-20210629205002 Nightly (Jun 30, 2021)

  • New features and usability improvements
  • HTTP build cache usage improvements

New in Gradle 7.1 (Jun 14, 2021)

  • Upgrade Instructions:
  • Switch your build to use Gradle 7.1 by updating your wrapper:
  • ./gradlew wrapper --gradle-version=7.1
  • See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 7.1.

New in Gradle 7.1 RC (May 31, 2021)

  • This release revamps incremental Java compilation and makes it easier to configure Groovy, Scala and Antlr sourcesets in Kotlin DSL.
  • There are also several new deprecations and small improvements to make Gradle easier to use.

New in Gradle 7.0.2 (May 14, 2021)

  • Build fails with musl libc
  • Fix incorrect exception thrown by file system watching when musl libc is used

New in Gradle 7.0.1 (May 11, 2021)

  • This fixes several issues reported against 7.0:
  • Another file system watching crash within Alpine Linux Docker container
  • Disable file system watching on musl libc/Alpine Linux
  • Gradle fails with a NullPointerException when using --profile
  • Gradle 7 File Watching in Alpine Docker container leads to JVM Crash
  • Upgrade native platform to 0.22-milestone-14
  • Prepare BuildProfile earlier than beforeSettings
  • Change ConventionReportTask @since annotation from 7.0 to 6.9 in 7.0.1
  • Fix file system watching crash with Alpine Linux running in Docker container
  • Gradle Checkstyle tasks fail when the configuration directory is missing
  • Broken link in Copy error message when upgrading to Gradle 7.0
  • Version Catalogs: Specify "lib" in documentation
  • Update documentation for change in behavior when resolving dependencies for custom configurations that extend removed configurations
  • Version Catalogs: Silent failure parsing libs.versions.toml file
  • Document corner case around configuration removal
  • Version catalog fixes
  • Fix regression with config_loc existence
  • Fix broken link for DSL reference
  • DirectoryNotEmptyException on Windows with file watching enabled in Tooling API or TestKit tests
  • Report plugin context for validation problems
  • Only run the testkit fs watching tests on Gradle 7
  • Gradle 7.0 w/ Java 11 non-module projects generates broken class-/modulepath for Eclipse
  • Use FQCN in validation error messages
  • Disable file system watching for builds started by testkit on Windows
  • Add modules to Eclipse classpath only if project is modular
  • Gradle fails to start when Java Home directory is removed from a previous daemon
  • Display plugin in validation messages
  • File system watching is disabled when watcher thread quits unexpectedly
  • Check that the Java home for the potential compatible daemon still exists
  • Gradle builds on Windows with unavailable mapped remote file systems produce an error message on success
  • Fail gracefully when filesystems can't be listed
  • Gradle generates a <project-root>/.gradle/configuration-cache/gc.properties file regardless of the value of --project-cache-dir
  • Backport --project-cache-dir configuration cache fix to 7.0.1
  • Add more logging around starting and stopping file system watching
  • Return same SnapshotHierarchy when nothing was invalidated
  • Add ApiClassExtractor to configuration hash of AbiExtractingClasspathResourceHasher (Bugfix 7.0.1)
  • Generated Gradle API JAR is different and causes cache misses

New in Gradle 7.0 (Apr 11, 2021)

  • Performance improvements:
  • This release contains further improvements for incremental development — the part of the software development process where you make frequent small changes.
  • Faster incremental builds:
  • In an incremental build, input and output files are checked to determine what needs to be rebuilt. This feature typically saves a lot of time; however, it adds some I/O overhead, which can be noticeable in large projects when not much has changed since the previous build.
  • File system watching was introduced as an opt-in feature in Gradle 6.5 and marked as production-ready in Gradle 6.7. When enabled, Gradle keeps what it has learned about the file system in memory between builds and skips reading from the file system on each build. This significantly reduces the amount of disk I/O needed to determine what has changed since the previous build.
  • New features and usability improvements:
  • Native support for Apple Silicon:
  • Previous Gradle versions were able to run on new Macs with Apple Silicon processors with some disadvantages:
  • With a native ARM JDK, Gradle features like the rich console and file system watching would be disabled.
  • With an Intel JDK, Gradle would run at about half speed through the Rosetta2 compatibility layer.
  • Support for Java 16:
  • Gradle now supports running on and building with Java 16.
  • In previous Gradle versions, running Gradle itself on Java 16 resulted in an error. JVM projects could have been built with Java 16 using toolchains but only with incremental compilation disabled.
  • As of Gradle 7.0, both running Gradle itself and building JVM projects with Java 16 is fully supported.
  • Centralized dependency versions:
  • There are a number of ways to share dependency versions between projects in multi-project builds. For example, users can declare versions or dependency coordinates directly in build scripts (in the ext block), external files (e.g dependencies.gradle), in buildSrcor even dedicated plugins. There wasn’t, however, any standard mechanism to do this which would combine the advantages of each approach.
  • With this release, Gradle introduces version catalogs as an experimental feature. A version catalog enables build authors to centralize the dependency coordinates (group, artifact, version) of their third party dependencies in a conventional configuration file and declare the actual dependencies in a type-safe way.
  • Type-safe project accessors:
  • Before Gradle 7.0, the only way to declare dependencies between projects in a multi-project build was by using string notation, for example project(":some:path").
  • This release of Gradle adds an experimental feature for project accessors which provides type safety and enables code completion in IDEs.
  • Groovy 3 upgrade:
  • In order to support JDK 16 and keep up to date with the latest Groovy release, Gradle has been upgraded to use Groovy 3 in Groovy DSL build scripts. Groovy 3 comes with a new parser and host of other new features and capabilities that make interoperability with new Java features easier.
  • There are some incompatibilities between Groovy 2 and 3, that may cause issues when upgrading to Gradle 7.0.
  • Dependency locking improvements:
  • Dependency locking is a mechanism for ensuring reproducible builds also when using dynamic dependency versions.
  • This release defaults to the improved dependency locking file format that results in fewer lock files in most projects that use this feature. Specifically, it results in one file per project instead of one file per configuration per project.
  • Gradle will automatically clean up previous lock files when migrating them over to the new file format.
  • In addition, when using the new format, the lock file name and location can be configured.
  • Using dynamic versions in the plugins block:
  • Until now, the plugins { } block only supported fixed versions for community plugins. All version string notations Gradle supports are now accepted, including + or latest.release.
  • Build reliability improvements:
  • Gradle employs a number of optimizations to ensure that builds are executed as fast as possible. These optimizations rely on the inputs and outputs of tasks to be well-defined. Gradle already applies some validation to tasks to check whether they are well-defined.
  • Disable optimizations for validation problems:
  • If a task is failing input/output validation, Gradle will now execute it without the benefit of parallel execution, up-to-date checks and the build cache. For more information see the user manual on runtime validation.
  • Validate missing dependencies between tasks:
  • One of the potential problems now flagged is a task that consumes the output produced by another without declaring an explicit or inferred task dependency. Gradle now detects the missing dependency between the consumer and the producer and emits a warning in that case. For more information see the user manual on input and output validation.
  • Dependency management improvements:
  • Correct handling of libraries with standard JVM and Android variants
  • The Java plugins now recognizes the org.gradle.jvm.environment attribute during dependency resolution.
  • Plugin development improvements:
  • Support for plugins with multiple variants:
  • Gradle 7 looks for the new org.gradle.plugin.api-version attribute during plugin resolution. This allows plugin authors to publish different variants of their plugins for different Gradle versions. This user manual section describes how the new attribute can be used with feature variants to add additional variants to a plugin.
  • Using included builds for local plugins:
  • Developing plugins as part of a composite build, to organize build logic in convention plugins, was so far only possible for project plugins (plugins applied in build.gradle(.kts) files). Settings plugins (plugins applied in settings.gradle(.kts) files) always had to be developed in isolation and published to a binary repository.
  • Fixed issues:
  • [#16593] - Dependency locking of settings classpath isn't properly persisted
  • [#16585] - Upgrade Bouncy Castle dependency
  • [#16509] - Investigate tmp dir problems
  • [#16490] - Verify that Gradle TestKit works forwards and backwards with Gradle 7
  • [#16461] - 7.0-M2 fails to build when using "withGroovyBuilder"
  • [#16459] - Groovy DSL script plugins prematurely truncate the plugin id
  • [#16406] - providedCompile configuration from war plugin is not added to testRuntimeClasspath
  • [#16388] - Let the configuration cache serialize arrays of primitive types
  • [#16387] - Dependency locking polishing
  • [#16383] - JDK 16: InaccessibleObjectException: Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle)
  • [#16364] - Dependency locking should not persist lock state on build failure
  • [#16361] - Write upgrade guide for Groovy upgrade
  • [#16360] - Make sure localGroovy/embedded Groovy represents a "full" Groovy language distribution
  • [#16359] - Consistently use Spock2+JUnit platform in documentation and tests
  • [#16357] - Gradle Profiler - Remove copy of ApplyAbiChangeToJavaSourceFileMutator
  • [#16335] - Investigate what macOS memory info issues mean for Gradle
  • [#16330] - Upgrade embedded Kotlin to 1.4.31
  • [#16314] - Document new includeBuild for plugin builds
  • [#16297] - Groovy3: Investigate init script issues
  • [#16243] - Remove smoke test for 'org.samples.greeting' plugin
  • [#16238] - Investigate and fix snippets with failing/ignored tests
  • [#16210] - Remove remaining occurences of compile and runtime in docs and diagrams
  • [#16209] - Allow work to be marked explicitly not cacheable via annotation
  • [#16203] - Remove willBeRemovedInGradle7() and willBecomeAnErrorInGradle7() methods from DeprecationMessageBuilder
  • [#16201] - Make adding 'config_loc' to checkstyle.configProperties an error
  • [#16199] - Regression: StackOverflowError during configuration
  • [#16187] - Improve deprecation message for resolution of configuration outside of project scope.
  • [#16183] - Configuration cache issue with :pluginUnderTestMetadata when both kotlin-jvm and java-gradle-plugin are applied
  • [#16160] - Wrong deprecation warning on using task outputs in another task with no explicit task dependency
  • [#16133] - `processDebugAndroidTestManifest` is wrongly out of date on second run with the configuration cache enabled
  • [#16117] - Ignore generated methods for Memoized annotation for plugin validation
  • [#16079] - excludePlugin in version catalog does not work
  • [#16078] - Confusing inconsistency regarding default plugin versions in TOML files
  • [#16062] - Task dependency verification should report the source of the problem
  • [#16061] - Bug in task dependency validation
  • [#16059] - Gradle 7: skip dependency validation for disabled tasks
  • [#16048] - Performance regression in large Android project with Gradle 7.0-milestone-1
  • [#16043] - JavaPlugin documentation states wrong default.extendsFrom
  • [#16035] - Remove references to JCenter from Gradle
  • [#16030] - Fix `Querying the mapped value of provider(interface java.util.Set) before task ':base-services:jar'` in our build
  • [#16027] - Change in behaviour when resolving project dependencies
  • [#16018] - Deprecate the jcenter() convenience method
  • [#15993] - Remove inactive feature preview flag GRADLE_METADATA
  • [#15909] - Investigate static analysis of external plugins
  • [#15889] - Node DexingWithClasspathTransform has not been encoded yet with 7.0
  • [#15881] - Do not watch unsupported file systems
  • [#15877] - Turn 'Changing the value for a FileCollection with a final value' into an error
  • [#15876] - Turn 'Querying the mapped value of provider before producer has completed' into an error
  • [#15873] - Make 'Calling afterEvaluate when the project is already evaluated' an error
  • [#15871] - Remove ComponentSelectionReason.getDescription()
  • [#15870] - Remove Test.getClassLoaderCache()
  • [#15866] - Cross-document links in userguide_single are broken
  • [#15828] - StackOverflowError when loading project in IntelliJ IDEA with Gradle 6.8
  • [#15812] - Promote Java Toolchains
  • [#15796] - Gradle triggers its own deprecation warning "Querying the mapped value of task"
  • [#15744] - Update embedded dependencies to latest versions
  • [#15736] - Re-enable cross-build transform cache
  • [#15725] - Adjust resolution order of plugin sources if pluginManagement { includeBuild() } is used
  • [#15724] - Remove DefaultVersionSelectorScheme.DefaultVersionSelectorScheme(VersionComparator)
  • [#15723] - Default to single lock file per project
  • [#15722] - Default to updated version sorting
  • [#15719] - Remove 'javascript.base.SourceTransformationException'
  • [#15713] - Remove deprecated JavaScript plugins
  • [#15707] - gradle depends on an insecure third-party JAR package that contains the CVE vulnerability cve-2020-13956.
  • [#15682] - De-incubate Javadoc/Sources publishing and compileOnlyApi
  • [#15676] - De-incubate Java Module System support
  • [#15631] - Add 'org.gradle.plugin.api-version' attribute
  • [#15615] - Do not report missing dependency if there is a dependency in the other direction
  • [#15606] - Must do before 7.0 release
  • [#15603] - Upgrade the embedded Kotlin to 1.4.21
  • [#15600] - Promote incubating Provider.forUseAtConfigurationTime
  • [#15599] - Remove deprecated org.gradle.logging.LoggingManagerInternal
  • [#15594] - Fail for duplicates in copy specs for default duplicates strategy
  • [#15585] - Remove deprecated org.gradle.api.internal.AbstractTask
  • [#15579] - Remove deprecated ProjectLayout.configurableFiles and friends
  • [#15576] - Promote incubating `ProviderFactory.fileContents`
  • [#15575] - Promote incubating `ProviderFactory.(gradleProperty|systemProperty|environmentVariable)`
  • [#15573] - Promote incubating `org.gradle.process.ExecOperations`
  • [#15572] - Promote incubating `ObjectFactory.fileCollection`
  • [#15567] - Upgrade unit and integration tests to run on Spock 2
  • [#15566] - Accept Groovy performance regressions
  • [#15565] - Promote `ObjectFactory.fileProperty`, `directoryProperty` and `sourceDirectorySet`
  • [#15561] - Promote incubating TAPI for notifying the daemon of changed paths
  • [#15560] - Promote incubating ignoring of empty directories
  • [#15559] - Promote incubating WorkResult.or()
  • [#15558] - Promote incubating getStableSources()
  • [#15557] - Promote incubating BuildCacheKey.toByteArray()
  • [#15556] - Promote incubating ReplacedBy
  • [#15555] - Promote incubating FileType
  • [#15554] - Promote incubating InjectionPointQualifier
  • [#15553] - Promote incubating Task.getTimeout()
  • [#15552] - Remove deprecated work validation failures
  • [#15551] - Remove deprecated arbitrary local build cache configuration option
  • [#15550] - Remove deprecated ValidateTaskProperties task
  • [#15549] - Remove deprecated unsafe watch file system properties
  • [#15548] - Remove deprecated methods in JavaCompile
  • [#15547] - Remove deprecated ImmutableFileCollection
  • [#15545] - Remove deprecated VFS system properties
  • [#15543] - Remove deprecated PatternSpecFactory.reportChangedDefaultExcludes()
  • [#15538] - Compilation with toolchain using JDK 16-ea28 fails due to illegal access to com.sun.tools.javac.code.Symbol$TypeSymbol (worked in 16-ea26)
  • [#15536] - Multiple transformed artifacts selected
  • [#15512] - Remove deprecated methods from IdeaContentRoot
  • [#15509] - Support for Apple silicon natively
  • [#15505] - Enable file system watching by default
  • [#15504] - Remove the Play plugins
  • [#15498] - Javadoc uses the same output directory for different source sets
  • [#15489] - Fix Lint task with evaluation of input properties
  • [#15482] - Remove deprecated APIs in code-quality subproject
  • [#15480] - Removal of IvyArtifactRepository.layout deprecated methods
  • [#15479] - Deincubate TAPI test debugging features
  • [#15478] - Deincubate EclipseProject TAPI mode fixtures
  • [#15477] - Deincubate test output progress events
  • [#15476] - Deincubate TestLauncher methods
  • [#15474] - Deincubate ProjectDependency and EclipseExternalDependency methods
  • [#15467] - Remove deprecated toolchain/installation APIs
  • [#15430] - Add 'org.gradle.jvm.environment' attribute
  • [#15382] - Give access to catalogs from binary plugins
  • [#15352] - Central declaration of dependencies
  • [#15350] - Not possible to use libs.xy based on TOML file inside of custom configuration with closure
  • [#15348] - Disable parallel execution for work failing validation
  • [#15347] - Report work validation warnings to console
  • [#15305] - Disable execution optimizations for invalid work
  • [#15250] - Follow up on not fingerprinting outputs
  • [#15185] - Regression with JUnit Platform it is not possible to select inherited tests via command line
  • [#15044] - Configuration cache - Intellij synchronization crashes
  • [#14888] - Let .gradle.kts scripts use Kotlin language and api 1.4
  • [#14875] - Kotlin scripts should be compiled with `-Xjvm-default=enable`
  • [#14744] - Incremental compilation should be supported with JDK 15
  • [#14729] - Plugin org.yaml_snakeyaml:1.17 has a known vulnerability - https://nvd.nist.gov/vuln/detail/CVE-2017-18640
  • [#14562] - Settings plugins should be visible to other included builds
  • [#13932] - ListProperty value is observed too eagerly when used as a task dependency
  • [#13800] - Disable Gradle Module Metadata buildId by default
  • [#13793] - Allow source dependencies without settings file before making DeprecateUndefinedBuildWorkExecutor.execute() fail
  • [#13774] - JDK16 support in Gradle
  • [#13491] - `buildSrc/build` should not be added to classpath if `buildSrc` contains no sources or build files.
  • [#13481] - Support Java 16
  • [#13333] - Provider.orElse(<provider>) tests presence eagerly
  • [#12840] - IntelliJ IDEA Gradle sync with Zulu 11.0.7 JDK on macOS throws newly created daemon process has a different context than expected
  • [#12742] - Make inferModulePath=true the default
  • [#12506] - Dependency substitution not resolving project artifact
  • [#11418] - Remove org.gradle.kotlin.dsl.caching.buildcache
  • [#10039] - Fail on duplicates when creating archives by default
  • [#9838] - Remove deprecated java and scala 'language plugins'
  • [#9341] - Disallow write-only task properties
  • [#8087] - Depend on individual Groovy libraries instead of groovy-all
  • [#7338] - Task implementors/users get often-surprising caching behaviour when file inputs have no explicit normalisation/path-sensitivity
  • [#6865] - Stop DefaultProject extending ProcessOperations
  • [#9076] - Disable caching for tasks failing task type validation
  • [#890] - JPMS Support
  • [#16676] - Inconsistent accessor generation strategy for "versions" and "bundles"
  • [#16667] - Regression in 7.0-rc-1 around setting groovy classpath for groovydoc task
  • [#16641] - Gradle 7.0 has problems with annotation processors and java 16
  • [#16636] - Typesafe project accessors not working in root build script file
  • [#16634] - Typesafe accessors to version catalog do not work in the subprojects block
  • [#16631] - Dependency locking sometimes create an empty lockfile
  • [#16581] - Performance regression in Gradle 7.0 for large Android builds
  • [#16186] - Android sourceSets task does not show output in Gradle 6.8+
  • [#16115] - Tooling API TestProgressEvents ignore test display name
  • [#15992] - com.gradle.plugin-publish should upload Gradle Module Metadata to the Plugin Portal

New in Gradle 6.8.3 (Feb 27, 2021)

  • Fixes:
  • Fix issue with file hash cache during runtime classpath normalization (6.8 backport)
  • Build cache miss when jars have been hashed with different normalization configuration

New in Gradle 6.8.2 (Feb 5, 2021)

  • This is a patch release for Gradle 6.8.
  • This fixes several bugs in Gradle 6.8.1:
  • Large performance regression when file system watching is enabled on macOs and Windows
  • Race condition in optimistic concurrency behaviour of `InstrumentingClasspathFileTransformer`
  • Kotlin DSL generated accessors for precompiled scripts should have normalized line endings
  • Backport: Improve optimistic concurrency behaviour of `InstrumentingClasspathFileTransformer`
  • Correct version ordering example in documentation
  • Backport: Normalize line endings on Kotlin DSL accessors
  • Correct version ordering
  • Fix more broken links in the kotlin-dsl documentation
  • Exit early for FileSystemNode.hasDescendants

New in Gradle 6.8.1 (Jan 22, 2021)

  • Fixes:
  • Broken and outdated links in Kotlin DSL Primer
  • Gradle 6.8: Could not write XML test results
  • Central repository declaration does not work for Groovy
  • Unable to configure dependencyResolutionManagement from an init script
  • Do not fail if test failure has no exceptions
  • Groovy and Scala support for central repository declaration
  • Fix broken links in Kotlin DSL primer
  • Maven2Gradle plugin fails with NullPointerException when maven-compiler-plugin does not contain <configurtion>
  • Fix NPE in Maven2Gradle conversion
  • Gradle 6.8 incorrectly swaps binary dependency to project dependency
  • Do not register root build substitutions by default
  • Gradle 6.8 Doesn't Resolve Groovy On the Classpath correctly with the Repo defined in the settings.gradle
  • Promote incubating --watch-fs command-line parameter
  • After upgrading to 6.8, a project containing a properties file in src/test/resources with malformed unicode content fails to build
  • 6.8: stale artifactId is used in the generated pom in case the project dependency uses a modified artifactId in the publication
  • Fix umbrella build definition of 'structuring software projects' sample
  • Fix invalid project identity in publication
  • Regression in 6.8 regarding experimental Kotlin compiler features warning
  • Fix Kotlin compiler warning rewriting when configured to turn warnings to errors
  • De-incubate --watch-fs command-line parameter
  • Fix properties normalization when bad unicode sequences are encountered

New in Gradle 6.8 RC4 (Dec 22, 2020)

  • This release significantly improves the performance of Kotlin DSL build scripts compilation, adds several improvements to Java toolchain support, including vendor selection, and makes it easy to execute any tasks in a composite build directly from the command line. This release also introduces new dependency management APIs for consistent resolution.
  • The experimental configuration cache has added support for composite builds and more core plugins shipped with Gradle.
  • Several other improvements were added in this release.

New in Gradle 7.0-20201214230040 Nightly (Dec 14, 2020)

  • Build reliability improvements:
  • Gradle employs a number of optimizations to ensure that builds are executed as fast as possible. These optimizations rely on the inputs and outputs of tasks to be well-defined. Gradle already applies some validation to tasks to check whether they are well-defined. If a task is found to be invalid, Gradle will now execute it without the benefit of parallel execution, up-to-date checks and the build cache. For more information See the user manual on runtime validation.
  • Plugin development improvements
  • Included plugin builds
  • Developing plugins as part of a composite build was so far only possible for project plugins. Settings plugins always had to be developed in isolation and published to a binary repository.
  • This release introduces a new DSL construct in the settings file for including plugin builds. Build included like that can provide both project and settings plugins.
  • Library components produced by builds included though the pluginManagement block are not automatically visible to the including build. However, the same build can be included as plugin build and normal library build.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • In Gradle 7.0 we moved the following classes out of incubation phase:
  • org.gradle.tooling.model.eclipse.EclipseRuntime
  • org.gradle.tooling.model.eclipse.EclipseWorkspace
  • org.gradle.tooling.model.eclipse.EclipseWorkspaceProject
  • org.gradle.tooling.model.eclipse.RunClosedProjectBuildDependencies

New in Gradle 6.8 RC1 (Dec 12, 2020)

  • This release significantly improves the performance of Kotlin DSL build scripts compilation, adds several improvements to Java toolchain support, including vendor selection, and makes it easy to execute tasks from included builds directly from the command-line. This release also introduces new dependency management APIs for consistent resolution.
  • The experimental configuration cache has added support for composite builds and more core plugins shipped with Gradle.
  • Several other improvements were added in this release.
  • We don't expect many builds to be affected, but this release disables outdated TLS v1.0 and v1.1 protocols to improve the security of builds resolving dependencies from external repositories.

New in Gradle 6.8-20201113230044 Nightly (Nov 14, 2020)

  • Performance improvements:
  • Kotlin DSL script compilation is faster and consumes less memory
  • In this release, the compilation of Gradle Kotlin DSL scripts (*.gradle.kts) is faster and consumes less memory.
  • On a sample medium-sized build, the cumulative script compilation time goes from ~50 seconds down to ~21 seconds with cold caches and cold daemons. This improvement also reduces memory pressure. Garbage collection time goes from 2.6 seconds down to 1.3 seconds.
  • While the impact on your build may vary, most builds can expect a noticeably shorter feedback loop when editing Kotlin DSL build logic thanks to this improvement.
  • Compilation avoidance for Kotlin DSL scripts:
  • Until now, any changes to build logic in buildSrc required all the build scripts in the project to be recompiled.
  • This release introduces compilation avoidance for Gradle Kotlin DSL scripts. This feature will cause the scripts to be recompiled only if a change to shared build logic impacts the ABI (application binary interface) of the resulting artifact. In simpler terms, changes to private implementation details of build logic, such as private methods or classes, bodies of non-private methods or classes, as well as internal changes to precompiled script plugins such as configuration of tasks will no longer trigger recompilation of the project's build scripts.
  • On a sample build with 100 subprojects, full recompilation of build scripts caused by a change in buildSrc can take ~20 seconds. A non-ABI change can eliminate build script recompilation altogether now, saving those 20 seconds.
  • While changes to buildSrc immediately affect the classpath of all the scripts, this improvement is more general and applies to changes in any jar on the scripts classpath that can be added by a plugin applied from an included build or added directly via buildscript {} block.
  • Note: Kotlin's public inline functions are not supported with compilation avoidance. If such functions appear in the public API of a jar on the buildscript's classpath, that jar will not participate in compilation avoidance. For example, if buildSrc contains a class with a public inline function, then buildSrc will not participate in compilation avoidance and all the buildscripts will be recompiled for any change in buildSrc.
  • Improved cache hits when normalizing runtime classpaths:
  • For up-to-date checks and the build cache, Gradle needs to determine if two task input properties have the same value. In order to do so, Gradle first normalizes both inputs and then compares the result.
  • Runtime classpath analysis now smartly inspects all properties files, ignoring changes to comments, whitespace, and differences in property order. Moreover, you can selectively ignore properties that don't impact the runtime classpath.
  • Configuration cache improvements:
  • Composite builds:
  • Starting with this release, composite builds are fully supported with the configuration cache.
  • Supported core plugins:
  • In this release a number of core Gradle plugins got improved to support the configuration cache:
  • checkstyle
  • pmd
  • codenarc
  • jacoco
  • Dependency resolution improvements:
  • Central declaration of repositories:
  • Traditionally in a Gradle build, repositories used for dependency resolution are declared in every project. However, in most cases, the same repositories should be used in every project of a single build. This led to the common pattern of using an allprojects { ... } block to declare the repositories.
  • Central declaration of component metadata rules:
  • Component metadata rules are a powerful tool to fix bad metadata published on remote repositories. However, similarly to repositories, rules traditionnally had to be applied on each project. Starting from this release, it is possible to declare component metadata rules at a central place in settings.gradle(.kts)
  • Consistent dependency resolution:
  • It's a common problem that the dependencies resolved for the runtime have different versions than the dependencies resolved for compile time. This typically happens when a transitive dependency that is only present at runtime brings in a higher version of a first level dependency.
  • To mitigate this problem, Gradle now introduces an API which lets you declare consistency between dependency configurations.
  • New features and usability improvements:
  • Java Toolchains:
  • Java toolchain support provides an easy way to declare what Java version the project should be built with. By default, Gradle will auto-detect installed JDKs that can be used as toolchain.
  • Selecting toolchain by vendor:
  • In case your build has specific requirements from the used JRE/JDK, you may want to define the vendor for the toolchain as well. JvmVendorSpec has a list of well-known JVM vendors recognized by Gradle. The advantage is that Gradle can handle any inconsistencies across JDK versions in how exactly the JVM encodes the vendor information.
  • Viewing all available toolchains:
  • In order to see which toolchains got detected and their corresponding metadata, Gradle 6.8 now provides some insight with the javaToolchains task.
  • This can help to debug which toolchains are available to the build and if the expected toolchain got detected or requires manual setup. See the toolchain documentation for more in-depth information on toolchain detection and usage.
  • Implicit imports:
  • When using dependency injection when developing plugins, tasks or project extensions, it is now possible to use the @Inject annotation without explicitly importing it into your build scripts the same way it works for other Gradle API classes.
  • Security Improvements:
  • Outdated TLS versions are no longer enabled by default:
  • This version of Gradle removes TLS protocols v1.0 and v1.1 from the default list of allowed protocols. Gradle will no longer fallback to TLS v1.0 or v1.1 by default when resolving dependencies. Only TLS v1.2 or TLS v1.3 are allowed by default.
  • These TLS versions can be re-enabled by manually specifying the system property https.protocols with a comma separated list of protocols required by your build.
  • The vast majority of builds should not need to change in any way. Maven Central and JCenter/Bintray dropped support for TLS v1.0 and TLS v1.1 two years ago. Java has had TLS v1.2+ available for several years. Disabling these protocols in Gradle protects builds from downgrade attacks.
  • Depending on the version of Java you use, Gradle will negotiate TLS v1.2 or TLS v1.3 when communicating with remote repositories.
  • Note: Early versions of JDK 11 & JDK 12 contained race condition bug in the TLSv1.3 handling logic which causes the exception javax.net.ssl.SSLException: No PSK available. Unable to resume. If you run into this issue, we recommend updating to the latest minor JDK version.
  • IDE integration:
  • Importing projects with custom source sets into Eclipse:
  • This version of Gradle fixes problems with projects that use custom source sets, like additional functional test source sets.
  • Custom source sets are now imported into Eclipse automatically and no longer require manual configuration in the build.
  • Composite build improvements:
  • Executing tasks from an included build:
  • Gradle now allows users to execute tasks from included builds directly from the command-line. For example, if your build includes my-other-project as an included build and it has a subproject sub with a task foo, then you can execute foo with the following command - gradle :my-other-project:sub:foo. Note, unlike a multi-project build, running gradle build will not run the build task in all of the included builds. You could introduce task dependencies to tasks in included builds if you wanted to recreate this behavior for included builds.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.

New in Gradle 6.8-20201106230041 Nightly (Nov 7, 2020)

  • Fix: Unable to retrieve the issue information. You may not be connected to the Internet, or there may have been an error.

New in Gradle 6.7 (Oct 14, 2020)

  • Performance improvements:
  • File system watching is ready for production use
  • In an incremental build, input and output files are checked to determine what needs to be rebuilt. This feature typically saves a lot of time; however, it adds some I/O overhead, which can be noticeable in large projects when not much has changed since the previous build.
  • Back in Gradle 6.5 we've introduced file-system watching as an experimental feature. When enabled, it allows Gradle to keep what it has learned about the file system in memory during and between builds instead of polling the file system on each build. This significantly reduces the amount of disk I/O needed to determine what has changed since the previous build.
  • This feature is now ready for production use and supported on Linux, Windows and macOS. You can enable it by adding the following to gradle.properties in the project root or in your Gradle user home: org.gradle.vfs.watch=true
  • Configuration cache improvements:
  • Gradle 6.6 introduced configuration caching as an experimental feature. This release comes with usability and performance improvements for the configuration cache.
  • Early adopters of configuration cache can use the command line output and HTML report for troubleshooting. Previously, the configuration cache state was saved despite reported problems, which in some situations required manual cache invalidation. In this release, the configuration cache gets discarded when the build fails because of configuration cache problems. Note that you can still ignore known problems.
  • The problem report is also more helpful now. It reports the source of problems more accurately, pointing at the offending location in plugins and scripts in more cases.
  • Loading from the configuration cache is also faster and memory consumption during builds has been reduced, especially for Kotlin and Android builds.
  • Read about this feature and its impact on the Gradle blog. You can also track progress of configuration cache support in core plugins and community plugins.
  • New JVM ecosystem features:
  • Toolchain support for JVM projects
  • By default, Gradle uses the same Java version for running Gradle itself and building JVM projects.
  • This is not always desirable. Building projects with different Java versions on different developer machines and CI servers may lead to unexpected issues. Additionally, you may want to build a project using a Java version that running Gradle is not compatible with.
  • Before this release, it required several steps to configure a different Java version for compilation, testing, generating Javadoc, and executing applications.
  • This release introduces the toolchain concept to simplify such a setup. A Java toolchain is a set of tools (javac compiler,java command etc), taken from a local Java installation and used during the build. Instead of manually specifying executables for the various tasks, toolchains provide a centralized place to define the Java version requirements in the build.
  • New dependency management features:
  • Compile-only API dependencies for JVM libraries
  • When writing a Java (or Groovy/Kotlin/Scala) library, there are cases where you require dependencies at compilation time which are parts of the API of your library, but which should not be on the runtime classpath.
  • An example of such a dependency is an annotation library with annotations that are not used at runtime. These typically need to be available at compile time of the library's consumers when annotation processors inspect annotations of all classes. Another example is a dependency that is part of the runtime environment the library is expected to run on, but also provides types that are used in the public API of the library.
  • The Java Library Plugin now offers the compileOnlyApi configuration for this purpose. It effectively combines the major properties of the compileOnly configuration (dependency will not be on the runtime classpath) and the api (dependencies are visible for consumers at compile time).
  • Other new features and usability improvements:
  • Abbreviation of kebab-case project names
  • Gradle allows you to abbreviate project and task names from the command-line. For example, you can execute the task compileTestJava by running gradle cTJ.
  • Up until this release, fuzzy name matching only worked for camelCase names (e.g. compileTestJava). This is the recommended convention for task names, but it is unusual for project names. In the Java world, directory names are usually all lowercase by convention and in Gradle, project names usually follow the name of the directory the project is in.
  • Many projects worked around this limitation by using kebab-case project directories (e.g. my-awesome-lib) while defining different camelCase project names in their settings scripts. This allowed them to use project name abbreviations in the command line but added additional complexity to the build.
  • This release changes the fuzzy name matching to support for kebab-case names. Now, you can execute the compileTestJava task in the project my-awesome-lib with the following command
  • Fixed issues:
  • [#13278] - Make <feature>RuntimeElements extend <feature>RuntimeOnly
  • [#14389] - Only log file events that cause a change in the virtual file system
  • [#14388] - Introduce file system watching debug flag
  • [#14361] - Improve verbose VFS logging
  • [#14339] - Update InProcessGradleExecuterIntegrationTest for file system watching
  • [#14338] - Remove ToBeFixedForFileSystemWatching annotation
  • [#14336] - Allow repository definition by configuration
  • [#14305] - Add single/multi-project choice to 'gradle init --type application'
  • [#14299] - Add 'compileOnlyApi' configuration to java-library projects
  • [#14287] - TestNGTestFramework makes the Test Retry plugin incompatible with config cache
  • [#14185] - Add switch to enable verbose logging for VFS
  • [#14172] - Dependency resolution selector cache not specific enough for virtual platform edges
  • [#14168] - Scala compilation of protobuf generated code is broken because zinc leaks protobuf-java to compile classpath
  • [#14160] - Let user configure JavaCompile with source/target/release independant of a toolchain
  • [#14158] - Performance bottleneck for large projects when file system watching is enabled
  • [#14139] - Let `Javadoc` task accept a toolchain
  • [#14129] - Remove incubating message about watching the file system
  • [#14128] - Drop "unsafe" from file system watching-related property names
  • [#14114] - Allow configuring the maximum number of watched hierarchies
  • [#14084] - Change 'gradle init' to generate multi-projects
  • [#14080] - Provide API to query for toolchains
  • [#14060] - Extend name matching section in user guide
  • [#14041] - RepositoryContentDescriptor should support include/exclude version ranges
  • [#14024] - Verify project naming convention consistency
  • [#14022] - Make use of kebab case name matching in gradle/gradle
  • [#14005] - Precompiled script plugins - `GradleProperties has not been loaded yet.`
  • [#13998] - Let `JavaExec` task accept a toolchain
  • [#13990] - build events generated by tooling api are wrong when OperationCompletionListener is used
  • [#13988] - Make fuzzy matching work with kebab-case project naming
  • [#13983] - Use composition instead of inheritance to separate BuildOperationRunner from BuildOperatoinExecutor
  • [#13966] - Configuration caching uses stale provider value
  • [#13965] - Configuration caching querying task outputs too early
  • [#13892] - Toolchain is matched deterministically
  • [#13890] - Download toolchains on demand
  • [#13886] - Use Kotlin source in Santa Tracker Kotlin Android performance tests
  • [#13871] - Detect common Java installation locations
  • [#13868] - Let `Test` task accept a toolchain
  • [#13867] - Ability to configure toolchain requirements for a build
  • [#13855] - Deprecate `JavaApplication#setMainClassName` in favour of property
  • [#13838] - Enable partial VFS invalidation by default
  • [#13837] - Move excessive logging around VFS to build operations
  • [#13835] - Explain memory leak-like slowdown when FSW is enabled on Gradle build
  • [#13657] - Support for compiling own (test) code with Groovy 4.0
  • [#13656] - Gradle 6.5 pulls in optional dependency
  • [#13628] - Gradle 6.5 build fails on Java 15-ea with Execution failed for task ':jar'. java.util.ConcurrentModificationException (no error message)
  • [#13596] - Memory inefficiency in ConsumerVariantMatchResult for very large project.
  • [#13554] - Pre-existing empty output directory may cause incorrect up-to-date checks
  • [#13532] - JDK 15 support in Gradle
  • [#13530] - Update integration tests using Jetty to run on JDK15
  • [#13529] - Jacoco JDK15 support
  • [#13513] - Review how TestKit directories are watched
  • [#13427] - Disable file system watching when there is a change to Ant default excludes
  • [#13234] - Verify correct usage of FileTimeStampInspector when file-system watching is enabled
  • [#12513] - Use the Java API compiler when possible
  • [#12354] - Attribute "without_test_code" is missing in .classpath file for project references
  • [#12135] - Support `SUBST` or disable its use with file watching
  • [#12073] - Test filters hide underlying issues during test task execution
  • [#11853] - Add test for continuous build with VFS retention enabled
  • [#8431] - Tooling API on JDK11 can not connect to Gradle project 4.5
  • [#6846] - Feature? dependency lock missing skippedDependencies Property
  • [#3768] - Composite artifact can't be resolved in buildSrc
  • [#3493] - Maven2Gradle conversion support targeting Kotlin DSL
  • [#2202] - Detect local Java installations
  • [#14548] - Java toolchain detection should work on macos when no system VM installed
  • [#14529] - Artifact transforms with dependencies fail when project substitutes external one
  • [#14522] - Samples use nightly build instead of RC
  • [#14516] - 6.7-rc-1: build fails with Cannot acquire state lock for project
  • [#14504] - Property auto-detect used at configuration time when using toolchain with auto-download=false
  • [#14699] - Service creation is too eager
  • [#14698] - Javadoc and toolchain: task is up-to-date when toolchain changes
  • [#14770] - `Problems reading data from Binary store` with intra-project dependency and capability resolution strategy
  • [#14737] - Incremental annotation processing can fail when forking with Java 8
  • [#14808] - Incremental compilation wipes out aggregating processor file in Gradle 6.7

New in Gradle 6.8 M1 (Oct 13, 2020)

  • Performance improvements:
  • Kotlin DSL script compilation is faster and consumes less memory:
  • In this release, the compilation of Gradle Kotlin DSL scripts (*.gradle.kts) is faster and consumes less memory.
  • On a sample medium-sized build, the cumulative script compilation time goes from ~50 seconds down to ~21 seconds with cold caches and cold daemons. This improvement also reduces memory pressure. Garbage collection time goes from 2.6 seconds down to 1.3 seconds.
  • While the impact on your build may vary, most builds can expect a noticeably shorter feedback loop when editing Kotlin DSL build logic thanks to this improvement.
  • Compilation avoidance for Kotlin DSL scripts:
  • Until now, any changes to build logic in buildSrc required all the build scripts in the project to be recompiled.
  • This release introduces compilation avoidance for Gradle Kotlin DSL scripts. This feature will cause the scripts to be recompiled only if a change to shared build logic impacts the ABI (application binary interface) of the resulting artifact. In simpler terms, changes to private implementation details of build logic, such as private methods or classes, bodies of non-private methods or classes, as well as internal changes to precompiled script plugins such as configuration of tasks will no longer trigger recompilation of the project's build scripts.
  • On a sample build with 100 subprojects, full recompilation of build scripts caused by a change in buildSrc can take ~20 seconds. A non-ABI change can eliminate build script recompilation altogether now, saving those 20 seconds.
  • While changes to buildSrc immediately affect the classpath of all the scripts, this improvement is more general and applies to changes in any jar on the scripts classpath that can be added by a plugin applied from an included build or added directly via buildscript {} block.
  • Configuration cache improvements:
  • Supported core plugins
  • In this release a number of core Gradle plugins got improved to support the configuration cache:
  • checkstyle
  • pmd
  • codenarc
  • jacoco
  • See the matrix of supported core plugins in the user manual.
  • Security Improvements:
  • Outdated TLS versions are no longer enabled by default:
  • This version of Gradle removes TLS protocols v1.0 and v1.1 from the default list of allowed protocols. Gradle will no longer fallback to TLS v1.0 or v1.1 by default when resolving dependencies. Only TLS v1.2 or TLS v1.3 are allowed by default.
  • These TLS versions can be re-enabled by manually specifying the system property https.protocols with a comma separated list of protocols required by your build.
  • The vast majority of builds should not need to change in any way. Maven Central and JCenter/Bintray dropped support for TLS v1.0 and TLS v1.1 two years ago. Java has had TLS v1.2+ available for several years. Disabling these protocols in Gradle protects builds from downgrade attacks.
  • Depending on the version of Java you use, Gradle will negotiate TLS v1.2 or TLS v1.3 when communicating with remote repositories.
  • Note: Early versions of JDK 11 & JDK 12 contained race condition bug in the TLSv1.3 handling logic which causes the exception javax.net.ssl.SSLException: No PSK available. Unable to resume. If you run into this issue, we recommend updating to the latest minor JDK version.
  • IDE integration:
  • Importing projects with custom source sets into Eclipse
  • This version of Gradle fixes problems with projects that use custom source sets, like additional functional test source sets.
  • Custom source sets are now imported into Eclipse automatically and no longer require manual configuration in the build.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Fixed issues
  • Unable to retrieve the issue information. You may not be connected to the Internet, or there may have been an error.

New in Gradle 6.8-20200930121325 Nightly (Sep 30, 2020)

  • Performance improvements:
  • Kotlin DSL script compilation is faster and consumes less memory
  • In this release, the compilation of Gradle Kotlin DSL scripts (*.gradle.kts) is faster and consumes less memory.
  • On a sample medium-sized build, the cumulative script compilation time goes from ~50 seconds down to ~21 seconds with cold caches and cold daemons. This improvement also reduces memory pressure. Garbage collection time goes from 2.6 seconds down to 1.3 seconds.
  • While the impact on your build may vary, most builds can expect a noticeably shorter feedback loop when editing Kotlin DSL build logic thanks to this improvement.
  • Security Improvements:
  • Outdated TLS versions are no longer enabled by default
  • This version of Gradle removes TLS protocols v1.0 and v1.1 from the default list of allowed protocols. Gradle will no longer fallback to TLS v1.0 or v1.1 by default when resolving dependencies. Only TLS v1.2 or TLS v1.3 are allowed by default.
  • These TLS versions can be re-enabled by manually specifying the system property https.protocols with a comma separated list of protocols required by your build.
  • The vast majority of builds should not need to change in any way. Maven Central and JCenter/Bintray dropped support for TLS v1.0 and TLS v1.1 two years ago. Java has had TLS v1.2+ available for several years. Disabling these protocols in Gradle protects builds from downgrade attacks.
  • Depending on the version of Java you use, Gradle will negotiate TLS v1.2 or TLS v1.3 when communicating with remote repositories.
  • Note: Early versions of JDK 11 & JDK 12 contained race condition bug in the TLSv1.3 handling logic which causes the exception javax.net.ssl.SSLException: No PSK available. Unable to resume. If you run into this issue, we recommend updating to the latest minor JDK version.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Fixed issues:
  • Unable to retrieve the issue information. You may not be connected to the Internet, or there may have been an error.
  • Known issues:
  • Known issues are problems that were discovered post release that are directly related to changes made in this release.
  • Unable to retrieve the issue information. You may not be connected to the Internet, or there may have been an error.
  • External contributions:
  • We love getting contributions from the Gradle community. For information on contributing, please see gradle.org/contribute.

New in Gradle 6.7 RC2 (Sep 25, 2020)

  • This release continues on the series of performance improvements, particularly for incremental builds. File system watching introduced in Gradle 6.5 is now ready for production use. You can expect up to 20% build speed improvements in large projects after turning this feature on. Additionally, the experimental configuration cache has been improved to make troubleshooting easier for early adopters.
  • This release introduces Java toolchain support that makes it much easier to build JVM projects using a different version of Java than the one Gradle is running on. Starting with this release, Gradle itself can also run on Java 15.
  • New dependency management features in this release include support for compile only API dependencies, the ability to ignore selected dependencies in dependency locking and version ranges in repository content filtering.
  • This release also includes several general improvements including improved gradle init task, better documentation and new samples.

New in Gradle 6.7 RC1 (Sep 12, 2020)

  • Performance improvements:
  • File system watching is ready for production use:
  • In an incremental build, input and output files are checked to determine what needs to be rebuilt. This feature typically saves a lot of time; however, it adds some I/O overhead, which can be noticeable in large projects when not much has changed since the previous build.
  • Back in Gradle 6.5 we've introduced file-system watching as an experimental feature. When enabled, it allows Gradle to keep what it has learned about the file system in memory during and between builds instead of polling the file system on each build. This significantly reduces the amount of disk I/O needed to determine what has changed since the previous build.
  • This feature is now ready for production use and supported on Linux, Windows and macOS. You can enable it by adding the following to gradle.properties in the project root or in your Gradle user home
  • Configuration cache improvements:
  • Gradle 6.6 introduced configuration caching as an experimental feature. This release comes with usability and performance improvements for the configuration cache.
  • Early adopters of configuration cache can use the command line output and HTML report for troubleshooting. Previously, the configuration cache state was saved despite reported problems, which in some situations required manual cache invalidation. In this release, the configuration cache gets discarded when the build fails because of configuration cache problems. Note that you can still ignore known problems.
  • The problem report is also more helpful now. It reports the source of problems more accurately, pointing at the offending location in plugins and scripts in more cases.
  • Loading from the configuration cache is also faster and memory consumption during builds has been reduced, especially for Kotlin and Android builds.
  • New JVM ecosystem features:
  • Toolchain support for JVM projects:
  • By default, Gradle uses the same Java version for running Gradle itself and building JVM projects.
  • This is not always desirable. Building projects with different Java versions on different developer machines and CI servers may lead to unexpected issues. Additionally, you may want to build a project using a Java version that running Gradle is not compatible with.
  • Before this release, it required several steps to configure a different Java version for compilation, testing, generating Javadoc, and executing applications.
  • This release introduces the toolchain concept to simplify such a setup. A Java toolchain is a set of tools (javac compiler,java command etc), taken from a local Java installation and used during the build. Instead of manually specifying executables for the various tasks, toolchains provide a centralized place to define the Java version requirements in the build.
  • Setting up a toolchain can be done through the java extensions:
  • java {
  • toolchain {
  • languageVersion = JavaLanguageVersion.of(14)
  • The snippet above makes Gradle use javac, java and javadoc commands from the specified toolchain for compilation, running tests, and generating documentation. Gradle will detect locally installed Java versions to run the build according to the specified requirements.
  • By default, Gradle supports common installation locations on various operating systems as well as popular package managers like asdf-vm, jabba and SDKMAN!. If no matching Java version is available locally, it will download a matching JDK from AdoptOpenJDK.
  • Support for Java 15:
  • Gradle now supports running on and building with Java 15.
  • New dependency management features:
  • Compile-only API dependencies for JVM libraries:
  • When writing a Java (or Groovy/Kotlin/Scala) library, there are cases where you require dependencies at compilation time which are parts of the API of your library, but which should not be on the runtime classpath.
  • An example of such a dependency is an annotation library with annotations that are not used at runtime. These typically need to be available at compile time of the library's consumers when annotation processors inspect annotations of all classes. Another example is a dependency that is part of the runtime environment the library is expected to run on, but also provides types that are used in the public API of the library.
  • The Java Library Plugin now offers the compileOnlyApi configuration for this purpose. It effectively combines the major properties of the compileOnly configuration (dependency will not be on the runtime classpath) and the api (dependencies are visible for consumers at compile time).
  • Ignore dependencies in dependency lock state:
  • Dependency locking makes builds using dynamic versions deterministic.
  • When using dependency locking, you may want to use a different frequency of version upgrades for different types of dependencies. For example, you may want to explicitly control external dependencies upgrades with locking but use the latest version for internal dependencies on every build.
  • To enable such use case, this release allows you to specify ignored dependencies in the dependencyLocking extension:
  • dependencyLocking {
  • ignoredDependencies.add("com.example:*")
  • With the above, any dependency in the com.example group will be ignored by the lock state validation or writing. This means that the dependencies in this group will be automatically updated without updating the lock file.
  • Version ranges in repository content filtering:
  • Builds can control which repositories are queried for which dependency for better performance and security using repository content filtering. This feature provides performance and security benefits.
  • With this release, when including or excluding a specific dependency version, the build author can use a version range:
  • repositories {
  • maven {
  • url = 'http://some-url'
  • content {
  • excludeVersion('com.google.guava', 'guava', '[19.0,)')
  • In this case, no guava version after 19.0 will be searched for in the referenced Maven repository.
  • Other new features and usability improvements:
  • Abbreviation of kebab-case project names:
  • Gradle allows you to abbreviate project and task names from the command-line. For example, you can execute the task compileTestJava by running gradle cTJ.
  • Up until this release, fuzzy name matching only worked for camelCase names (e.g. compileTestJava). This is the recommended convention for task names, but it is unusual for project names. In the Java world, directory names are usually all lowercase by convention and in Gradle, project names usually follow the name of the directory the project is in.
  • Many projects worked around this limitation by using kebab-case project directories (e.g. my-awesome-lib) while defining different camelCase project names in their settings scripts. This allowed them to use project name abbreviations in the command line but added additional complexity to the build.
  • This release changes the fuzzy name matching to support for kebab-case names. Now, you can execute the compileTestJava task in the project my-awesome-lib with the following command:
  • gradle mAL:cT
  • Bootstrapping new projects with gradle init:
  • The built-in init task can be used to quickly create a new Gradle build or convert a Maven build to a Gradle build.
  • In this release, the projects generated by gradle init have been updated to use the latest recommended build authoring practices. Some of the generated builds demonstrate the use of buildSrc for sharing common build logic.
  • For new projects, you can now generate a multi-project build for JVM languages. In order to generate a multi-project build, choose application, select one of the JVM languages and then choose application and library projects
  • Select type of project to generate:
  • 1: basic
  • 2: application
  • 3: library
  • 4: Gradle plugin
  • Enter selection (default: basic) [1..4] 2
  • Select implementation language:
  • 1: C++
  • 2: Groovy
  • 3: Java
  • 4: Kotlin
  • 5: Scala
  • 6: Swift
  • Enter selection (default: Java) [1..6] 3
  • Split functionality across multiple subprojects?:
  • 1: no - only one application project
  • 2: yes - application and library projects
  • Enter selection [1..2] 2
  • For Maven-to-Gradle conversion, this release adds support for generating Kotlin DSL scripts.
  • Included builds are now visible to buildSrc:
  • We recommend that builds use the specially named buildSrc build to organize imperative and common build logic.
  • Sometimes, you may also need to share build logic between buildSrc itself and your root build. In the previous releases, that was not possible because buildSrc could not access build logic from other included builds.
  • Documentation improvements:
  • New samples:
  • The sample index includes new samples, with step-by-step instructions on how to get started with Gradle for different project types and programming languages:
  • Building an application with libraries: Java, Groovy, Scala, Kotlin
  • Building a simple application: Java, Groovy, Scala, Kotlin, C++, Swift
  • Building a single library: Java, Groovy, Scala, Kotlin, C++, Swift
  • Authoring multi-project builds:
  • We've reworked our documentation for authoring multi-project builds that now includes the new guidance on how to share build logic between subprojects with convention plugins.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • File system watching is now stable
  • Fixed issues:
  • 61 issues have been fixed in Gradle 6.7.
  • [#13278] - Make <feature>RuntimeElements extend <feature>RuntimeOnly
  • [#14389] - Only log file events that cause a change in the virtual file system
  • [#14388] - Introduce file system watching debug flag
  • [#14361] - Improve verbose VFS logging
  • [#14339] - Update InProcessGradleExecuterIntegrationTest for file system watching
  • [#14338] - Remove ToBeFixedForFileSystemWatching annotation
  • [#14336] - Allow repository definition by configuration
  • [#14305] - Add single/multi-project choice to 'gradle init --type application'
  • [#14299] - Add 'compileOnlyApi' configuration to java-library projects
  • [#14287] - TestNGTestFramework makes the Test Retry plugin incompatible with config cache
  • [#14185] - Add switch to enable verbose logging for VFS
  • [#14172] - Dependency resolution selector cache not specific enough for virtual platform edges
  • [#14168] - Scala compilation of protobuf generated code is broken because zinc leaks protobuf-java to compile classpath
  • [#14160] - Let user configure JavaCompile with source/target/release independant of a toolchain
  • [#14158] - Performance bottleneck for large projects when file system watching is enabled
  • [#14139] - Let `Javadoc` task accept a toolchain
  • [#14129] - Remove incubating message about watching the file system
  • [#14128] - Drop "unsafe" from file system watching-related property names
  • [#14114] - Allow configuring the maximum number of watched hierarchies
  • [#14084] - Change 'gradle init' to generate multi-projects
  • [#14080] - Provide API to query for toolchains
  • [#14060] - Extend name matching section in user guide
  • [#14041] - RepositoryContentDescriptor should support include/exclude version ranges
  • [#14024] - Verify project naming convention consistency
  • [#14022] - Make use of kebab case name matching in gradle/gradle
  • [#14005] - Precompiled script plugins - `GradleProperties has not been loaded yet.`
  • [#13998] - Let `JavaExec` task accept a toolchain
  • [#13990] - build events generated by tooling api are wrong when OperationCompletionListener is used
  • [#13988] - Make fuzzy matching work with kebab-case project naming
  • [#13983] - Use composition instead of inheritance to separate BuildOperationRunner from BuildOperatoinExecutor
  • [#13966] - Configuration caching uses stale provider value
  • [#13965] - Configuration caching querying task outputs too early
  • [#13892] - Toolchain is matched deterministically
  • [#13890] - Download toolchains on demand
  • [#13886] - Use Kotlin source in Santa Tracker Kotlin Android performance tests
  • [#13871] - Detect common Java installation locations
  • [#13868] - Let `Test` task accept a toolchain
  • [#13867] - Ability to configure toolchain requirements for a build
  • [#13855] - Deprecate `JavaApplication#setMainClassName` in favour of property
  • [#13838] - Enable partial VFS invalidation by default
  • [#13837] - Move excessive logging around VFS to build operations
  • [#13835] - Explain memory leak-like slowdown when FSW is enabled on Gradle build
  • [#13656] - Gradle 6.5 pulls in optional dependency
  • [#13628] - Gradle 6.5 build fails on Java 15-ea with Execution failed for task ':jar'. java.util.ConcurrentModificationException (no error message)
  • [#13596] - Memory inefficiency in ConsumerVariantMatchResult for very large project.
  • [#13554] - Pre-existing empty output directory may cause incorrect up-to-date checks
  • [#13532] - JDK 15 support in Gradle
  • [#13530] - Update integration tests using Jetty to run on JDK15
  • [#13529] - Jacoco JDK15 support
  • [#13513] - Review how TestKit directories are watched
  • [#13427] - Disable file system watching when there is a change to Ant default excludes
  • [#13234] - Verify correct usage of FileTimeStampInspector when file-system watching is enabled
  • [#12513] - Use the Java API compiler when possible
  • [#12354] - Attribute "without_test_code" is missing in .classpath file for project references
  • [#12135] - Support `SUBST` or disable its use with file watching
  • [#12073] - Test filters hide underlying issues during test task execution
  • [#11853] - Add test for continuous build with VFS retention enabled
  • [#8431] - Tooling API on JDK11 can not connect to Gradle project 4.5
  • [#6846] - Feature? dependency lock missing skippedDependencies Property
  • [#3493] - Maven2Gradle conversion support targeting Kotlin DSL
  • [#2202] - Detect local Java installations
  • In this release, it's now possible to share build logic between buildSrc and the root build or any other included build. This makes it easier to share common repository declarations or conventions between buildSrc and other builds as demonstrated in this sample.

New in Gradle 6.6.1 (Sep 9, 2020)

  • Broken incremental annotation processing when previous build was incremental
  • DefaultConfigurableFileCollection.setFrom with empty arguments
  • Fix outgoing edge reference counting
  • Classpath not correct with platform bom
  • Fix incremental annotation processing

New in Gradle 6.6 (Aug 11, 2020)

  • Performance improvements:
  • Fast feedback for local incremental builds is crucial for developer productivity. This is especially true when your IDE uses Gradle to build and run tests for your project, which IntelliJ IDEA does by default. This scenario has been the primary focus of performance improvements since Gradle 6.5 and will continue for the next several Gradle releases.
  • Configuration caching
  • Before running any task, Gradle needs to run the configuration phase. Currently, this is done on every build invocation and can incur a noticeable overhead, especially in large projects.
  • The configuration cache significantly improves build performance by caching the result of the configuration phase and reusing it for subsequent builds. Using the configuration cache, Gradle can skip the configuration phase entirely when nothing that affects the build configuration has changed as you can see below.
  • Additionally, Gradle is able to optimize task execution when configuration caching is enabled and execute more tasks in parallel by default.
  • Note that configuration caching is different from the build cache, which caches outputs produced by the build. The configuration cache captures only the state of the configuration phase.
  • IDE sync and import does not currently benefit from configuration caching.
  • This feature is considered highly experimental and not enabled by default or recommended for production use. Tasks and plugins usually require changes to meet the requirements to use configuration caching. Not all core Gradle plugins have been updated yet and some features are not yet implemented. Your build may likely require changes.
  • You can enable this experimental feature by supplying the parameter --configuration-cache on the command-line or adding it to your run configuration. If your build is incompatible with configuration caching, Gradle will generate a report describing the problems found.
  • Learn more about this new feature and its impact in the Configuration Cache documentation.
  • Stability improvements of file-system watching
  • Gradle 6.5 introduced an experimental opt-in that improves the performance of local incremental builds by watching for file-system changes.
  • This release brings a number of stability improvements for file-system watching when used with composite builds or large projects on Windows and macOS. Gradle will now report better errors when you enable file-system watching on unsupported systems.
  • Improved cache hits with normalized runtime classpaths
  • For up-to-date checks and the build cache, Gradle needs to determine if two task input properties have the same value. In order to do so, Gradle first normalizes both inputs and then compares the result.
  • Runtime classpath analysis now inspects manifest and META-INF properties files, ignoring changes to comments, whitespace and order-differences. Moreover, you can selectively ignore attributes or properties that don't impact the runtime classpath.
  • normalization {
  • runtimeClasspath {
  • metaInf {
  • ignoreAttribute("Implementation-Version")
  • ignoreProperty("timestamp")
  • This improves the likelihood of build cache hits when any ZIP file on the classpath is regenerated and only differs by unimportant values or comments. The most common case where this sort of normalization can be useful is with JAR files, but it can be applied to any ZIP file on the classpath--such as AAR, WAR, or APK files.
  • See the user manual for further information. Note that this API is incubating and will likely change in future releases as support is expanded for normalizing properties files outside of the META-INF directory.
  • New features and usability improvements:
  • Conventions for handling user-provided credentials
  • Builds sometimes require users to supply credentials. For example, credentials might be required to authenticate with an artifact repository in order to publish an artifact. It's a good practice to keep credentials outside the build script.
  • This release includes a new API for credentials that makes working with credentials easier by establishing a convention to supply credentials using Gradle properties that can be provided to the build as command-line arguments, environment variables, or as values in a gradle.properties file. It also introduces fail-fast behavior when Gradle knows that the build will need credentials at some point and the credentials are missing.
  • Starting from this release, you can easily externalize credentials used for authentication to an artifact repository:
  • repositories {
  • maven {
  • name = 'mySecureRepository'
  • credentials(PasswordCredentials)
  • // url = uri(<<some repository url>>)
  • The credentials for mySecureRepository will be searched for in Gradle properties with the names mySecureRepositoryUsername and mySecureRepositoryPassword.
  • For more details on using the new API to authenticate with artifact repositories, see the user manual section as well as an updated sample.
  • You can also use the new provider API directly to supply credentials to an external tool:
  • tasks.register('login', Exec) {
  • def loginProvider =
  • providers.credentials(PasswordCredentials, 'login')
  • inputs.property('credentials', loginProvider)
  • doFirst {
  • PasswordCredentials loginCredentials = loginProvider.get()
  • // use credentials
  • The credentials for the above will be searched for in Gradle properties with the names loginUsername and loginPassword.
  • See the updated sample for more details.
  • Support for the --release flag in Java compilation
  • Java 9 introduced cross compilation support with the --release flag on the Java compiler. This option tells the compiler to produce bytecode for an earlier version of Java and guarantees that the code does not use any APIs from later versions.
  • In previous Gradle versions, it could be achieved through the use of compilerArgs and making sure that sourceCompatibility and targetCompatibility are not set:
  • compileJava {
  • options.compilerArgs.addAll(['--release', '7'])
  • With this release, Gradle makes this use case easier by supporting the --release flag for Java compilation directly on the CompileOptions of JavaCompile tasks:
  • compileJava {
  • options.release = 7
  • See the section on cross compilation for details.
  • Dependency management improvements
  • Reproducible Gradle Module Metadata
  • Gradle Module Metadata is a format used to serialize the Gradle component model, similar to but more powerful than Maven’s POM.
  • By default, the Gradle Module Metadata file contains a build identifier field which defaults to a unique ID generated during build execution. This behaviour can now be disabled at the publication level, allowing users to opt-in for a reproducible Gradle Module Metadata file. This enables downstream tasks to consider it up-to-date, resulting in faster and reproducible builds.
  • main(MavenPublication) {
  • from components.java
  • withoutBuildIdentifier()
  • See the documentation for more information on Gradle Module Metadata generation.
  • Variant-aware dependency substitution rules
  • It’s a common problem in dependency management that the same dependency can appear in a dependency graph but with different attributes. For example, you want to only use the “fat jar” with repackaged dependencies, but the regular jar is pulled in transitively. The far jar may be published under a "fat jar" classifier, while the regular jar has no classifier.
  • Previously, it wasn't possible for Gradle to substitute a dependency using a classifier with a dependency without a classifier, nor was it possible to substitute a dependency without classifier with a dependency with a classifier.
  • Similarly, other attributes (typically "platform" dependencies) or capabilities could not be used when describing dependency substitutions.
  • Gradle now supports declaring substitutions based on classifiers, attributes, or capabilities. Gradle's dependency substitution API has been enriched to cover those cases.
  • See the documentation on variant-aware substitution for details.
  • Improvements for plugin authors:
  • Injectable ArchiveOperations service
  • Previously, it was only possible to create a FileTree for a ZIP or TAR archive by using the APIs provided by a Project.
  • However, a Project object is not always available, for example in worker actions or when using the configuration cache.
  • The new ArchiveOperations service has zipTree() and tarTree() methods for creating read-only FileTree instances respectively for ZIP and TAR archives.
  • See the user manual for how to inject services and the ArchiveOperations API documentation for more details and examples.
  • Combining two providers
  • When using Lazy Properties, it’s common to compute a value by combining the values of two providers. In previous Gradle releases, it wasn’t possible to do this without eagerly reading one of the provider values or losing dependency information. Gradle 6.6 introduces a zip method which lets you provide the combined value lazily.:
  • def hello = objects.property(String).convention("Hello")
  • def world = objects.property(String).convention("World")
  • def helloWorld = hello.zip(world) { left, right ->
  • "${left}, ${right}!".toString()
  • // ...
  • hello.set("Bonjour")
  • world.set("le monde")
  • println(helloWorld.get()) // prints “Bonjour, le monde!”
  • Refer to the API documentation for details.
  • Security improvements:
  • Removed debug logging of environment variables
  • Debug level logging may expose sensitive information in the build log output, for example in CI server logs. For this reason, Gradle displays a prominent warning when using debug level logging since version 6.4. One example of this risk is leaking secret values such as credentials stored in environmental variables.
  • Previously, when debug level was enabled, Gradle used to log all environment variables when starting a process such as a test, Gradle daemon, or when using Project.exec. In practice, this means most of the builds logged environment variables on debug level.
  • As an additional security precaution, Gradle no longer logs environment variables when starting processes starting with this version.
  • Note that many CI servers, like Jenkins and Teamcity, mask secrets in the captured logs. Still, we recommend limiting the usage of debug level logging to environments which do not capture the log output, like your local machine. Build scans never capture the debug log as part of the console log even when you enabled debug logging.
  • As an additional measure, you may want to limit the environment variables passed to the test task or other forked processes by explicitly using ProcessForkOptions.setEnvironment(). This way the forked processes themselves cannot leak secrets from the environment, since they don't have them available anymore.
  • Fixed issues:
  • 51 issues have been fixed in Gradle 6.6.
  • [#13943] - Runtime classpath normalization should apply to zips and to nested zips in classes directories
  • [#13745] - Stackoverflow visiting file collections referencing themselves
  • [#13652] - System.getProperty(...) with null default value triggers NPE
  • [#13639] - java.lang.RuntimeException: Problems reading data from Binary store
  • [#13508] - Configuration cache should support dynamic and changing dependencies
  • [#13507] - Configuration cache should support dependency locking
  • [#13471] - Make `java-gradle-plugin` plugin support the configuration cache
  • [#13467] - Make `ear` plugin support the configuration cache
  • [#13466] - Make `war` plugin support the configuration cache
  • [#13465] - Make `java-library-distribution` plugin support the configuration cache
  • [#13464] - Make `distribution` plugin support the configuration cache
  • [#13463] - Make `application` plugin support the configuration cache
  • [#13459] - Make `java-platform` plugin support the configuration cache
  • [#13458] - Make `java-library` plugin support the configuration cache
  • [#13457] - Make `java` plugin support the configuration cache
  • [#13417] - [6.6-milestone-1] Gradle wrapper task throws NumberFormatException with OpenJDK 15
  • [#13396] - Exception stacktrace shown upon startup when file-system watching is enabled on certain older Linux distributions
  • [#13392] - Missing classes with Scala incremental compilation
  • [#13382] - Kotlin compiler daemon keeps disappearing with file-system watching enabled on macOS
  • [#13369] - compileKotlin task has unstable task inputs with precompiled `.gradle.kts` scripts
  • [#13320] - CL code snippets are broken in Gradle docs
  • [#13309] - Make sure file system watching is enabled consistently during a build
  • [#13277] - Make Project.zipTree() and Project.tarTree() available via injected services
  • [#13245] - Configuration cache can fail when artifact transform is chained and takes artifact dependencies as a parameter
  • [#13224] - Broken non-incremental compilation with Scala
  • [#13218] - Watch root directories of included builds
  • [#13200] - Artifact collection contains different results when loaded from configuration cache
  • [#13154] - Rename "VFS retention" to "file-system watching" in public types and messages
  • [#13136] - Investigate what files are watched outside of the root directory
  • [#13135] - JVM crash with file-system watching enabled on Windows
  • [#13096] - java14 helpful NPEs not working in test
  • [#13038] - exclusiveContent API fails with "Cannot mutate content repository descriptor..."
  • [#12631] - incorrect docs for how to disable scala incremental compilation
  • [#12209] - Stop watching caches in Gradle user home and in the `$rootDir/.gradle` directory
  • [#11717] - Allow GenerateModuleMetadata and GenerateMavenPom to be reproducible
  • [#11693] - Make up-to-date checks for :kotlinCompilerEmbeddable:unpackPatchedKotlinCompilerEmbeddable faster
  • [#11504] - Give user information about increasing inotify watch count when needed
  • [#10172] - Configuration cache property serialization should consider custom writeObject/readObject methods
  • [#8264] - Gradle 5.1.1 does not retry connection resets
  • [#7594] - POM dependency with `<type>` bypasses variant-aware resolution, even when conflict-resolved with project dependency
  • [#5174] - Dependency substitution is broken for those with <type> attributes in POM files
  • [#3880] - Dependency substitution rules
  • [#2510] - Add property for setting the `--release` compiler argument
  • [#13816] - Buildscript dependencies have bad handling of pom files
  • [#13811] - local projects dependencies no longer work in gradle 6.6-rc-1
  • [#13808] - Java plugin can overwrite the classpath of Test tasks added by other plugins
  • [#13770] - 6.6RC1: error message for missing credentials is duplicated
  • [#14008] - Causes of custom AssertionErrors should be preserved
  • [#13985] - ClassDirectories property of `JacocoReport` is annotated with @Classpath
  • [#13325] - Instrumentation causes a duplicate method and a `ClassFormatError` at runtime
  • [#9487] - Suppressed exceptions thrown by tests are not captured in the test report and build scan

New in Gradle 6.6 RC 6 (Aug 5, 2020)

  • This fixes regressions reported against 6.6-rc-5 or earlier.

New in Gradle 6.6 RC 5 (Aug 3, 2020)

  • This fixes regressions reported against 6.6-rc-4.

New in Gradle 6.6 RC 4 (Jul 30, 2020)

  • This fixes regressions reported against 6.6-rc-3.

New in Gradle 6.6 RC 3 (Jul 24, 2020)

  • This fixes regressions reported against 6.6-rc-2.

New in Gradle 6.6 RC 2 (Jul 20, 2020)

  • This fixes regressions reported against 6.6-rc-1.

New in Gradle 6.6 RC 1 (Jul 13, 2020)

  • Fixed issues:
  • [#13745] - Stackoverflow visiting file collections referencing themselves
  • [#13652] - System.getProperty(...) with null default value triggers NPE
  • [#13639] - java.lang.RuntimeException: Problems reading data from Binary store
  • [#13508] - Configuration cache should support dynamic and changing dependencies
  • [#13507] - Configuration cache should support dependency locking
  • [#13471] - Make `java-gradle-plugin` plugin support the configuration cache
  • [#13467] - Make `ear` plugin support the configuration cache
  • [#13466] - Make `war` plugin support the configuration cache
  • [#13465] - Make `java-library-distribution` plugin support the configuration cache
  • [#13464] - Make `distribution` plugin support the configuration cache
  • [#13463] - Make `application` plugin support the configuration cache
  • [#13459] - Make `java-platform` plugin support the configuration cache
  • [#13458] - Make `java-library` plugin support the configuration cache
  • [#13457] - Make `java` plugin support the configuration cache
  • [#13417] - [6.6-milestone-1] Gradle wrapper task throws NumberFormatException with OpenJDK 15
  • [#13396] - Exception stacktrace shown upon startup when file-system watching is enabled on certain older Linux distributions
  • [#13392] - Missing classes with Scala incremental compilation
  • [#13382] - Kotlin compiler daemon keeps disappearing with file-system watching enabled on macOS
  • [#13369] - compileKotlin task has unstable task inputs with precompiled `.gradle.kts` scripts
  • [#13320] - CL code snippets are broken in Gradle docs
  • [#13309] - Make sure file system watching is enabled consistently during a build
  • [#13277] - Make Project.zipTree() and Project.tarTree() available via injected services
  • [#13245] - Configuration cache can fail when artifact transform is chained and takes artifact dependencies as a parameter
  • [#13224] - Broken non-incremental compilation with Scala
  • [#13218] - Watch root directories of included builds
  • [#13200] - Artifact collection contains different results when loaded from configuration cache
  • [#13154] - Rename "VFS retention" to "file-system watching" in public types and messages
  • [#13136] - Investigate what files are watched outside of the root directory
  • [#13135] - JVM crash with file-system watching enabled on Windows
  • [#13096] - java14 helpful NPEs not working in test
  • [#13038] - exclusiveContent API fails with "Cannot mutate content repository descriptor..."
  • [#12631] - incorrect docs for how to disable scala incremental compilation
  • [#12209] - Stop watching caches in Gradle user home and in the `$rootDir/.gradle` directory
  • [#11693] - Make up-to-date checks for :kotlinCompilerEmbeddable:unpackPatchedKotlinCompilerEmbeddable faster
  • [#11504] - Give user information about increasing inotify watch count when needed
  • [#10172] - Configuration cache property serialization should consider custom writeObject/readObject methods
  • [#8264] - Gradle 5.1.1 does not retry connection resets
  • [#7594] - POM dependency with `<type>` bypasses variant-aware resolution, even when conflict-resolved with project dependency
  • [#5174] - Dependency substitution is broken for those with <type> attributes in POM files
  • [#3880] - Dependency substitution rules
  • [#2510] - Add property for setting the `--release` compiler argument

New in Gradle 6.5.1 (Jun 30, 2020)

  • This fixes several critical bugs in Gradle 6.5:
  • Regression: Gradle 6.5 cached builds cause IllegalStateException #13367
  • Regression: Compile classpath configuration is not deterministic #13555
  • Regression: Class cast exception when GStrings are used with System.getProperty #13569
  • And a number of dependency graph resolution errors (#13251, #13316, #13329, #13551)

New in Gradle 6.4.1 (May 16, 2020)

  • Building, testing and running Java Modules:
  • With this release, Gradle supports the Java Module System with everything you need to compile and execute tests for Java modules. You can also build Javadoc and run applications.
  • While there is some overlap with Gradle's dependency management features, Java Modules offer additional features like module boundaries that are enforced by the Java runtime.
  • The only thing you need to configure is module path inference for the Java plugins:
  • java {
  • modularity.inferModulePath.set(true)
  • Then you just need to make sure that you write a proper Java module by providing a module-info.java descriptor as part of your sources:
  • src
  • +-- main
  • +-- java
  • +-- module-info.java
  • For more details, head over to the documentation on building modules, building modular applications and testing modules.
  • Also feel free to explore the samples.
  • Precompiled Groovy DSL script plugins:
  • Script plugins are a convenient way to split up and organize a long build script, but they have some limitations and quirks. Kotlin DSL introduced precompiled script plugins that look like regular build scripts but have all of the advantages of binary plugins. They can:
  • be published to a private repository or the Plugin Portal,
  • be tested using TestKit,
  • be applied using the plugins {} block,
  • use the plugins {} block to apply other plugins.
  • Gradle now allows precompiled script plugins to be written using the Groovy DSL in addition to the Kotlin DSL.
  • For example, a Gradle script in buildSrc/src/main/groovy/my-plugin.gradle can be used as a plugin in the main project as plugins { id 'my-plugin' }.
  • Precompiled script plugins are covered in more depth in the user manual. There is also a sample available that demonstrates the feature in action.
  • Single dependency lock file per project:
  • Dependency locking is a mechanism for creating reproducible builds even when using dynamic dependency versions. This release adds an improved dependency locking file format that results in fewer lock files in most projects that use this feature. In addition, when using this format, the lock file name and location can be configured.
  • This format will become the default lock file format in Gradle 7.0. For now, it is required to opt-in to use it.
  • Take a look at the documentation for more information and how to enable the feature.
  • Better dependency variant matching error messages:
  • Gradle provides a powerful variant-aware dependency management engine.
  • This release introduces clearer variant matching error messages for the JVM ecosystem.
  • In previous releases, these error messages could be difficult to understand and sometimes lacked enough context to figure out what to do. Gradle 6.4 improves these error messages by making them more human-readable and introducing colors to the console to highlight problems.
  • Improvements to PMD code quality plugin:
  • Incremental analysis is enabled by default
  • As of Gradle 6.4, the PMD plugin uses incremental analysis by default. This can significantly reduce analysis time on subsequent builds.
  • For builds relying on a version of PMD older than 6.0.0, you will need to explicitly disable incremental analysis.
  • Specify number of violations required before the build fails
  • The PMD plugin now lets you set the number of violations before the build fails. This can make it easier to introduce PMD into existing projects that may initially have many violations.
  • If you wanted to fail the build if the number of violations is above 150, you can set maxFailures to 150.
  • pmd {
  • maxFailures = 150
  • This was contributed by Matthew Duggan.
  • Security warning about using DEBUG level logging
  • Potentially sensitive information is logged when Gradle is executed with debug level logging, such as sensitive credentials, authentication tokens or internal repository URLs. Much of this logging occurs deep in components of the JVM and other libraries outside the control of Gradle. While debugging, this information may be inherently useful. However, this information can be unintentionally exposed when Gradle builds are executed on Continuous Integration services where build logs are publicly-accessible. See the recent update about the fixed Plugin Portal vulnerability for an example of this security risk.
  • Gradle now warns users about the risks of using DEBUG level logging.
  • We recommend plugin maintainers avoid logging sensitive information if possible, and if it's not possible, that all sensitive information be logged exclusively at the DEBUG log level.
  • Fixed issues:
  • 2 issues have been fixed in Gradle 6.4.1.
  • [#13069] - Regression: Different daemons are used between IDE and CLI builds for the same project
  • [#13057] - Regression: Main-Class attribute always added to jar manifest when using application plugin

New in Gradle 6.5 M2 RC (May 15, 2020)

  • Improvements for tooling providers
  • Tooling API clients can now use a new method from GradleConnector to asynchronously cancel all Tooling API connections without waiting for the current build to finish.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Fixed issues:
  • Unable to retrieve the issue information. You may not be connected to the Internet, or there may have been an error.

New in Gradle 6.4 (May 5, 2020)

  • [#12828] - Mapping of Ivy files to variants should handle configuration level excludes
  • [#12776] - Upgrade to native platform milestone for 6.4
  • [#12768] - Investigate timeouts with file watching enabled
  • [#12712] - Rename 'modularClasspathHandling' properties to 'modularity'
  • [#12661] - In version constraints, the order of `prefer X` vs `strict Y` matters
  • [#12658] - Perform module path derivation in Eclipse IDE sync
  • [#12636] - Potential deadlock when using the worker API and not using the Gradle daemon
  • [#12613] - Add module path support to CreateStartScripts tasks of application plugin
  • [#12605] - Add modular classpath handling configuration to Java extension
  • [#12603] - Document JPMS support
  • [#12488] - Build service installed via init script closes prematurely when `:buildSrc` sub-build is finished
  • [#12475] - Dependency ordering issue when upgrading to Guava 28.2-jre
  • [#12452] - exclusiveContent API does not work with Kotlin Gradle DSL
  • [#12447] - Configuring the Jar task's manifest gives an Incubating warning
  • [#12437] - Register watchers for newly added file locations during the build
  • [#12433] - Basic JPMS support for generating Javadoc
  • [#12428] - Basic JPMS support for executing Java modules
  • [#12427] - Basic JPMS support for testing Java modules
  • [#12339] - GenerateModuleMetadata writes wrong file names in case of customized artifact publications.
  • [#12258] - Basic JPMS support for compiling Java modules
  • [#11988] - File change not recognized by VFS on Windows when entire watched directory is removed
  • [#11881] - Improve the dependency lockfile format
  • [#11466] - StackOverflowError in ManagedPropertyName.getDisplayName()
  • [#10982] - Expose Repository MetadataSources
  • [#10685] - ScalaCompile task does not respect all JavaForkOptions configuration
  • [#8897] - java-library plugin makes impossible to have project dependency on Java9-modular kotlin project
  • [#8659] - Add a method to specify Scalac plugins in ScalaCompile without breaking build cache
  • [#6828] - [JPMS] Accessing resources when Java application run via JavaExec task
  • [#5639] - Lockfile location/filename should be customizable
  • [#3940] - Packaging test code in a separate JDK 9 module fails with IllegalArgumentException: superClassName is empty!
  • [#3618] - Java 9: Support Jigsaw modules in JavaExecAction
  • [#2720] - Running tests against JDK 9 module causes accessibility issues
  • [#2177] - Support setting Jigsaw module version in jar task
  • [#12860] - Gradle 6.4-rc-1 triggers compileJava when project version is changed in multi-module project
  • [#12843] - Cached component metadata rules leak memory
  • [#12834] - Gradle 6.4-rc-1 breaks bootRun
  • [#12833] - Traditional convention mappings do not work anymore for JavaExec.main
  • [#12832] - Stack overflow in Gradle 6.4-rc-1, regression from 6.3
  • [#12938] - Invalid equals breaks fix for cache memory leak
  • [#12973] - Single lock file changes on generation without external change
  • [#12969] - Potential race condition when task has a property whose value is derived from mapped dependency resolution results
  • [#12811] - Race condition when a `Property` instance is used by multiple tasks and has a value derived from a dependency resolution result

New in Gradle 6.4 RC 3 (Apr 29, 2020)

  • Fixed issues:
  • Mapping of Ivy files to variants should handle configuration level excludes
  • Upgrade to native platform milestone for 6.4
  • Investigate timeouts with file watching enabled
  • [Rename 'modularClasspathHandling' properties to 'modularity'
  • In version constraints, the order of `prefer X` vs `strict Y` matters
  • Perform module path derivation in Eclipse IDE sync
  • Potential deadlock when using the worker API and not using the Gradle daemon
  • Add module path support to CreateStartScripts tasks of application plugin
  • Add modular classpath handling configuration to Java extension
  • Document JPMS support
  • Build service installed via init script closes prematurely when `:buildSrc` sub-build is finished
  • Dependency ordering issue when upgrading to Guava 28.2-jre
  • ExclusiveContent API does not work with Kotlin Gradle DSL
  • Configuring the Jar task's manifest gives an Incubating warning
  • Register watchers for newly added file locations during the build
  • Basic JPMS support for generating Javadoc
  • Basic JPMS support for executing Java modules
  • Basic JPMS support for testing Java modules
  • GenerateModuleMetadata writes wrong file names in case of customized artifact publications.
  • Basic JPMS support for compiling Java modules
  • File change not recognized by VFS on Windows when entire watched directory is removed
  • Improve the dependency lockfile format
  • StackOverflowError in ManagedPropertyName.getDisplayName()
  • Expose Repository MetadataSources
  • ScalaCompile task does not respect all JavaForkOptions configuration
  • Java-library plugin makes impossible to have project dependency on Java9-modular kotlin project
  • Add a method to specify Scalac plugins in ScalaCompile without breaking build cache
  • [JPMS] Accessing resources when Java application run via JavaExec task
  • Lockfile location/filename should be customizable
  • Packaging test code in a separate JDK 9 module fails with IllegalArgumentException: superClassName is empty!
  • Java 9: Support Jigsaw modules in JavaExecAction
  • Running tests against JDK 9 module causes accessibility issues
  • Support setting Jigsaw module version in jar task
  • Gradle 6.4-rc-1 triggers compileJava when project version is changed in multi-module project
  • Cached component metadata rules leak memory
  • Gradle 6.4-rc-1 breaks bootRun
  • Raditional convention mappings do not work anymore for JavaExec.main
  • Stack overflow in Gradle 6.4-rc-1, regression from 6.3
  • Invalid equals breaks fix for cache memory leak
  • Race condition when a `Property` instance is used by multiple tasks and has a value derived from a dependency resolution result

New in Gradle 6.4 RC 1 (Apr 16, 2020)

  • Precompiled Groovy DSL script plugins:
  • Script plugins are a convenient way to split up and organize a long build script, but they have some limitations and quirks. Kotlin DSL introduced precompiled script plugins that look like regular build scripts but have all of the advantages of binary plugins. They can:
  • be published to a private repository or the Plugin Portal,
  • be tested using TestKit,
  • be applied using the plugins {} block,
  • use the plugins {} block to apply other plugins.
  • Gradle now allows precompiled script plugins to be written using the Groovy DSL in addition to the Kotlin DSL.
  • For example, a Gradle script in buildSrc/src/main/groovy/my-plugin.gradle can be used as a plugin in the main project as plugins { id 'my-plugin' }.
  • Precompiled script plugins are covered in more depth in the user manual. There is also a sample available that demonstrates the feature in action.
  • Single dependency lock file per project:
  • Dependency locking is a mechanism for creating reproducible builds even when using dynamic dependency versions. This release adds an improved dependency locking file format that results in fewer lock files in most projects that use this feature. In addition, when using this format, the lock file name and location can be configured.
  • This format will become the default lock file format in Gradle 7.0. For now, it is required to opt-in to use it.
  • Take a look at the documentation for more information and how to enable the feature.
  • Better dependency variant matching error messages
  • Gradle provides a powerful variant-aware dependency management engine.
  • This release introduces clearer variant matching error messages for the JVM ecosystem.
  • In previous releases, these error messages could be difficult to understand and sometimes lacked enough context to figure out what to do. Gradle 6.4 improves these error messages by making them more human-readable and introducing colors to the console to highlight problems.
  • Improvements to PMD code quality plugin
  • Incremental analysis is enabled by default
  • As of Gradle 6.4, the PMD plugin uses incremental analysis by default. This can significantly reduce analysis time on subsequent builds.
  • For builds relying on a version of PMD older than 6.0.0, you will need to explicitly disable incremental analysis.
  • Specify number of violations required before the build fails
  • The PMD plugin now lets you set the number of violations before the build fails. This can make it easier to introduce PMD into existing projects that may initially have many violations.
  • If you wanted to fail the build if the number of violations is above 150, you can set maxFailures to 150.
  • pmd {
  • maxFailures = 150
  • This was contributed by Matthew Duggan.
  • Security warning about using DEBUG level logging:
  • Potentially sensitive information is logged when Gradle is executed with debug level logging, such as sensitive credentials, authentication tokens or internal repository URLs. Much of this logging occurs deep in components of the JVM and other libraries outside the control of Gradle. While debugging, this information may be inherently useful. However, this information can be unintentionally exposed when Gradle builds are executed on Continuous Integration services where build logs are publicly-accessible. See the recent update about the fixed Plugin Portal vulnerability for an example of this security risk.
  • Gradle now warns users about the risks of using DEBUG level logging.
  • We recommend plugin maintainers avoid logging sensitive information if possible, and if it's not possible, that all sensitive information be logged exclusively at the DEBUG log level.
  • Fixed issues:
  • 32 issues have been fixed in Gradle 6.4:
  • Upgrade to native platform milestone for 6.4
  • Investigate timeouts with file watching enabled
  • Rename 'modularClasspathHandling' properties to 'modularity'
  • In version constraints, the order of `prefer X` vs `strict Y` matters
  • Perform module path derivation in Eclipse IDE sync
  • Potential deadlock when using the worker API and not using the Gradle daemon
  • Add module path support to CreateStartScripts tasks of application plugin
  • Add modular classpath handling configuration to Java extension
  • Document JPMS support
  • Build service installed via init script closes prematurely when `:buildSrc` sub-build is finished
  • Dependency ordering issue when upgrading to Guava 28.2-jre
  • exclusiveContent API does not work with Kotlin Gradle DSL
  • Configuring the Jar task's manifest gives an Incubating warning
  • Register watchers for newly added file locations during the build
  • Basic JPMS support for generating Javadoc
  • Basic JPMS support for executing Java modules
  • Basic JPMS support for testing Java modules
  • Basic JPMS support for compiling Java modules
  • File change not recognized by VFS on Windows when entire watched directory is removed
  • Improve the dependency lockfile format
  • StackOverflowError in ManagedPropertyName.getDisplayName()
  • Expose Repository MetadataSources
  • ScalaCompile task does not respect all JavaForkOptions configuration
  • java-library plugin makes impossible to have project dependency on Java9-modular kotlin project
  • Add a method to specify Scalac plugins in ScalaCompile without breaking build cache
  • [JPMS] Accessing resources when Java application run via JavaExec task
  • Lockfile location/filename should be customizable
  • Packaging test code in a separate JDK 9 module fails with IllegalArgumentException: superClassName is empty!
  • Java 9: Support Jigsaw modules in JavaExecAction
  • Running tests against JDK 9 module causes accessibility issues
  • Add property for setting the `--release` compiler argument
  • Support setting Jigsaw module version in jar task

New in Gradle 6.3 (Mar 25, 2020)

  • Improved error messages:
  • User-friendlier reporting of Gradle startup failures
  • Show location of Java fatal error log
  • Customizing location of native headers generated from Java source:
  • The Java native keyword allows declaring methods that are implemented in native languages such as C or C++. The Java compiler can then generate native headers that should be implemented. It is most commonly used with Java Native Interface (JNI).
  • In previous releases, it was possible to configure the header output directory but it had no default value, so you had to configure it if you wanted to use JNI. In this release, there is a default value for the compile task for each source set so you don’t need to any more. If you had a custom header location set before, it is advised to remove it and just use the default value.
  • Improvements for plugin authors:
  • Improvements for component metadata rules:
  • Every module that is pulled from a repository has metadata associated with it, such as its group, name, and version. Sometimes, this metadata can be incomplete or incorrect. To manipulate such incomplete metadata from within the build script, Gradle offers an API to write component metadata rules.
  • Fixed issues:
  • 33 issues have been fixed in Gradle 6.3.
  • [#12379] - Deprecate 'default' and 'archives' configurations for resolving and declaring dependencies
  • [#12345] - Show path of hs_err_pid file when daemon disappears
  • [#12305] - Update documentation to not point to samples or snippets in -all distribution
  • [#12301] - De-serialization of task graph incorrect for anonymous subtypes of enum.
  • [#12293] - Gradle crashes if GRADLE_RO_DEP_CACHE is set and it cannot create modules-2 directory within it
  • [#12270] - Checkstyle task can no longer be configured to analyse single files
  • [#12248] - Precompiled script plugin fails to build on Windows if script is saved with CRLF (accessors not resolved)
  • [#12219] - Daemon crashes for `ArtifactTransformInputArtifactIntegrationTest` with VFS retention enabled
  • [#12182] - C++ compilation doesn't pick up file changes when VFS retention is enabled
  • [#12169] - `GradleBuildTaskIntegrationTest.can run multiple GradleBuild tasks concurrently` fails with VFS retention
  • [#12146] - Deleting local state when loading from cache is not picked up with partial invalidation
  • [#12136] - Fix `PlayContinuousBuildReloadWaitingIntegrationTest` with VFS retention
  • [#12134] - The `clean` task does not report changes to VFS
  • [#12122] - Parsing gradle properties file with invalid syntax fails with unhelpful error message
  • [#12118] - Log individual input file fingerprints
  • [#12117] - Allow war task to be made cacheable with runtime api
  • [#12091] - com.fasterxml.jackson.core:jackson-databind Security Vulnerabilities in Gradle 6.x
  • [#12088] - Enable VFS retention for the build-tool build
  • [#12087] - Enable VFS retention for local builds only
  • [#12084] - Incremental Java compilation doesn't clean up stale generated JNI headers
  • [#11955] - Add access to POM packaging in component metadata rules
  • [#11850] - Re-evaluate VFS retention tests after known issues are fixed
  • [#11841] - Instant execution fails on Java Compile Task (no source) when there are only kotlin files in src/main/java
  • [#11836] - Handle all macOS file events without dropping VFS
  • [#11833] - File change not recognized by VFS on macOS when entire watched directory is removed
  • [#11832] - Watch long paths on Windows
  • [#11813] - Implement event-driven file watcher for Linux
  • [#10248] - JDK 14 support
  • [#8480] - ServiceRegistry failures should emit clearer help messages
  • [#6226] - Provide default value for JavaCompile header output
  • [#12536] - Constraints can sometimes impact excludes
  • [#12527] - CalculateTaskGraphBuildOperationType emits mutated structure for task plan
  • [#11825] - Same dependencies with different classifiers are not consumed correctly from Gradle Module Metadata

New in Gradle 6.3 RC2 (Mar 17, 2020)

  • Dependency constraints sometimes impact dependency excludes #12536
  • Task graph calculation build operation emits mutated structure for task plan #12527

New in Gradle 6.3 RC1 (Mar 12, 2020)

  • Support for Java 14:
  • Gradle now supports running and building with Java 14.
  • Improved error messages:
  • User-friendlier reporting of Gradle startup failures
  • Show location of Java fatal error log:
  • When the Java virtual machine executing the Gradle daemon crashes unexpectedly, the Java virtual machine will generate a fatal error log. The crash could be due to a bug in Java, Gradle itself, or in the user code being executed.
  • Since it may be hard to find where this error log is written, Gradle now prints the location of the crash log to the console.
  • Customizing location of native headers generated from Java source:
  • The Java native keyword allows declaring methods that are implemented in native languages such as C or C++. The Java compiler can then generate native headers that should be implemented. It is most commonly used with Java Native Interface (JNI).
  • The Java compile task for each Java source set has a default location to generate native headers into.
  • Improvements for plugin authors:
  • Improvements for component metadata rules:
  • Every module that is pulled from a repository has metadata associated with it, such as its group, name, and version. Sometimes, this metadata can be incomplete or incorrect. To manipulate such incomplete metadata from within the build script, Gradle offers an API to write component metadata rules.
  • The API for component metadata rules has been extended to allow access to packaging, classifier and type information from POM metadata.
  • The packaging information for a direct dependency can be obtained from the ComponentMetadataContext.Improvements for plugin authors
  • Improvements for component metadata rules
  • Every module that is pulled from a repository has metadata associated with it, such as its group, name, and version. Sometimes, this metadata can be incomplete or incorrect. To manipulate such incomplete metadata from within the build script, Gradle offers an API to write component metadata rules.
  • The API for component metadata rules has been extended to allow access to packaging, classifier and type information from POM metadata.
  • The packaging information for a direct dependency can be obtained from the ComponentMetadataContext.
  • Fixed issues:
  • 31 issues have been fixed in Gradle 6.3.
  • [#12379] - Deprecate 'default' and 'archives' configurations for resolving and declaring dependencies
  • [#12345] - Show path of hs_err_pid file when daemon disappears
  • [#12305] - Update documentation to not point to samples or snippets in -all distribution
  • [#12301] - De-serialization of task graph incorrect for anonymous subtypes of enum.
  • [#12293] - Gradle crashes if GRADLE_RO_DEP_CACHE is set and it cannot create modules-2 directory within it
  • [#12270] - Checkstyle task can no longer be configured to analyse single files
  • [#12248] - Precompiled script plugin fails to build on Windows if script is saved with CRLF (accessors not resolved)
  • [#12219] - Daemon crashes for `ArtifactTransformInputArtifactIntegrationTest` with VFS retention enabled
  • [#12182] - C++ compilation doesn't pick up file changes when VFS retention is enabled
  • [#12169] - `GradleBuildTaskIntegrationTest.can run multiple GradleBuild tasks concurrently` fails with VFS retention
  • [#12146] - Deleting local state when loading from cache is not picked up with partial invalidation
  • [#12136] - Fix `PlayContinuousBuildReloadWaitingIntegrationTest` with VFS retention
  • [#12134] - The `clean` task does not report changes to VFS
  • [#12122] - Parsing gradle properties file with invalid syntax fails with unhelpful error message
  • [#12118] - Log individual input file fingerprints
  • [#12117] - Allow war task to be made cacheable with runtime api
  • [#12091] - com.fasterxml.jackson.core:jackson-databind Security Vulnerabilities in Gradle 6.x
  • [#12088] - Enable VFS retention for the build-tool build
  • [#12087] - Enable VFS retention for local builds only
  • [#12084] - Incremental Java compilation doesn't clean up stale generated JNI headers
  • [#11955] - Add access to POM packaging in component metadata rules
  • [#11850] - Re-evaluate VFS retention tests after known issues are fixed
  • [#11841] - Instant execution fails on Java Compile Task (no source) when there are only kotlin files in src/main/java
  • [#11836] - Handle all macOS file events without dropping VFS
  • [#11833] - File change not recognized by VFS on macOS when entire watched directory is removed
  • [#11832] - Watch long paths on Windows
  • [#11813] - Implement event-driven file watcher for Linux
  • [#10248] - JDK 14 support
  • [#8480] - ServiceRegistry failures should emit clearer help messages
  • [#6226] - Provide default value for JavaCompile header output
  • [#6225] - Provide default value for annotation processing source output

New in Gradle 6.2.2 (Mar 4, 2020)

  • [#12402] - Fix tooling API metadata - bundling attribute
  • [#12381] - multi-project build use the properties of the rootProject for all included builds (changed in 6.2)

New in Gradle 6.2.1 (Feb 25, 2020)

  • Project name disambiguation causes project / external dependency conflicts to be missed. #12315
  • IdeaModelBuilder does not provide groovy-all as compile dep for buildSrc #12274
  • Gradle crashes if GRADLE_RO_DEP_CACHE is set and it cannot create modules-2 directory within it #12293

New in Gradle 6.2 RC 3 (Feb 13, 2020)

  • The Gradle team is excited to announce Gradle 6.2-rc-3. This fixes regressions reported in the first RC.
  • gradleApi() IDE indexing is broken with Gradle 6.2-rc-2 #12198

New in Gradle 6.1.1 (Jan 25, 2020)

  • 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.
  • Please see the user manual for more details.
  • 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.
  • Fixed issues
  • 4 issues have been fixed in Gradle 6.1.1:
  • [#11971] - Gradle 6.1 generates an empty .gradle and gradle directories on each execution in subproject directories
  • [#11966] - Memory regression when resolving large artifacts while computing checksums
  • [#11954] - Missing fixed issues from Gradle 6.1 release notes
  • [#11947] - Plugins using kotlin-dsl and compiled with 6.1 are incompatible with Gradle 6.0

New in Gradle 6.1 (Jan 16, 2020)

  • 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.

New in Gradle 6.0.1 (Nov 19, 2019)

  • This fixes several critical bugs in Gradle 6.0:
  • Incremental Java compilation is broken with Android 3.5.1 and Gradle 6.0 #11330
  • Unable to use a Provider as an artifact for the maven-publish plugin #11054
  • Implicit capabilities not always applied/detected #11300
  • maven-metadata.xml SHA256 and SHA512 checksums prevent publishing to Nexus #11308
  • Unable to properly resolve dynamic dependencies from mavenLocal() repo #11321
  • Kotlin DSL: fileTree(mapOf(...)) has unexpected behavior #11335
  • Attribute disambiguation rule for 'org.gradle.category' can cause unexpected type exception #11365

New in Gradle 6.0 (Nov 9, 2019)

  • A major highlight of this release is the vastly improved feature set in dependency management. Some of the features were released in stages, but with Gradle 6.0 they are stable and production ready. We publish Gradle Module Metadata by default, which makes these new features available between projects and binary dependencies.
  • In the JVM ecosystem, we've made incremental Java and Groovy compilation faster, added support for JDK13 and provided out of the box support for javadoc and source jars. For Scala projects, we've updated the Zinc compiler and made it easier to select which version of Zinc to use.
  • For Gradle plugin authors, we've added new APIs to make it easier to lazily connect tasks and properties together, made useful services available to worker API actions and Gradle will complain at runtime if a task appears misconfigured.
  • In the native ecosystem, we've added support for Visual Studio 2019 and the latest C++ standards.
  • This release contains some updates to help protect the integrity and security of your build.
  • Fixed issues:
  • issues have been fixed in Gradle 6.0.
  • [#11162] - Break when the java or java-library is applied after java-platform is applied
  • [#11140] - Change method names for javadoc and sources jar creation
  • [#11121] - gradle 6.0-rc-1 throws NoSuchMethodError when using scala 2.13.1
  • [#11111] - Incorrect output when publication warnings are silenced
  • [#11105] - Change POM gradle metadata marker
  • [#11101] - Gradle Enteprise plugin is incompatible with -b and 6.0
  • [#11095] - Cannot include 5.x build using `build-scan` Kotlin plugin sugar
  • [#11091] - Missing disambiguation between `category=platform` and `category=enforced-platform`
  • [#11090] - Definitions from buildSrc/ not found in settings.gradle.kts using gradle 6.0-rc-1
  • [#9857] - can't compile scala 2.13.0
  • [#11202] - `--scan` does not work when settings script is written in Kotlin
  • [#11038] - Forcing Scala 2.10/2.11 for zinc configuration does not work in 6.x nightly
  • [#11021] - Module metadata failures when child POM inherits portions for name/version from parent
  • [#10980] - Disable configuration matching for Gradle Module Metadata
  • [#10952] - New KotlinDslScriptsModel should be into :toolingApi
  • [#10924] - Binary compatibility check should fail on incompatible changes to non-incubating deprecated members
  • [#10916] - Changing flag is not set on snapshots using Gradle Module Metadata
  • [#10902] - com.fasterxml.jackson.core:jackson-databind Security Vulnerabilities in Gradle 5.x
  • [#10885] - Fix documentationRegistry following DM docs re-organization
  • [#10878] - Publishing Maven BOM without scope information
  • [#10870] - Misc improvements to dependency management docs
  • [#10856] - Investigate impact of failing on duplicates in JARs by default
  • [#10792] - Document validation deprecation warnings
  • [#10789] - Show deprecation warnings for path sensitivity problems
  • [#10786] - Improve error message when module isn't found because no `artifact` source is defined
  • [#10778] - Dependencies of feature variant are not added to the test classpath
  • [#10777] - Consistently display owning types in validation messages
  • [#10772] - Type information lost on Kotlin DSL accessors to typed Kotlin lambda extensions
  • [#10759] - Plugin validation should validate plugin source set
  • [#10745] - Embedded Kotlin dependencies should resolve with correct metadata
  • [#10738] - Update documentation referencing Maven
  • [#10737] - Document (and maybe bundle) variant aware javadoc and source publication
  • [#10736] - Prevent publication of module with same variant name or equivalent variants
  • [#10613] - Automagically generate an `Action`-taking configure method for extensions with container properties
  • [#10533] - Fix resolved version publication for strictly
  • [#10532] - Restrict feature combinations in dependency declarations
  • [#10512] - Implement `forSubgraph` via `strictly`
  • [#10485] - Show deprecation warnings for validation warnings at runtime
  • [#10469] - Document JVM ecosystem attributes, their values and the compat / disamb rules
  • [#10467] - Improve publishing chapter documentation
  • [#10466] - Inherited property annotations should be merged from subtype with implemented interfaces and then with super-class
  • [#10464] - Complete documentation on producing extra variant artifacts
  • [#10457] - Complete documentation for dependency alignment
  • [#10456] - Complete documentation on dependency platforms
  • [#10455] - Improve dependency version documentation
  • [#10452] - `@ReplacedBy` should work like `@Internal`
  • [#10438] - Log changes to incremental and non-incremental input properties differently
  • [#10431] - Add option to publication DSL to disable pom/ivy warnings
  • [#10430] - Document component metadata rules
  • [#10429] - Maven publishFilter optional self-dependencies in pom.xml that originate from features depending on other features of the same component
  • [#10428] - Allow modification of published variants that are added to components by plugins
  • [#10427] - Document or fix inconsistencies between legacy Ivy publication and ivy-publish
  • [#10420] - Better incremental compilation support
  • [#10418] - JavaCompile is UP-TO-DATE even if it had to remove stale classes
  • [#10356] - Deadlock in artifact transform with dependencies when resolving in a model builder
  • [#10324] - @Optional not applied to getter in Kotlin
  • [#10313] - Do not lock deprecated configurations when locking all configurations of a Java ecosystem project
  • [#10312] - Generate @Deprecated annotations for configuration accessors in Kotlin DSL
  • [#10309] - HTTP Downloading of Dependencies is formally Deprecated
  • [#10276] - De-incubate features for 6.0 (build-cache)
  • [#10271] - Javadoc for TaskOutputs.files() shouldn't talk about disabling cache anymore
  • [#10254] - Make Antlr task use InputChanges
  • [#10228] - Deprecate AbstractCompile.compile()
  • [#10227] - Use Deleter to clean up stale classes
  • [#10226] - Use Deleter to clean up output files when loading from cache
  • [#10199] - Consider not following symlinks when removing outputs
  • [#10190] - Gradle Module Metadata - publish by default
  • [#10189] - Gradle Module Metadata - publish and consume classifier information on dependencies
  • [#10155] - Prefer loopback bind address for daemon communications
  • [#10114] - Mitigate long classpath on Windows for JavaExec
  • [#10102] - Update Worker API guide to reflect new API
  • [#10094] - Improve performance of scheduler in the presence of many nodes
  • [#10085] - Deprecate WorkerExecutor.submit()
  • [#10062] - Remove CompilerArgumentProvider
  • [#10033] - Deadlock scheduling finalizer task on failed build
  • [#10011] - Clean fails with NPE with instant execution
  • [#10009] - ImmutableList is not deserialized correctly using instant execution
  • [#10003] - Deserializing MapProperty fails with instant execution
  • [#10000] - Make project.exec available in task action with instant execution
  • [#9888] - Revert automatic upgrade of capabilitlies
  • [#9817] - Use InputChanges API in JavaCompile
  • [#9723] - Tasks without outputs shouldn't be up-to-date
  • [#9684] - Design and implement feature for downgrading versions of transitive dependencies
  • [#9621] - De-incubate dependency management related API
  • [#9618] - JMH fails after some changes in 28th of May
  • [#9583] - have gradle init also create the .gitattributes file
  • [#9473] - using a plugins DSL block for subprojects in a precompiled script plugin neither works not errors
  • [#9462] - Incorrect snapshot resolution with Gradle metadata
  • [#9437] - Deprecate JavaScript plugins
  • [#9433] - Remove OSGi plugin
  • [#9432] - Remove announce plugin
  • [#9431] - Remove build-comparison plugin
  • [#9430] - Remove FindBugs plugin
  • [#9429] - Remove JDepend plugin
  • [#9422] - Kotlin DSL IntelliJ script resolution miss configured environment variables
  • [#9408] - Deprecate legacy publishing plugins (maven and ivy)
  • [#9378] - Warning about capability when building POM for publishing
  • [#9299] - Let the Kotlin DSL IDE script editor resolver support non-jvm IJ projects
  • [#9269] - Add deprecation warnings to "deprecated" generated Kotlin DSL accessors for improved IDE and script compilation experience
  • [#9255] - Kotlin DSL `KotlinBuildScript` should not implement the `Project` interface
  • [#9083] - Fail task validation on warning by default
  • [#9039] - Remove custom local build cache option
  • [#9033] - Fail build for pack/unpack errors
  • [#9031] - Rename ValidateTaskProperties to ValidateParameters
  • [#8904] - Improve provider error message when no value has been specified
  • [#8792] - CVE-2019-9658Gradle depends upon Checkstyle Version vulnerable to MITM based XXE
  • [#8788] - Scala plugin is not compatible with `java-library` plugin
  • [#8684] - BuildCache unpack and CleanupStaleOutputsExecuter fails on Windows with UnrecoverableUnpackingException due to file deletion fails
  • [#8681] - Gradle fails on openjdk-13
  • [#8667] - Ability to silence POM compatibility warnings
  • [#8585] - Deprecation warning for deprecated configurations
  • [#7888] - Fail when resolving a dependency with Gradle metadata that has no variants defined
  • [#7613] - Deprecate BuildListener.buildStarted
  • [#7558] - Update java-library plugin documentation to describe the performance benefits over java plugin.
  • [#6926] - Deprecate `startParameter.searchUpwards` and `startParameter.useEmptySettings()`
  • [#6918] - Deprecate execution of Gradle for an undefined build
  • [#6821] - TaskInputs.getProperties() result mutation should be disallowed/documented
  • [#6362] - Playframework 2.7 support
  • [#5468] - Provide public cancellation API
  • [#5217] - Warn about deprecated configurations like `compile`
  • [#4940] - Deprecate Upload-based publishing infrastructure
  • [#4241] - Build path for non root builds cannot be queried until part way through the build's lifecycle
  • [#4049] - Document Gradle module metadata
  • [#3165] - Promote ComponentMetadata and friends out of incubation
  • [#2903] - gradlew wrapper script fails on system with non-Bash /bin/sh shell
  • [#2678] - Make useful services available to workers in Worker API
  • [#2158] - Scala compilation with sbt/zinc
  • [#1494] - 'java-gradle-plugin' should use the 'java-library' over the 'java' plugin
  • [#1135] - afterEvaluate closure ignored when added to an evaluated project
  • [#1084] - Maven POM resolution leads to StackOverflowError if parent GAVs reference resolved POM GAVs

New in Gradle 5.6.4 (Nov 3, 2019)

  • This bug-fix release contains all changes from 5.6.1 through 5.6.3 as well as:
  • Can't configure kotlinOptions after upgrade to gradle 5.6.3 using kotlin-dsl #11083
  • Slow localhost look-up on macOS #11134

New in Gradle 6.0 RC 2 (Oct 30, 2019)

  • Dependency management improvements:
  • The dependency management documentation has been reorganised and structured around use cases to help users find the information they need faster. We've improved the terminology section to explain the commonly used terms.
  • The publication of Gradle Module Metadata is now the default when using the maven-publish or ivy-publish plugins.
  • Many of the features below rely on the production or consumption of additional metadata not found in Ivy or Maven POM files.
  • Sharing dependency versions between projects:
  • Gradle offers an easy way to recommend and share versions between projects called platforms.
  • With Gradle platforms, more context around version declaration are available, versions can be recommended and strict versions are enforced.
  • For interoperability, builds can also leverage integration with Maven BOMs.
  • Handling mutually exclusive dependencies:
  • Gradle uses component capabilities to allow plugins and builds to detect and resolve implementation conflicts between mutually exclusive dependencies.
  • A well-known example in the JVM world is competing logging implementations. Component capabilities let builds configure which dependency to select.
  • Upgrading versions of transitive dependencies:
  • Issues with dependency management are often about dealing with transitive dependencies. Often developers incorrectly fix transitive dependency issues by adding direct dependencies. To avoid this, Gradle provides the concept of dependency constraints to influence the version of transitive dependencies.
  • Handling mutually exclusive dependencies:
  • Gradle uses component capabilities to allow plugins and builds to detect and resolve implementation conflicts between mutually exclusive dependencies.
  • A well-known example in the JVM world is competing logging implementations. Component capabilities let builds configure which dependency to select.
  • Upgrading versions of transitive dependencies
  • Issues with dependency management are often about dealing with transitive dependencies. Often developers incorrectly fix transitive dependency issues by adding direct dependencies. To avoid this, Gradle provides the concept of dependency constraints to influence the version of transitive dependencies.
  • Expressing intent with context:
  • When declaring a dependency, a build can provide more context to Gradle about its version, including version preferences within a range, strict version requirements or rejected versions. Developers can also provide human readable descriptions for why a dependency is used or needed.
  • Tweak published metadata:
  • Gradle allows builds to fix or enrich traditional metadata with information that could not be published before, such as dependency constraints, rich versions, capabilities and variants. These are called component metadata rules.
  • Component metadata rules also make it possible to map additional published artifacts to new Gradle variants.
  • Modeling feature variants and optional dependencies:
  • Gradle provides the ability to model optional features of a library. Each feature can have its own set of dependencies and can be consumed separately.
  • With feature variants, Gradle provides first-class support for to create and publish test fixtures. Test fixtures can be consumed by other projects in a multi-project build.
  • Built-in javadoc and sources packaging and publishing:
  • You can now activate Javadoc and sources publishing for a Java Library or Java project:
  • java {
  • withJavadocJar()
  • withSourcesJar()
  • Using the maven-publish or ivy-publish plugin, this will not only automatically create and publish a -javadoc.jar and -sources.jar but also publish the information that these exist as variants in Gradle Module Metadata. This means that you can query for the Javadoc or sources variant of a module and also retrieve the Javadoc (or sources) of its dependencies.
  • If activated, a Java and Java Library project automatically provides the javadocJar and sourcesJar tasks.
  • Faster incremental Java and Groovy compilation:
  • When analyzing the impact of a changed class, the incremental compiler can now exclude classes that are an implementation detail of another class. This limits the number of classes that need to be recompiled.
  • For instance, if you have:
  • class A {}
  • class B {
  • static void foo() {
  • A a = new A();
  • // ... use A
  • class C {
  • void bar() {
  • B.foo();
  • When A is changed, Gradle previously recompiled all 3 source files, even though B did not change in a way that required C to be recompiled.
  • In Gradle 6.0, Gradle will only recompile A and B. For deep dependency chains, this may greatly reduce the number of files that require recompilation within a compilation task.
  • If A, B and C were all in different projects, Gradle would skip recompiling C through compilation avoidance.
  • Support for Java 13
  • Update to newer Scala Zinc compiler:
  • The Zinc compiler has been upgraded to version 1.3.0. Gradle no longer supports building for Scala 2.9.
  • This fixes some Scala incremental compilation bugs and improves performance.
  • The minimum Zinc compiler supported by Gradle is 1.2.0 and the maximum tested version is 1.3.0.
  • To make it easier to select the version of the Zinc compiler, you can now configure a zincVersion property:
  • scala {
  • zincVersion = "1.2.1"
  • Please note that the coordinates for the supported version of Zinc has changed since Zinc 1.0. If you try to use the com.typesafe.zinc:zinc compiler, Gradle will switch to the new Zinc implementation with a default version (1.3.0).
  • Problems with tasks called out during build:
  • Tasks that define their inputs or outputs incorrectly can cause problems when running incremental builds or when using the build cache. As part of an ongoing effort to bring these problems to light, Gradle now reports these problems as deprecation warnings during the build.
  • When issues are detected, Gradle will show warnings when run with --warning-mode=all:
  • > Task :myTask
  • Property 'inputDirectory' is declared without normalization specified. Properties of cacheable work must declare their normalization via @PathSensitive, @Classpath or @CompileClasspath. Defaulting to PathSensitivity.ABSOLUTE. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
  • Property 'outputFile' is not annotated with an input or output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
  • Deprecation warnings will always show up in build scans regardless of the command-line arguments used.
  • Security improvements:
  • Protecting the integrity of builds
  • Gradle will now emit a deprecation warning when resolving dependencies, pulling cache hits from a remote build cache, retrieving text resources, and applying script plugins with the insecure HTTP protocol.
  • We encourage all users to switch to using HTTPS instead of HTTP. Free HTTPS certificates for your artifact server can be acquired from Lets Encrypt. The use of HTTPS is important for protecting your supply chain and the entire JVM ecosystem.
  • For users that require the use of HTTP, Gradle has several new APIs to continue to allow HTTP on a case-by-case basis.
  • For repositories:
  • repositories {
  • maven {
  • url = "http://my-company.example"
  • allowInsecureProtocol = true
  • ivy {
  • url = "http://my-company.example"
  • allowInsecureProtocol = true
  • For script plugins:
  • apply from: resources.text.fromInsecureUri("http://my-company.example/external.gradle")
  • The new APIs:
  • HttpBuildCache.allowInsecureProtocol
  • IvyArtifactRepository.allowInsecureProtocol
  • MavenArtifactRepository.allowInsecureProtocol
  • TextResourceFactory.fromInsecureUri(Object)
  • Deprecation of HTTP services:
  • On January 13th through January 15th, 2020, some of the most widely used artifact servers in the JVM ecosystem will drop support for HTTP and will only support HTTPS. Their announcements can be found below:
  • Sonatype: Maven Central
  • JFrog: JCenter
  • Pivotal: Spring
  • We will be decommissioning the use of HTTP with Gradle provided services.
  • Signing Plugin now uses SHA512 instead of SHA1:
  • A low severity security issue was reported in the Gradle signing plugin.
  • More information can be found below:
  • Gradle GitHub Advisory
  • CVE-2019-16370
  • Publication of SHA256 and SHA512 checksums:
  • If you use the maven-publish or ivy-publish plugins, Gradle will now automatically upload SHA256 and SHA512 signatures, in addition to the traditional but unsecure MD5 and SHA1 signatures.
  • Publication of SHA256 and SHA512 files is not supported by the deprecated maven plugin but works with the legacy uploadArchives task for Ivy repositories.
  • In addition, the Gradle Module Metadata file also includes SHA256 and SHA512 checksums on referenced artifacts.
  • Support for in-memory signing with subkeys
  • Gradle now supports in-memory signing with subkeys.
  • Usability improvements:
  • Automatic shortening of long command-lines for Java applications on Windows
  • When Gradle detects that a Java process command-line will exceed Windows's 32,768 character limit, Gradle will attempt to shorten the command-line by passing the classpath of the Java application via a "classpath jar".
  • The classpath jar contains a manifest with the full classpath of the application. Gradle will only pass the generated jar on the command-line to the application. If the command-line is still too long, the Java process will fail to start as before.
  • If the command-line does not require shortening, Gradle will not change the command-line arguments for the Java process.
  • More consistent & robust file deletion on Windows:
  • Deleting complex file hierarchies on Windows can sometimes fail with errors like Unable to delete directory .... In the past, Gradle has used workarounds in some but not all cases when deleting files.
  • Gradle now deletes files in a consistent way that should avoid failures when cleaning output files of a task.
  • Windows line endings: gradle init generates .gitattributes file:
  • To ensure Windows batch scripts retain the appropriate line endings, gradle init now generates a .gitattributes file.
  • Wrapper reports download progress as percentage:
  • Gradle now reports the progress of the distribution downloaded.
  • Wrapper tries to recover from an invalid Gradle installation:
  • If the wrapper determines a Gradle distribution installed by the wrapper is invalid, the wrapper will attempt to re-install the distribution. Previous versions of the wrapper would fail and require manual intervention.
  • Daemon logs contain the date and timestamp:
  • When logging messages to the Gradle daemon log, our log format only contain the time and not the date.
  • Gradle now logs with ISO-8601 date timestamps.
  • Features for plugin authors:
  • New types available as managed properties
  • Gradle 5.5 introduced the concept of a managed property for tasks and other types. Gradle provides an implementation of the getters and setters for a managed property. This simplifies plugin implementation by removing a bunch of boilerplate.
  • In this release, it is possible for a task or other custom types to have an abstract read-only property of type ConfigurableFileTree and NamedDomainObjectContainer<T>.
  • New ConfigurableFileTree and FileCollection factory methods
  • Previously, it was only possible to create a ConfigurableFileTree or a fixed FileCollection by using the APIs provided by a Project. However, a Project object is not always available, for example in a project extension object or a worker action.
  • Injectable FileSystemOperations and ExecOperations services:
  • In the same vein, doing file system operations such as copy(), sync() and delete() or running external processes via exec() and javaexec() was only possible by using the APIs provided by a Project. Two new injectable services now allow to do all that when a Project instance is not available.
  • See the user manual for how to inject services and the FileSystemOperations and ExecOperations api documentation for more details and examples.
  • The ObjectFactory service now has a fileTree() method for creating ConfigurableFileTree instances.
  • The Directory and DirectoryProperty types both have a new files(Object...) method to create fixed FileCollection instances resolving files relative to the referenced directory.
  • Directory.files(Object...)
  • DirectoryProperty.files(Object...)
  • See the user manual for how to inject services and how to work with files in lazy properties.
  • Services available in Worker API actions:
  • The following services are now available for injection in tasks that use the Worker API and the WorkAction classes:
  • ObjectFactory
  • ProviderFactory
  • ProjectLayout
  • FileSystemOperations
  • ExecOperations
  • These services can be injected by adding them to the constructor arguments of the WorkAction implementation:
  • abstract class ReverseFile implements WorkAction<ReverseParameters> {
  • private final FileSystemOperations fileSystemOperations
  • @Inject
  • public ReverseFile(FileSystemOperations fileSystemOperations) {
  • this.fileSystemOperations = fileSystemOperations
  • @Override
  • public void execute() {
  • fileSystemOperations.copy {
  • from parameters.fileToReverse
  • into parameters.destinationDir
  • filter { String line -> line.reverse() }
  • See the user manual for further information on injecting services into custom Gradle types.
  • New convenience methods for bridging between a RegularFileProperty or DirectoryProperty and a File
  • DirectoryProperty.fileValue(File)
  • DirectoryProperty.fileProvider(Provider<File>)
  • RegularFileProperty.fileValue(File)
  • RegularFileProperty.fileProvider​(Provider<File>)
  • ProjectLayout.dir(Provider<File>)
  • Features for native developers:
  • IntelliSense support for C++17 and latest C++ standard within Visual Studio
  • Gradle will now generate IDE solutions honoring the C++17 /std:cpp17 and latest C++ standard /std:cpplatest compiler flags.
  • Visual Studio IntelliSense will help you write great code with these new standards.
  • Support for Visual Studio 2019
  • Gradle now supports building application and libraries with Visual Studio 2019.
  • Features for Gradle tooling providers:
  • Test output as progress event
  • Users of the latest Tooling API can listen to the new TestOutputEvent progress event type that contains the test output. With that, tooling providers can use the TestLauncher API to launch tests and show the test output on the fly.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • C++ and Swift support
  • We promoted all the new native plugins (i.e. cpp-application, cpp-library, cpp-unit-test, swift-application, swift-library, xctest, visual-studio and xcode). Note that all software model plugins will be phased out instead of being promoted.
  • New incremental tasks API
  • The new InputChanges API for implementing incremental tasks has been promoted. See the user manual for more information.
  • IDE integration types and APIs.
  • We promoted all API elements in ide and tooling-api sub-projects that were introduced before Gradle 5.5.
  • Some long existing incubating features have been promoted
  • All pre-5.0 incubating APIs have been promoted.
  • The lazy configuration API has been promoted.
  • Enabling strict task validation has been promoted.
  • Fixed issues:
  • 129 issues have been fixed in Gradle 6.0.
  • [#11162] - Break when the java or java-library is applied after java-platform is applied
  • [#11140] - Change method names for javadoc and sources jar creation
  • [#11121] - gradle 6.0-rc-1 throws NoSuchMethodError when using scala 2.13.1
  • [#11111] - Incorrect output when publication warnings are silenced
  • [#11105] - Change POM gradle metadata marker
  • [#11101] - Gradle Enteprise plugin is incompatible with -b and 6.0
  • [#11095] - Cannot include 5.x build using `build-scan` Kotlin plugin sugar
  • [#11091] - Missing disambiguation between `category=platform` and `category=enforced-platform`
  • [#11090] - Definitions from buildSrc/ not found in settings.gradle.kts using gradle 6.0-rc-1
  • [#9857] - can't compile scala 2.13.0
  • [#11038] - Forcing Scala 2.10/2.11 for zinc configuration does not work in 6.x nightly
  • [#11021] - Module metadata failures when child POM inherits portions for name/version from parent
  • [#10980] - Disable configuration matching for Gradle Module Metadata
  • [#10952] - New KotlinDslScriptsModel should be into :toolingApi
  • [#10924] - Binary compatibility check should fail on incompatible changes to non-incubating deprecated members
  • [#10916] - Changing flag is not set on snapshots using Gradle Module Metadata
  • [#10902] - com.fasterxml.jackson.core:jackson-databind Security Vulnerabilities in Gradle 5.x
  • [#10885] - Fix documentationRegistry following DM docs re-organization
  • [#10878] - Publishing Maven BOM without scope information
  • [#10870] - Misc improvements to dependency management docs
  • [#10856] - Investigate impact of failing on duplicates in JARs by default
  • [#10792] - Document validation deprecation warnings
  • [#10789] - Show deprecation warnings for path sensitivity problems
  • [#10786] - Improve error message when module isn't found because no `artifact` source is defined
  • [#10778] - Dependencies of feature variant are not added to the test classpath
  • [#10777] - Consistently display owning types in validation messages
  • [#10772] - Type information lost on Kotlin DSL accessors to typed Kotlin lambda extensions
  • [#10759] - Plugin validation should validate plugin source set
  • [#10745] - Embedded Kotlin dependencies should resolve with correct metadata
  • [#10738] - Update documentation referencing Maven
  • [#10737] - Document (and maybe bundle) variant aware javadoc and source publication
  • [#10736] - Prevent publication of module with same variant name or equivalent variants
  • [#10613] - Automagically generate an `Action`-taking configure method for extensions with container properties
  • [#10533] - Fix resolved version publication for strictly
  • [#10532] - Restrict feature combinations in dependency declarations
  • [#10512] - Implement `forSubgraph` via `strictly`
  • [#10485] - Show deprecation warnings for validation warnings at runtime
  • [#10469] - Document JVM ecosystem attributes, their values and the compat / disamb rules
  • [#10467] - Improve publishing chapter documentation
  • [#10466] - Inherited property annotations should be merged from subtype with implemented interfaces and then with super-class
  • [#10464] - Complete documentation on producing extra variant artifacts
  • [#10457] - Complete documentation for dependency alignment
  • [#10456] - Complete documentation on dependency platforms
  • [#10455] - Improve dependency version documentation
  • [#10452] - `@ReplacedBy` should work like `@Internal`
  • [#10438] - Log changes to incremental and non-incremental input properties differently
  • [#10431] - Add option to publication DSL to disable pom/ivy warnings
  • [#10430] - Document component metadata rules
  • [#10429] - Maven publish: Filter optional self-dependencies in pom.xml that originate from features depending on other features of the same component
  • [#10428] - Allow modification of published variants that are added to components by plugins
  • [#10427] - Document or fix inconsistencies between legacy Ivy publication and ivy-publish
  • [#10420] - Better incremental compilation support
  • [#10418] - JavaCompile is UP-TO-DATE even if it had to remove stale classes
  • [#10356] - Deadlock in artifact transform with dependencies when resolving in a model builder
  • [#10324] - @Optional not applied to getter in Kotlin
  • [#10313] - Do not lock deprecated configurations when locking all configurations of a Java ecosystem project
  • [#10312] - Generate @Deprecated annotations for configuration accessors in Kotlin DSL
  • [#10309] - HTTP Downloading of Dependencies is formally Deprecated
  • [#10276] - De-incubate features for 6.0 (build-cache)
  • [#10271] - Javadoc for TaskOutputs.files() shouldn't talk about disabling cache anymore
  • [#10254] - Make Antlr task use InputChanges
  • [#10228] - Deprecate AbstractCompile.compile()
  • [#10227] - Use Deleter to clean up stale classes
  • [#10226] - Use Deleter to clean up output files when loading from cache
  • [#10199] - Consider not following symlinks when removing outputs
  • [#10190] - Gradle Module Metadata - publish by default
  • [#10189] - Gradle Module Metadata - publish and consume classifier information on dependencies
  • [#10155] - Prefer loopback bind address for daemon communications
  • [#10114] - Mitigate long classpath on Windows for JavaExec
  • [#10102] - Update Worker API guide to reflect new API
  • [#10094] - Improve performance of scheduler in the presence of many nodes
  • [#10085] - Deprecate WorkerExecutor.submit()
  • [#10062] - Remove CompilerArgumentProvider
  • [#10033] - Deadlock scheduling finalizer task on failed build
  • [#10011] - Clean fails with NPE with instant execution
  • [#10009] - ImmutableList is not deserialized correctly using instant execution
  • [#10003] - Deserializing MapProperty fails with instant execution
  • [#10000] - Make project.exec available in task action with instant execution
  • [#9888] - Revert automatic upgrade of capabilitlies
  • [#9817] - Use InputChanges API in JavaCompile
  • [#9723] - Tasks without outputs shouldn't be up-to-date
  • [#9684] - Design and implement feature for downgrading versions of transitive dependencies
  • [#9621] - De-incubate dependency management related API
  • [#9618] - JMH fails after some changes in 28th of May
  • [#9583] - have gradle init also create the .gitattributes file
  • [#9473] - using a plugins DSL block for subprojects in a precompiled script plugin neither works not errors
  • [#9462] - Incorrect snapshot resolution with Gradle metadata
  • [#9437] - Deprecate JavaScript plugins
  • [#9433] - Remove OSGi plugin
  • [#9432] - Remove announce plugin
  • [#9431] - Remove build-comparison plugin
  • [#9430] - Remove FindBugs plugin
  • [#9429] - Remove JDepend plugin
  • [#9422] - Kotlin DSL IntelliJ script resolution miss configured environment variables
  • [#9408] - Deprecate legacy publishing plugins (maven and ivy)
  • [#9378] - Warning about capability when building POM for publishing
  • [#9299] - Let the Kotlin DSL IDE script editor resolver support non-jvm IJ projects
  • [#9269] - Add deprecation warnings to "deprecated" generated Kotlin DSL accessors for improved IDE and script compilation experience
  • [#9255] - Kotlin DSL `KotlinBuildScript` should not implement the `Project` interface
  • [#9083] - Fail task validation on warning by default
  • [#9039] - Remove custom local build cache option
  • [#9033] - Fail build for pack/unpack errors
  • [#9031] - Rename ValidateTaskProperties to ValidateParameters
  • [#8904] - Improve provider error message when no value has been specified
  • [#8792] - CVE-2019-9658: Gradle depends upon Checkstyle Version vulnerable to MITM based XXE
  • [#8788] - Scala plugin is not compatible with `java-library` plugin
  • [#8684] - BuildCache unpack and CleanupStaleOutputsExecuter fails on Windows with UnrecoverableUnpackingException due to file deletion fails
  • [#8681] - Gradle fails on openjdk-13
  • [#8667] - Ability to silence POM compatibility warnings
  • [#8585] - Deprecation warning for deprecated configurations
  • [#7888] - Fail when resolving a dependency with Gradle metadata that has no variants defined
  • [#7613] - Deprecate BuildListener.buildStarted
  • [#7558] - Update java-library plugin documentation to describe the performance benefits over java plugin.
  • [#6926] - Deprecate `startParameter.searchUpwards` and `startParameter.useEmptySettings()`
  • [#6918] - Deprecate execution of Gradle for an undefined build
  • [#6821] - TaskInputs.getProperties() result mutation should be disallowed/documented
  • [#6362] - Playframework 2.7 support
  • [#5468] - Provide public cancellation API
  • [#5217] - Warn about deprecated configurations like `compile`
  • [#4940] - Deprecate Upload-based publishing infrastructure
  • [#4241] - Build path for non root builds cannot be queried until part way through the build's lifecycle
  • [#4049] - Document Gradle module metadata
  • [#3165] - Promote ComponentMetadata and friends out of incubation
  • [#2903] - gradlew wrapper script fails on system with non-Bash /bin/sh shell
  • [#2678] - Make useful services available to workers in Worker API
  • [#2158] - Scala compilation with sbt/zinc
  • [#1494] - 'java-gradle-plugin' should use the 'java-library' over the 'java' plugin
  • [#1135] - afterEvaluate closure ignored when added to an evaluated project
  • [#1084] - Maven POM resolution leads to StackOverflowError if parent GAVs reference resolved POM GAVs

New in Gradle 6.0 RC1 (Oct 21, 2019)

  • Dependency management improvements:
  • The dependency management documentation has been reorganised and structured around use cases to help users find the information they need faster. We've improved the terminology section to explain the commonly used terms.
  • The publication of Gradle Module Metadata is now the default when using the maven-publish or ivy-publish plugins.
  • Many of the features below rely on the production or consumption of additional metadata not found in Ivy or Maven POM files.
  • Sharing dependency versions between projects
  • Gradle offers an easy way to recommend and share versions between projects called platforms.
  • With Gradle platforms, more context around version declaration are available, versions can be recommended and strict versions are enforced.
  • For interoperability, builds can also leverage integration with Maven BOMs.
  • Handling mutually exclusive dependencies
  • Gradle uses component capabilities to allow plugins and builds to detect and resolve implementation conflicts between mutually exclusive dependencies.
  • A well-known example in the JVM world is competing logging implementations. Component capabilities let builds configure which dependency to select.
  • Upgrading versions of transitive dependencies
  • Issues with dependency management are often about dealing with transitive dependencies. Often developers incorrectly fix transitive dependency issues by adding direct dependencies. To avoid this, Gradle provides the concept of dependency constraints to influence the version of transitive dependencies.
  • Aligning versions across multiple dependencies
  • Dependency version alignment allows builds to express that different modules belong to the same logical group (like a platform) and need to have identical (a.k.a aligned) versions in a dependency graph.
  • A well-known example in the JVM world is the Jackson libraries.
  • Expressing intent with context
  • When declaring a dependency, a build can provide more context to Gradle about its version, including version preferences within a range, strict version requirements or rejected versions. Developers can also provide human readable descriptions for why a dependency is used or needed.
  • Tweak published metadata
  • Gradle allows builds to fix or enrich traditional metadata with information that could not be published before, such as dependency constraints, rich versions, capabilities and variants. These are called component metadata rules.
  • Component metadata rules also make it possible to map additional published artifacts to new Gradle variants.
  • Modeling feature variants and optional dependencies
  • Gradle provides the ability to model optional features of a library. Each feature can have its own set of dependencies and can be consumed separately.
  • With feature variants, Gradle provides first-class support for to create and publish test fixtures. Test fixtures can be consumed by other projects in a multi-project build.
  • Built-in javadoc and sources packaging and publishing
  • You can now activate Javadoc and sources publishing for a Java Library or Java project:
  • java {
  • publishJavadoc()
  • publishSources()
  • Using the maven-publish or ivy-publish plugin, this will not only automatically create and publish a -javadoc.jar and -sources.jar but also publish the information that these exist as variants in Gradle Module Metadata. This means that you can query for the Javadoc or sources variant of a module and also retrieve the Javadoc (or sources) of its dependencies.
  • If activated, a Java and Java Library project automatically provides the javadocJar and sourcesJar tasks.
  • Faster incremental Java and Groovy compilation:
  • When analyzing the impact of a changed class, the incremental compiler can now exclude classes that are an implementation detail of another class. This limits the number of classes that need to be recompiled.
  • Support for Java 13:
  • Gradle now supports running with Java 13.
  • Update to newer Scala Zinc compiler:
  • The Zinc compiler has been upgraded to version 1.3.0. Gradle no longer supports building for Scala 2.9.
  • This fixes some Scala incremental compilation bugs and improves performance.
  • The minimum Zinc compiler supported by Gradle is 1.2.0 and the maximum tested version is 1.3.0.
  • To make it easier to select the version of the Zinc compiler, you can now configure a zincVersion property
  • Please note that the coordinates for the supported version of Zinc has changed since Zinc 1.0. If you try to use the com.typesafe.zinc:zinc compiler, Gradle will switch to the new Zinc implementation with a default version (1.3.0).
  • Problems with tasks called out during build:
  • Tasks that define their inputs or outputs incorrectly can cause problems when running incremental builds or when using the build cache. As part of an ongoing effort to bring these problems to light, Gradle now reports these problems as deprecation warnings during the build.
  • When issues are detected, Gradle will show warnings when run with --warning-mode=all:
  • > Task :myTask
  • Property 'inputDirectory' is declared without normalization specified. Properties of cacheable work must declare their normalization via @PathSensitive, @Classpath or @CompileClasspath. Defaulting to PathSensitivity.ABSOLUTE. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
  • Property 'outputFile' is not annotated with an input or output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
  • Deprecation warnings will always show up in build scans regardless of the command-line arguments used.
  • Security improvements:
  • Protecting the integrity of builds:
  • Gradle will now emit a deprecation warning when resolving dependencies, pulling cache hits from a remote build cache, retrieving text resources, and applying script plugins with the insecure HTTP protocol.
  • We encourage all users to switch to using HTTPS instead of HTTP. Free HTTPS certificates for your artifact server can be acquired from Lets Encrypt. The use of HTTPS is important for protecting your supply chain and the entire JVM ecosystem.
  • For users that require the use of HTTP, Gradle has several new APIs to continue to allow HTTP on a case-by-case basis.
  • Deprecation of HTTP services:
  • On January 13th through January 15th, 2020, some of the most widely used artifact servers in the JVM ecosystem will drop support for HTTP and will only support HTTPS.
  • Signing Plugin now uses SHA512 instead of SHA1:
  • A low severity security issue was reported in the Gradle signing plugin.
  • Publication of SHA256 and SHA512 checksums:
  • If you use the maven-publish or ivy-publish plugins, Gradle will now automatically upload SHA256 and SHA512 signatures, in addition to the traditional but unsecure MD5 and SHA1 signatures.
  • Publication of SHA256 and SHA512 files is not supported by the deprecated maven plugin but works with the legacy uploadArchives task for Ivy repositories.
  • In addition, the Gradle Module Metadata file also includes SHA256 and SHA512 checksums on referenced artifacts.
  • Support for in-memory signing with subkeys:
  • Gradle now supports in-memory signing with subkeys.
  • This was contributed by szhem.
  • Usability improvements:
  • Automatic shortening of long command-lines for Java applications on Windows:
  • When Gradle detects that a Java process command-line will exceed Windows's 32,768 character limit, Gradle will attempt to shorten the command-line by passing the classpath of the Java application via a "classpath jar".
  • The classpath jar contains a manifest with the full classpath of the application. Gradle will only pass the generated jar on the command-line to the application. If the command-line is still too long, the Java process will fail to start as before.
  • If the command-line does not require shortening, Gradle will not change the command-line arguments for the Java process.
  • More consistent & robust file deletion on Windows:
  • Deleting complex file hierarchies on Windows can sometimes fail with errors like Unable to delete directory .... In the past, Gradle has used workarounds in some but not all cases when deleting files.
  • Gradle now deletes files in a consistent way that should avoid failures when cleaning output files of a task.
  • Windows line endings: gradle init generates .gitattributes file:
  • To ensure Windows batch scripts retain the appropriate line endings, gradle init now generates a .gitattributes file.
  • This was contributed by Tom Eyckmans.
  • Wrapper reports download progress as percentage:
  • Gradle now reports the progress of the distribution downloaded.
  • Initially contributed by Artur Dryomov.
  • Wrapper tries to recover from an invalid Gradle installation:
  • If the wrapper determines a Gradle distribution installed by the wrapper is invalid, the wrapper will attempt to re-install the distribution. Previous versions of the wrapper would fail and require manual intervention.
  • Daemon logs contain the date and timestamp:
  • When logging messages to the Gradle daemon log, our log format only contain the time and not the date.
  • Gradle now logs with ISO-8601 date timestamps.
  • Features for plugin authors:
  • New types available as managed properties
  • Gradle 5.5 introduced the concept of a managed property for tasks and other types. Gradle provides an implementation of the getters and setters for a managed property. This simplifies plugin implementation by removing a bunch of boilerplate.
  • In this release, it is possible for a task or other custom types to have an abstract read-only property of type ConfigurableFileTree and NamedDomainObjectContainer<T>.
  • New ConfigurableFileTree and FileCollection factory methods
  • Previously, it was only possible to create a ConfigurableFileTree or a fixed FileCollection by using the APIs provided by a Project. However, a Project object is not always available, for example in a project extension object or a worker action.
  • The ObjectFactory service now has a fileTree() method for creating ConfigurableFileTree instances.
  • The Directory and DirectoryProperty types both have a new files(Object...) method to create fixed FileCollection instances resolving files relativel to the referenced directory.
  • Directory.files(Object...)
  • DirectoryProperty.files(Object...)
  • See the user manual for how to inject services and how to work with files in lazy properties.
  • Injectable FileSystemOperations and ExecOperations services
  • In the same vein, doing file system operations such as copy(), sync() and delete() or running external processes via exec() and javaexec() was only possible by using the APIs provided by a Project. Two new injectable services now allow to do all that when a Project instance is not available.
  • See the user manual for how to inject services and the FileSystemOperations and ExecOperations api documentation for more details and examples.
  • Services available in Worker API actions
  • The following services are now available for injection in tasks that use the Worker API and the WorkAction classes:
  • ObjectFactory
  • ProviderFactory
  • ProjectLayout
  • FileSystemOperations
  • ExecOperations
  • These services can be injected by adding them to the constructor arguments of the WorkAction implementation:
  • abstract class ReverseFile implements WorkAction<ReverseParameters> {
  • private final FileSystemOperations fileSystemOperations
  • @Inject
  • public ReverseFile(FileSystemOperations fileSystemOperations) {
  • this.fileSystemOperations = fileSystemOperations
  • @Override
  • public void execute() {
  • fileSystemOperations.copy {
  • from parameters.fileToReverse
  • into parameters.destinationDir
  • filter { String line -> line.reverse() }
  • See the user manual for further information on injecting services into custom Gradle types.
  • New convenience methods for bridging between a RegularFileProperty or DirectoryProperty and a File
  • DirectoryProperty.fileValue(File)
  • DirectoryProperty.fileProvider(Provider<File>)
  • RegularFileProperty.fileValue(File)
  • RegularFileProperty.fileProvider?(Provider<File>)
  • ProjectLayout.dir(Provider<File>)
  • Features for native developers:
  • IntelliSense support for C++17 and latest C++ standard within Visual Studio
  • Gradle will now generate IDE solutions honoring the C++17 /std:cpp17 and latest C++ standard /std:cpplatest compiler flags.
  • Visual Studio IntelliSense will help you write great code with these new standards.
  • Support for Visual Studio 2019
  • Gradle now supports building application and libraries with Visual Studio 2019.
  • Features for Gradle tooling providers:
  • Test output as progress event
  • Users of the latest Tooling API can listen to the new TestOutputEvent progress event type that contains the test output. With that, tooling providers can use the TestLauncher API to launch tests and show the test output on the fly.
  • 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 Manual section on the “Feature Lifecycle” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • C++ and Swift support
  • We promoted all the new native plugins (i.e. cpp-application, cpp-library, cpp-unit-test, swift-application, swift-library, xctest, visual-studio and xcode). Note that all software model plugins will be phased out instead of being promoted.
  • New incremental tasks API
  • The new InputChanges API for implementing incremental tasks has been promoted. See the user manual for more information.
  • IDE integration types and APIs.
  • We promoted all API elements in ide and tooling-api sub-projects that were introduced before Gradle 5.5.
  • Some long existing incubating features have been promoted
  • All pre-5.0 incubating APIs have been promoted.
  • The lazy configuration API has been promoted.
  • Enabling strict task validation has been promoted.
  • Fixed issues:
  • 121 issues have been fixed in Gradle 6.0.
  • [#11091] - Missing disambiguation between `category=platform` and `category=enforced-platform`
  • [#11038] - Forcing Scala 2.10/2.11 for zinc configuration does not work in 6.x nightly
  • [#11021] - Module metadata failures when child POM inherits portions for name/version from parent
  • [#10980] - Disable configuration matching for Gradle Module Metadata
  • [#10952] - New KotlinDslScriptsModel should be into :toolingApi
  • [#10924] - Binary compatibility check should fail on incompatible changes to non-incubating deprecated members
  • [#10916] - Changing flag is not set on snapshots using Gradle Module Metadata
  • [#10902] - com.fasterxml.jackson.core:jackson-databind Security Vulnerabilities in Gradle 5.x
  • [#10885] - Fix documentationRegistry following DM docs re-organization
  • [#10878] - Publishing Maven BOM without scope information
  • [#10870] - Misc improvements to dependency management docs
  • [#10856] - Investigate impact of failing on duplicates in JARs by default
  • [#10792] - Document validation deprecation warnings
  • [#10789] - Show deprecation warnings for path sensitivity problems
  • [#10786] - Improve error message when module isn't found because no `artifact` source is defined
  • [#10778] - Dependencies of feature variant are not added to the test classpath
  • [#10777] - Consistently display owning types in validation messages
  • [#10772] - Type information lost on Kotlin DSL accessors to typed Kotlin lambda extensions
  • [#10759] - Plugin validation should validate plugin source set
  • [#10745] - Embedded Kotlin dependencies should resolve with correct metadata
  • [#10738] - Update documentation referencing Maven
  • [#10737] - Document (and maybe bundle) variant aware javadoc and source publication
  • [#10736] - Prevent publication of module with same variant name or equivalent variants
  • [#10613] - Automagically generate an `Action`-taking configure method for extensions with container properties
  • [#10533] - Fix resolved version publication for strictly
  • [#10532] - Restrict feature combinations in dependency declarations
  • [#10512] - Implement `forSubgraph` via `strictly`
  • [#10485] - Show deprecation warnings for validation warnings at runtime
  • [#10469] - Document JVM ecosystem attributes, their values and the compat / disamb rules
  • [#10467] - Improve publishing chapter documentation
  • [#10466] - Inherited property annotations should be merged from subtype with implemented interfaces and then with super-class
  • [#10464] - Complete documentation on producing extra variant artifacts
  • [#10457] - Complete documentation for dependency alignment
  • [#10456] - Complete documentation on dependency platforms
  • [#10455] - Improve dependency version documentation
  • [#10452] - `@ReplacedBy` should work like `@Internal`
  • [#10438] - Log changes to incremental and non-incremental input properties differently
  • [#10431] - Add option to publication DSL to disable pom/ivy warnings
  • [#10430] - Document component metadata rules
  • [#10429] - Maven publish: Filter optional self-dependencies in pom.xml that originate from features depending on other features of the same component
  • [#10428] - Allow modification of published variants that are added to components by plugins
  • [#10427] - Document or fix inconsistencies between legacy Ivy publication and ivy-publish
  • [#10420] - Better incremental compilation support
  • [#10418] - JavaCompile is UP-TO-DATE even if it had to remove stale classes
  • [#10356] - Deadlock in artifact transform with dependencies when resolving in a model builder
  • [#10324] - @Optional not applied to getter in Kotlin
  • [#10313] - Do not lock deprecated configurations when locking all configurations of a Java ecosystem project
  • [#10312] - Generate @Deprecated annotations for configuration accessors in Kotlin DSL
  • [#10309] - HTTP Downloading of Dependencies is formally Deprecated
  • [#10276] - De-incubate features for 6.0 (build-cache)
  • [#10271] - Javadoc for TaskOutputs.files() shouldn't talk about disabling cache anymore
  • [#10254] - Make Antlr task use InputChanges
  • [#10228] - Deprecate AbstractCompile.compile()
  • [#10227] - Use Deleter to clean up stale classes
  • [#10226] - Use Deleter to clean up output files when loading from cache
  • [#10199] - Consider not following symlinks when removing outputs
  • [#10190] - Gradle Module Metadata - publish by default
  • [#10189] - Gradle Module Metadata - publish and consume classifier information on dependencies
  • [#10155] - Prefer loopback bind address for daemon communications
  • [#10114] - Mitigate long classpath on Windows for JavaExec
  • [#10102] - Update Worker API guide to reflect new API
  • [#10094] - Improve performance of scheduler in the presence of many nodes
  • [#10085] - Deprecate WorkerExecutor.submit()
  • [#10062] - Remove CompilerArgumentProvider
  • [#10033] - Deadlock scheduling finalizer task on failed build
  • [#10011] - Clean fails with NPE with instant execution
  • [#10009] - ImmutableList is not deserialized correctly using instant execution
  • [#10003] - Deserializing MapProperty fails with instant execution
  • [#10000] - Make project.exec available in task action with instant execution
  • [#9888] - Revert automatic upgrade of capabilitlies
  • [#9817] - Use InputChanges API in JavaCompile
  • [#9723] - Tasks without outputs shouldn't be up-to-date
  • [#9684] - Design and implement feature for downgrading versions of transitive dependencies
  • [#9621] - De-incubate dependency management related API
  • [#9618] - JMH fails after some changes in 28th of May
  • [#9583] - have gradle init also create the .gitattributes file
  • [#9473] - using a plugins DSL block for subprojects in a precompiled script plugin neither works not errors
  • [#9462] - Incorrect snapshot resolution with Gradle metadata
  • [#9437] - Deprecate JavaScript plugins
  • [#9433] - Remove OSGi plugin
  • [#9432] - Remove announce plugin
  • [#9431] - Remove build-comparison plugin
  • [#9430] - Remove FindBugs plugin
  • [#9429] - Remove JDepend plugin
  • [#9422] - Kotlin DSL IntelliJ script resolution miss configured environment variables
  • [#9408] - Deprecate legacy publishing plugins (maven and ivy)
  • [#9378] - Warning about capability when building POM for publishing
  • [#9299] - Let the Kotlin DSL IDE script editor resolver support non-jvm IJ projects
  • [#9269] - Add deprecation warnings to "deprecated" generated Kotlin DSL accessors for improved IDE and script compilation experience
  • [#9255] - Kotlin DSL `KotlinBuildScript` should not implement the `Project` interface
  • [#9083] - Fail task validation on warning by default
  • [#9039] - Remove custom local build cache option
  • [#9033] - Fail build for pack/unpack errors
  • [#9031] - Rename ValidateTaskProperties to ValidateParameters
  • [#8904] - Improve provider error message when no value has been specified
  • [#8792] - CVE-2019-9658: Gradle depends upon Checkstyle Version vulnerable to MITM based XXE
  • [#8788] - Scala plugin is not compatible with `java-library` plugin
  • [#8684] - BuildCache unpack and CleanupStaleOutputsExecuter fails on Windows with UnrecoverableUnpackingException due to file deletion fails
  • [#8681] - Gradle fails on openjdk-13
  • [#8667] - Ability to silence POM compatibility warnings
  • [#8585] - Deprecation warning for deprecated configurations
  • [#7888] - Fail when resolving a dependency with Gradle metadata that has no variants defined
  • [#7613] - Deprecate BuildListener.buildStarted
  • [#7558] - Update java-library plugin documentation to describe the performance benefits over java plugin.
  • [#6926] - Deprecate `startParameter.searchUpwards` and `startParameter.useEmptySettings()`
  • [#6918] - Deprecate execution of Gradle for an undefined build
  • [#6821] - TaskInputs.getProperties() result mutation should be disallowed/documented
  • [#6362] - Playframework 2.7 support
  • [#5468] - Provide public cancellation API
  • [#5217] - Warn about deprecated configurations like `compile`
  • [#4940] - Deprecate Upload-based publishing infrastructure
  • [#4241] - Build path for non root builds cannot be queried until part way through the build's lifecycle
  • [#4049] - Document Gradle module metadata
  • [#3165] - Promote ComponentMetadata and friends out of incubation
  • [#2903] - gradlew wrapper script fails on system with non-Bash /bin/sh shell
  • [#2678] - Make useful services available to workers in Worker API
  • [#2158] - Scala compilation with sbt/zinc
  • [#1494] - 'java-gradle-plugin' should use the 'java-library' over the 'java' plugin
  • [#1135] - afterEvaluate closure ignored when added to an evaluated project
  • [#1084] - Maven POM resolution leads to StackOverflowError if parent GAVs reference resolved POM GAVs
  • [#9857] - can't compile scala 2.13.0

New in Gradle 5.6.3 (Oct 18, 2019)

  • Let Kotlin DSL gracefully handle lambdas registered as extensions (5.6.3) #11014
  • Gradle Module Metadata compatibility for unique snapshots #11050
  • maven-publish publishes jars with wrong extension for known jar packagings like 'ejb' in 5.6 #10555
  • Regression in 5.5 when using dependency constraints for non-jar dependencies without a POM #10948
  • resolution failure when dependency locks and kotlin-dsl plugin are present #10697
  • Non-Kotlin extensions crash the build when using Kotlin DSL + Kotlin plugins #10729
  • Sporadic build failures with build-scan due to an overlapping ID assignment #10286
  • Prevent StackOverflowException caused by excessive 'or' via PatternMatcher #10330

New in Gradle 5.6.2 (Sep 5, 2019)

  • This bug-fix release contains changes to Gradle 5.6.1:
  • Duplicate entry in generated .classpath file in Gradle >= 5.6 (#10393)
  • Memory leak when using tasks that use Worker API and process isolation (#10411)

New in Gradle 5.6.1 (Aug 28, 2019)

  • Unable to publish artifacts with custom classifier/extension from java project with Gradle 5.6 (#10287)
  • Regression in 5.6 signArchives (Duplicate key) (#10302)
  • Regression setting version for ArchiveTasks in 5.6 (#10311)
  • A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork (#10317)
  • DirectoryFileTree breaks SourceTask since 5.6 (#10322)
  • Regression: Unable to pass java.util.Properties object using Worker API in Gradle 5.6 (#10323)
  • Unable to publish multiple publications with same coordinates (#10333)
  • Gradle 5.6 - RuntimeException: Unable to load FastStringService (#10347)

New in Gradle 5.6 (Aug 16, 2019)

  • Faster Groovy compilation
  • Test fixtures for Java projects
  • Central management of plugin versions with settings script
  • Better performance for very large projects on Windows using the Java library plugin
  • Improved handling of ZIP archives on classpaths
  • Support for PMD incremental analysis
  • Executable Jar support with project.javaexec and JavaExec
  • Fail the build on deprecation warnings
  • Changes to file name case on case-insensitive file systems are now handled correctly
  • Unavailable files are handled more gracefully
  • Rich console output on Linux aarch64 machines
  • Debug support for forked Java processes
  • Improvements for plugin authors
  • Improvements for tooling providers

New in Gradle 5.6 RC 2 (Aug 7, 2019)

  • Faster Groovy compilation
  • Test fixtures for Java projects
  • Central management of plugin versions with settings script
  • Performance fix for using the Java library plugin in very large projects on Windows
  • Improved handling of ZIP archives on classpaths
  • Support for PMD incremental analysis
  • Executable Jar support with project.javaexec and JavaExec
  • File case changes when copying files on case-insensitive file systems are now handled correctly
  • Unavailable files are handled more gracefully
  • Fail the build on deprecation warnings
  • Rich console output on Linux aarch64 machines
  • Debug support for forked Java processes
  • Improvements for plugin authors
  • Improvements for tooling providers

New in Gradle 5.5.1 (Jul 11, 2019)

  • This bug-fix release contains three changes to Gradle 5.5
  • Combination of errorprone-gradle-plugin and options.fork = true causes Java compilation to fail in Gradle 5.5 #9897
  • Using dependency declaration gradleKotlinDsl() fails with 5.5 #9919
  • Chain of transitives aligned by same platform can lead to broken resolution #9882
  • We recommend that you use Gradle 5.5.1 over 5.5.
  • Upgrade Instructions
  • Switch your build to use Gradle 5.5.1 by updating your wrapper properties:
  • ./gradlew wrapper --gradle-version=5.5.1
  • Standalone downloads are available at https://gradle.org/install.

New in Gradle 5.3.1 (Mar 28, 2019)

  • This bug-fix release contains several changes to Gradle 5.3, notably:
  • Unable to use java-platform and maven-publish in multi-project: #8845
  • Unexpected exception when adding a plugin on buildSrc compile classpath: gradle/kotlin-dsl#1363

New in Gradle 5.3 (Mar 20, 2019)

  • This release features support for publishing and consuming Gradle Module Metadata, feature variants or "optional dependencies", type-safe accessors in Kotlin precompiled script plugins, and more.
  • Fixed issues:
  • [#8572] - Bogus example in checkstyle task documentation
  • [#5739] - Maven POM DSL: Support for Properties
  • [#8588] - Daemon GC expiration strategies are disabled on OpenJDK
  • [#8586] - Modifying a dependency in eachDependency() disables improved pom support
  • [#8553] - java-platform plugin breaks when mixed with other plugins
  • [#8533] - UnsupportedOperationException with Gradle 5.2.1 and Java 11 plugin
  • [#8518] - Clarify CompatibilityCheckDetails contract
  • [#8505] - Kotlin DSL 1.1.3 (Kotlin 1.3.20) / Gradle 5.2.1 not compatible with IBM JDK 8
  • [#8450] - File dependencies do not work for artifact transform dependencies
  • [#8449] - com.fasterxml.jackson.core:jackson-databind Security Vulnerabilities in Gradle 5.2
  • [#8446] - `Delete` tasks like :clean should provide a helpful message when unable to delete
  • [#8435] - ComponentSelectionReason#isExpected gives different results between Gradle 5.0 and 5.1
  • [#8428] - Improve error handling in case of capability conflict
  • [#8412] - Introduce API for identifying properties replaced by Provider API
  • [#8396] - Add a `JAVA_API_JARS` usage
  • [#8382] - Improve ambiguous transform selection error message
  • [#8380] - Epic: Road to Gradle metadata 1.0
  • [#8363] - Artifact transform selection is too broad
  • [#8354] - java.lang.OutOfMemoryError: Metaspace does not kill off daemon
  • [#8311] - Investigate and resolve high memory consumption of ConfigurationMetadata
  • [#8280] - Add overload to RepositoryHandler:google() to allow configuration via a closure
  • [#8191] - Repository dependency matching for mavenLocal
  • [#7862] - Make download events visible in 'info' log level
  • [#6547] - IDEA plugin resources dir should not overwrite sources dir
  • [#6478] - Delete task always follows symlinks on Windows
  • [#6341] - Webapp dependencies' jars are not deployed to an Eclipse managed Tomcat instance
  • [#4065] - project.delete deletes in symlinkd directories on Windows 10
  • [#3977] - Document version constraints
  • [#3117] - Gradle Build daemon crashes if the environment variables contain non-ASCII characters
  • [#1931] - `IncrementalTaskInputs` provide misleading information when working on ordered collections
  • [#1108] - How can I expand only a particular subdirectory of a zipTree?
  • [#867] - User can define optional features, which map to Maven's dependencies
  • [#8748] - StackOverflowError with 5.3-rc-2 when configuring sourceResources of Spring Boot's bootRun task
  • [#8725] - ClassCastException when module metadata is present in specific case
  • [#8721] - Transform disambiguation not leveraging schema disambiguation rules
  • [#8714] - Update DependencyHandler javadoc
  • [#8703] - Deadlock in DefaultIvyContextManager.createNewIvyInstance vs OutputEventRenderer.onOutput vs SystemProperties.getLineSeparator
  • [#8700] - Regression in Java usage disambiguation rules
  • [#8687] - 5.3-rc-1 generated kotlin code causes ktlint check to fail
  • [#8685] - An executionError from JUnitPlatform starting with Gradle 5.1
  • [#8424] - Java/JUnit: includeCategories does not include parameterized category test method

New in Gradle 5.3 RC3 (Mar 14, 2019)

  • StackOverflowError with 5.3-rc-2 when configuring sourceResources of Spring Boot's bootRun task
  • #8748

New in Gradle 5.3 RC2 (Mar 12, 2019)

  • This release candidate contains fixes for the following issues reported against 5.3 RC2:
  • #8424 - Fix filtering parameterized tests by category
  • #8685 - Fix JUnit platform handling of aborted containers with completed children
  • #8700 - Fix regression in Java usage disambiguation rules
  • #8703 - Remove synchronization around all system property getters causing deadlock
  • #8721 - Leverage schema disambiguation rules during transform disambiguation
  • #8725 - Fix ClassCastException when serializing integer attributes

New in Gradle 5.2.1 (Feb 18, 2019)

  • Bug fixes:
  • Checkstyle issues with a single source file: #8394
  • BOM support conflicts: #8420

New in Gradle 5.1.1 (Jan 11, 2019)

  • Bug fixes:
  • A daemon memory leak affecting all projects #8142
  • Incremental Java compilation #8194
  • A fix to Gradle's generated Javadoc in 5.1 #8183

New in Gradle 5.1 RC3 (Dec 24, 2018)

  • This release candidate contains fixes for the following issues reported against 5.1 RC2:
  • #8074 - Fix Spotbugs plugin incompatibility
  • #8077 - Fix incompatible change in behavior of FileTree filtering
  • #8078 - Wrapper task fails on Windows with 5.1

New in Gradle 5.1 RC2 (Dec 18, 2018)

  • This release candidate contains fixes for the following issues reported against 5.1 RC1:
  • #8036 - Remove history after no-source outputs have been cleaned
  • #8042 - Exclude virtual platform from resolution results

New in Gradle 5.0 (Nov 26, 2018)

  • Kotlin DSL 1.0
  • First and foremost, Gradle Kotlin DSL is now production-ready with it's 1.0 release! Authoring your build logic using Kotlin provides significant additional editing assistance in IDEs, including: improved completion, error highlighting, and refactoring tools. Please read our Gradle Kotlin DSL Primer and follow our migrating build logic from Groovy to Kotlin guide if you're interested. If you prefer the flexibility and dynamic features of Groovy, that's totally okay — the Groovy DSL will not be deprecated.
  • Kotlin DSL code completion Kotlin DSL error highlighting Kotlin DSL docs Kotlin DSL refactoring
  • Dependency version alignment
  • This version of Gradle introduces dependency version alignment. This allows different modules belonging to the same logical group (platform) to have identical versions in a dependency graph. Maven BOMs can be imported to define platforms as well.
  • dependencies {
  • // import a BOM. The versions used in this file will override any other version found in the graph
  • implementation(enforcedPlatform("org.springframework.boot:spring-boot-dependencies:1.5.8.RELEASE"))
  • // define dependencies without versions
  • implementation("com.google.code.gson:gson")
  • implementation("dom4j:dom4j")
  • // this version will be overriden by the one found in the BOM
  • implementation("org.codehaus.groovy:groovy:1.8.6")
  • More details about BOM import can be found in this section of the userguide.
  • Gradle build initialization features
  • gradle init functionality has been upgraded in this release: is now optionally interactive, includes new kotlin-library and kotlin-application project types, provides options for configuring project and package names, and more.
  • interactive gradle init
  • Interactive mode
  • If you run the init task from an interactive console, Gradle will prompt you for details of the Gradle build that you'd like to generate.
  • Kotlin library and applications
  • The init task can generate a Kotlin library or application, using the kotlin-library or kotlin-application setup type. This was one of our top 10 most voted issues. To try it out, just run gradle init and follow the prompts.
  • Generated builds use recommended configurations
  • The init task generates build scripts that use the recommended implementation, testImplementation, and testRuntimeOnly configurations instead of compile, testCompile, and testRuntime, respectively, for all build setup types.
  • Configure project and source package names
  • The init task provides a --project-name option to allow you to adjust the name of the generated project, and a --package option to allow you to adjust the package for the generated source. The task will also prompt you to configure these if you run the task interactively.
  • Create resource directories
  • The init task creates empty resource directories.
  • Create a .gitignore file
  • While the init task does not automatically create a Git repository, the init task generates a simple .gitignore file to make it easier for you to set up a Git repository. This .gitignore file ignores Gradle's build outputs.
  • Searchable documentation
  • Search for Gradle Docs is back. The kind folks at Algolia kindly host an index used to allow you to search the user manual and DSL reference.
  • Docsearch demo
  • Gradle API Javadocs now take advantage of Javadoc built-in autocomplete, making it easier to find classes and methods you're interested in.
  • Task timeouts
  • You can now specify a timeout duration for a task, after which it will be interrupted. Read more about task timeouts in the docs.
  • HTTP retries during dependency resolution
  • When Gradle attempts to connect to a remote repository via HTTP, if it fails, Gradle will retry before blacklisting the repository.
  • No extra configuration is needed. See the section on HTTP retries for more information.
  • Performance features
  • Gradle can be started as a low-priority process
  • You can now use the --priority low command line argument or org.gradle.priority=low property to start Gradle as a low priority process. This ensures that other applications like your IDE or browser stay responsive, even while a very demanding build is running.
  • Plural task output properties don't disable caching anymore
  • When using @OutputFiles or @OutputDirectories with an Iterable type, Gradle used to disable caching for the task with the following message:
  • Declares multiple output files for the single output property 'outputFiles' via @OutputFiles, @OutputDirectories or TaskOutputs.files()
  • This is no longer the case, and using such properties doesn't prevent the task from being cached. The only remaining reason to disable caching for the task is if the output contains file trees.
  • JaCoCo plugin now works with the build cache and parallel test execution
  • The JaCoCo plugin plugin now works seamlessly with the build cache. When applying the plugin with no extra configuration, the test task stays cacheable and parallel test execution can be used.
  • In order to make the tasks cacheable when generating execution data with append = true, the tasks running with code coverage are configured to delete the execution data just before they starts executing. In this way, stale execution data, which would cause non-repeatable task outputs, is removed.
  • Since Gradle now takes care of removing the execution data, the JacocoPluginExtension.append property has been deprecated. The JaCoCo agent is always configured with append = true, so it can be used when running tests in parallel.
  • Java 11 runtime support
  • Java enthusiasts will be happy to read that this release supports running Gradle builds with JDK 11.
  • Plugin authoring features
  • This release introduces useful changes for plugin and custom task authors, including an API for creating SourceDirectorySets, improvements to the Provider API, and improved build cache compatibility.
  • Public method to create SourceDirectorySet instances
  • The SourceDirectorySet type is often used by plugins to represent some set of source directories and files. Previously, it was only possible to create instances of SourceDirectorySet using internal Gradle types. This is problematic because when a plugin uses internal types it can often break when new versions of Gradle are released because internal types may change in breaking ways between releases.
  • In this release of Gradle, the ObjectFactory service, which is part of the public API, now includes a method to create SourceDirectorySet instances. Plugins can use this method instead of the internal types.
  • Provider implementations track their producer task
  • An important feature of the Provider API is that Provider instances can track both a value and the task or tasks that produces that value. When a Provider that represents an output of a task is connected to a Property instance that represents a task input, Gradle automatically adds task dependencies between the tasks. This eliminates a class of configuration problems where the location of a task input and the producing task dependencies are not kept in sync as configuration changes are made.
  • In this release, more Provider implementations track the tasks that produces the value of the provider:
  • Any provider returned by TaskContainer
  • Any property marked with @OutputFile, @OutputDirectory, @OutputFiles or @OutputDirectories.
  • Any List or Set property whose elements match these criteria.
  • Any provider returned by Provider.map() or flatMap() that matches these criteria.
  • Added Provider.flatMap() method
  • The flatMap() method allows you to apply a transformation to the values of an existing Provider without realizing the values of that Provider. It returns a new Provider object that is "live" (meaning it will reflect any changes to the values of the original Provider) but will return the transformed values when queried.
  • Added Property.finalizeValue() method
  • The property types have a finalizeValue() method which prevents further changes to the value of the property. This is useful in cases where the property needs to be queried and it would be unsafe to then change the value of the property later. After this method as been invoked, calls to methods that change the value of the property (such as set()) will result in an exception.
  • Task properties are made final before task executes
  • All task properties that use one of the property types have their value made final when the task executes. This prevents ordering issues where a task property is inadvertently changed after the task executes, resulting in the change having no effect. This will now result in an exception, alerting the user to the unintended error.
  • Changes to file and directory property construction
  • ObjectFactory is now used to create file and directory Property instances, similar to other Property types. Previously, this was done using either the methods on DefaultTask, which was available only for DefaultTask subclasses, or using ProjectLayout, only available for projects. Now a single type ObjectFactory can be used to create all property instances in a Gradle model object.
  • These other methods have been deprecated and will be removed in Gradle 6.0.
  • Gradle Native features
  • The Gradle Native project continues to improve and evolve the native ecosystem support for Gradle.
  • 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” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Some long existing incubating features have been promoted
  • all pre 4.0 incubating APIs have been promoted
  • parallel task execution
  • continuous build
  • composite build
  • the java-gradle-plugin plugin
  • the distribution plugin
  • the jacoco plugin
  • the build-init plugin
  • IncrementalTaskInputs and InputFileDetails
  • input normalization (org.gradle.normalization) including InputNormalizationHandler
  • FileNormalizer and its subclasses
  • @LocalState, Task.getLocalState() and TaskLocalState
  • Task.getDestroyables()
  • TaskState.getUpToDate() and TaskState.getNoSource()
  • the ValidateTaskProperties task
  • AbstractArchiveTask.preserveFileTimestamps and reproducibleFileOrder properties
  • ForkOptions.javaHome property
  • Project.normalization
  • GroovyCompile.groovyCompilerJvmVersion and javaToolChain properties
  • JavaVersion.VERSION_11 constant along with isJava11() and isJava11Compatible() methods
  • The --no-rebuild option is no longer deprecated
  • A change in buildSrc causes the whole project to become out-of-date. Thus, when making small incremental changes, the --no-rebuild command-line option is often helpful to get faster feedback and is therefore no longer deprecated.
  • Fixed issues
  • 166 issues have been fixed in Gradle 5.0.
  • [#6971] - Cache cleanup fails when gc.properties is owned by different user
  • [#6933] - Schema from named domain object containers changes during execution and exposes internal types
  • [#6907] - SelectorState.resolve invocation must always mark the state as resolved
  • [#6858] - Support GStrings in publishing pom-dsl
  • [#6822] - Improve realisation of ModuleComponentResolveMetadata for caching
  • [#6681] - Broken Links in Docs
  • [#6679] - Recent TestNG TestDescriptor event structure looks suspicious
  • [#6675] - Skipping empty selectors cause a new final state which can result in an NPE
  • [#6652] - Deprecate JDepend and FindBugs plugins
  • [#6641] - SourceTask should hide its `source` field from subclasses
  • [#6626] - aws-sdk regresion https://github.com/aws/aws-sdk-java/issues/1657 introduced on gradle 4.8.1
  • [#6625] - Upgrade default tool version of PMD
  • [#6624] - Upgrade default tool version of JaCoCo
  • [#6623] - Upgrade default tool version of CodeNarc
  • [#6622] - Upgrade default tool version of Checkstyle
  • [#6610] - Allow a single dependency to declare `require`, `strict` and `prefer` version constraints
  • [#6607] - ComponentSelectionRule is missing type-safe members
  • [#6604] - Add ability to revert a dependency from real to pending
  • [#6574] - `Manifest.from(mergePath, closure)` is missing an Action<T> taking overload
  • [#6572] - both plugins {} and pluginManagement {} blocks
  • [#6568] - Improve composability of component metadata rules
  • [#6543] - Checkstyle/FindBugs HTML report stylesheet does not support type-safe configuration
  • [#6537] - Separate compile and runtime dependencies of external modules with non-jar packaging
  • [#6519] - org.gradle.api.tasks.testing.Test::useTestNG does not have correct type signature
  • [#6447] - Optimization: consider `belongsTo` to build virtual platforms by default
  • [#6438] - Gradle uploadArchives removes api dependencies from generated Maven pom file
  • [#6436] - `tasks.getByName("wrapper")` succeeds but `tasks.named("wrapper")` fails
  • [#6432] - Unexpected parent dependency IllegalStateException when resolving with alignment rule
  • [#6404] - Introduce addArguments() and addJvmArguments() methods on LongRunningOperation
  • [#6385] - Make `IMPROVED_POM_SUPPORT` the default for Gradle 5.0
  • [#6384] - Print full path to configuration when logging about dependency locking
  • [#6383] - Improve dependency locking and IDE import interactions
  • [#6382] - Support `exclusions` defined in `dependencyManagement` for BOM dependencies
  • [#6369] - Gradle does not give an obvious error message when Maven credentials for maven-publish are null
  • [#6340] - Dependency locking changes resolved versions in the absence of any lock file
  • [#6312] - Update behavior of IdeaModel#sourceDirs
  • [#6306] - Remove --recompile-scripts
  • [#6304] - Remove --no-search-upward
  • [#6303] - Remove -Dtest.single and -Dtest.debug
  • [#6302] - Remove Test#testClassesDir
  • [#6301] - Remove org.gradle.readLoggingConfigFile
  • [#6300] - Remove Signature#setFile
  • [#6299] - Remove ScalaDoc#styleSheet
  • [#6298] - Remove ConfigurableReport#setDestination(Object)
  • [#6297] - Remove CompileOptions#bootClasspath(String)
  • [#6294] - Forbid using --source-path in raw compiler args
  • [#6293] - Remove JavaBasePlugin#configureForSourceSet
  • [#6292] - Remove get/setClassesDir from SourceSetOutput
  • [#6291] - Remove deprecated JavaLibrary constructor
  • [#6290] - Remove performPostEvaluationActions from Eclipse/IdeaPlugin
  • [#6289] - Forbid creating convention objects
  • [#6288] - Remove support for invalid domain object names
  • [#6287] - Remove support for nested build without a settings file
  • [#6286] - Remove org.gradle.util default import
  • [#6285] - Remove internal @Option annotations
  • [#6283] - Remove SimpleWorkResult
  • [#6282] - Fail when registering invalid inputs and outputs via TaskInputs and TaskOutputs methods
  • [#6281] - Remove LenientTaskInputsDeprecationSupport
  • [#6280] - Forbid using TaskInputs#file with something that isn't a file
  • [#6279] - Remove TaskDestroyables#file/files
  • [#6278] - Forbid removing a task when a Provider for that task is also in the dependencies
  • [#6277] - Remove task placeholders
  • [#6276] - Remove @DeferredConfigurable
  • [#6275] - Fail when passing null to CopySpec#from/into
  • [#6274] - Remove SimpleFileCollection
  • [#6273] - Remove UnionFileCollection/UnionFileTree#add
  • [#6272] - Remove FileVar/DirectoryVar/PropertyState and related methods
  • [#6271] - Remove AbstractFileCollect#getBuildDependencies
  • [#6270] - Remove deprecated casting of FileCollection
  • [#6269] - Remove FileCollection#stopExecutionIfEmpty
  • [#6268] - Remove BroadcastingCollectionEventRegister#getAddAction
  • [#6267] - Remove the ability to add non-directory-based file trees as declared outputs
  • [#6266] - Remove Task#leftShift
  • [#6265] - Remove deprecated methods for task execution
  • [#6264] - Remove JDepend#classesDir
  • [#6263] - Stop looking for Checkstyle config in subprojects by default
  • [#6262] - Remove DirectoryBuildCache#targetSizeInMb
  • [#6245] - JacocoPlugin forces various task configurations
  • [#6223] - Update default tool versions
  • [#6215] - Update 3rd party libraries
  • [#6197] - Error when compiling plugins as part of a composite build (Gradle 4.9)
  • [#6168] - Javadoc and Groovydoc tasks don't clean their output directories
  • [#6155] - Gradle should not try to download jars for plugin marker artifacts
  • [#6108] - Default value provided by ObjectFactory.property is inconsistent with Property.getOrElse behavior
  • [#6036] - Mapped `Provider` should correctly delegate `Task` dependencies
  • [#5939] - Continuous build adds significant overhead
  • [#5845] - Support for dependency locking in the build script
  • [#5838] - Make TestKit always search-upwards like all Gradle builds do
  • [#5706] - Property.map {} types do not carry task dependencies when used as inputs to another task
  • [#5695] - JavaLibraryDistributionPlugin seems bugged
  • [#5549] - buildSrc configurations are resolved too early
  • [#5546] - Settings does not implement ExtensionAware
  • [#5510] - Task with a doLast block using a lambda is never up-to-date
  • [#5475] - Do not run a task from an include build more than once
  • [#5434] - Improved pom support gives unexpected importance to versions of optional dependencies
  • [#5269] - Support the build cache and parallel test execution with the JaCoCo plugin applied
  • [#4875] - Feature request: Consider adding flatMap to org.gradle.api.provider.Provider
  • [#4701] - Allow incremental annotation processors to read resources
  • [#4543] - 4.6: Using BOM import results in generating invalid pom
  • [#3811] - Provider and Property APIs implicit task dependency inference does not work when creating instance with injected ProjectLayout
  • [#3722] - Publish valid Maven POM for library with dependency on Maven BOM
  • [#3221] - Calling SourceSetContainer#create with an empty string throws confusing exception
  • [#2759] - gradle init should create all conventional directories
  • [#1877] - BuildInit: Generate java/groovy/scala into a package folder
  • [#1812] - Allow importing BOMs as force constraints
  • [#1673] - Build init plugin should support creating Kotlin applications and libraries
  • [#1096] - Add a timeout as a generic feature of a task.
  • [#7555] - Upgrade to ASM 7
  • [#7497] - Improve platform alignment and substitution interactions
  • [#7491] - GRADLE_OPTS documentation in build environment is misleading
  • [#7385] - Limit Metaspace used by Gradle
  • [#7378] - Javadoc does not show method names
  • [#7329] - Failure from BuildListener are ignored
  • [#7323] - Remove support for changing a worker's working directory
  • [#7069] - Fix deploying to AWS S3 backed repositories on Java 11
  • [#7060] - Dependency remains in graph when only constraints reference it
  • [#7050] - Conflict resolution can be bypassed, resulting in arbitrary version chosen
  • [#7016] - BuildScanPlugin.kt's system() call does not return if process produces lots of output on Windows
  • [#7009] - Gradle 5.0-milestone-1 throws an exception when accessing properties in settings.gradle
  • [#6997] - Gradle 5.0-milestone-1 can't resolve some plugin portal plugins
  • [#6968] - Undeprecate --no-rebuild and document its usefulness when working on buildSrc
  • [#6967] - Remove support for old Gradle versions in TAPI
  • [#6900] - Can't fail build in gradle.taskGraph.whenReady(Action)
  • [#6879] - Change auto-applied build scan plugin to 2.0
  • [#6817] - Fail when competing force target a virtual platform
  • [#6787] - The Callable of a Provider get called multiple times when set to an Property in a Task
  • [#6771] - Unincubate all pre-4.x APIs
  • [#6725] - Gradle 4.10: Illegal reflective access to method java.lang.Object.finalize()
  • [#6573] - javac: Should not strip `-processorpath` if there are `-Xplugin:`
  • [#6547] - IDEA plugin resources dir should not overwrite sources dir
  • [#6531] - Fall back to simple test discovery if ASM fails
  • [#6442] - Include Kotlin DSL samples in all user manual chapters
  • [#6371] - Periodic Cache Clearing breaks Gradle Wrapper for long periods of idle
  • [#6296] - Stop using annotation processors from the compile classpath
  • [#6295] - Forbid specifying -processorpath in the raw compiler args
  • [#6259] - BuildProfile not initialised as expected
  • [#6227] - Support annotationProcessor in IDEA
  • [#6216] - Reduce default memory settings for daemon and workers
  • [#6213] - Remove deprecated features for Gradle 5.0
  • [#5120] - Java 11 support
  • [#4629] - Retry HTTP connections to remote repositories during dependency resolution
  • [#4422] - Syntax for using a Maven bom is confusing
  • [#4355] - De-incubate continuous build
  • [#4166] - If the task is non-incremental, not all files in a directory are reported as outOfDate
  • [#3925] - Lockable `Property` concept should be part of the public API
  • [#2882] - Deploying timestamped snapshots to Maven 2 repositories does not produce/update the maven-metadata.xml files properly
  • [#2657] - SLF4J ClassCastException when testing with custom system ClassLoader or Java 9+
  • [#1933] - Remove deprecated public methods in 'tooling-api` module
  • [#1606] - Start Gradle as lower priority process
  • [#1162] - Consumption of Maven BOMs
  • [#719] - [Epic] Java 9 runtime support
  • [#7650] - Gradle 5.0 RC1 doesn't build my composite build anymore.
  • [#7597] - Missing include paths for macOS frameworks
  • [#7586] - Upgrade Kotlin DSL to 1.0
  • [#7580] - Regression in 5.0-rc-1: error during configuration
  • [#7708] - 5.0-rc-2: Tooling API cannot open buildSrc
  • [#7711] - Upgrade to Groovy 2.5.4
  • [#7811] - NoDaemon Java11 Openjdk Windows (persistentCache) fails on release branch
  • [#7793] - Init for Kotlin and Groovy lib/app respectively use outdated Kotlin and Groovy version
  • [#7787] - Gradle 5.0-rc-4 exponential backoff makes IDE import very slow
  • [#7784] - FileCollection is evaluated early in Gradle 5.0-rc4
  • [#7057] - UrlRepositoryDescriptor throws NPE in case of null URL
  • [#6307] - Review Upgrade from Gradle 4.x chapter for dependency management topics
  • [#5948] - Document alignment/platform backlinks
  • [#5622] - Dependency constraints are missing from the DSL reference
  • [#4377] - Document Configuration.withDependencies

New in Gradle 5.0 RC5 (Nov 23, 2018)

  • This release candidate contains fixes for the following issues reported against 5.0 RC4:
  • #7813 Catch Exception instead of Throwable in dependency-management
  • #7792 Fix for starting a single-use daemon when client has low memory
  • #7796 Let init use the same Groovy version as embedded for Groovy DSL
  • #7795 Let init use the same Kotlin version as embedded for Kotlin DSL

New in Gradle 5.0 RC3 (Nov 15, 2018)

  • Fixed issues:
  • 161 issues have been fixed in Gradle 5.0.
  • [#6971] - Cache cleanup fails when gc.properties is owned by different user
  • [#6933] - Schema from named domain object containers changes during execution and exposes internal types
  • [#6907] - SelectorState.resolve invocation must always mark the state as resolved
  • [#6858] - Support GStrings in publishing pom-dsl
  • [#6822] - Improve realisation of ModuleComponentResolveMetadata for caching
  • [#6681] - Broken Links in Docs
  • [#6679] - Recent TestNG TestDescriptor event structure looks suspicious
  • [#6675] - Skipping empty selectors cause a new final state which can result in an NPE
  • [#6652] - Deprecate JDepend and FindBugs plugins
  • [#6641] - SourceTask should hide its `source` field from subclasses
  • [#6626] - aws-sdk regresion https://github.com/aws/aws-sdk-java/issues/1657 introduced on gradle 4.8.1
  • [#6625] - Upgrade default tool version of PMD
  • [#6624] - Upgrade default tool version of JaCoCo
  • [#6623] - Upgrade default tool version of CodeNarc
  • [#6622] - Upgrade default tool version of Checkstyle
  • [#6610] - Allow a single dependency to declare `require`, `strict` and `prefer` version constraints
  • [#6607] - ComponentSelectionRule is missing type-safe members
  • [#6604] - Add ability to revert a dependency from real to pending
  • [#6574] - `Manifest.from(mergePath, closure)` is missing an Action<T> taking overload
  • [#6572] - both plugins {} and pluginManagement {} blocks
  • [#6568] - Improve composability of component metadata rules
  • [#6543] - Checkstyle/FindBugs HTML report stylesheet does not support type-safe configuration
  • [#6537] - Separate compile and runtime dependencies of external modules with non-jar packaging
  • [#6519] - org.gradle.api.tasks.testing.Test::useTestNG does not have correct type signature
  • [#6447] - Optimization: consider `belongsTo` to build virtual platforms by default
  • [#6438] - Gradle uploadArchives removes api dependencies from generated Maven pom file
  • [#6436] - `tasks.getByName("wrapper")` succeeds but `tasks.named("wrapper")` fails
  • [#6432] - Unexpected parent dependency IllegalStateException when resolving with alignment rule
  • [#6404] - Introduce addArguments() and addJvmArguments() methods on LongRunningOperation
  • [#6385] - Make `IMPROVED_POM_SUPPORT` the default for Gradle 5.0
  • [#6384] - Print full path to configuration when logging about dependency locking
  • [#6383] - Improve dependency locking and IDE import interactions
  • [#6382] - Support `exclusions` defined in `dependencyManagement` for BOM dependencies
  • [#6369] - Gradle does not give an obvious error message when Maven credentials for maven-publish are null
  • [#6340] - Dependency locking changes resolved versions in the absence of any lock file
  • [#6312] - Update behavior of IdeaModel#sourceDirs
  • [#6306] - Remove --recompile-scripts
  • [#6304] - Remove --no-search-upward
  • [#6303] - Remove -Dtest.single and -Dtest.debug
  • [#6302] - Remove Test#testClassesDir
  • [#6301] - Remove org.gradle.readLoggingConfigFile
  • [#6300] - Remove Signature#setFile
  • [#6299] - Remove ScalaDoc#styleSheet
  • [#6298] - Remove ConfigurableReport#setDestination(Object)
  • [#6297] - Remove CompileOptions#bootClasspath(String)
  • [#6294] - Forbid using --source-path in raw compiler args
  • [#6293] - Remove JavaBasePlugin#configureForSourceSet
  • [#6292] - Remove get/setClassesDir from SourceSetOutput
  • [#6291] - Remove deprecated JavaLibrary constructor
  • [#6290] - Remove performPostEvaluationActions from Eclipse/IdeaPlugin
  • [#6289] - Forbid creating convention objects
  • [#6288] - Remove support for invalid domain object names
  • [#6287] - Remove support for nested build without a settings file
  • [#6286] - Remove org.gradle.util default import
  • [#6285] - Remove internal @Option annotations
  • [#6283] - Remove SimpleWorkResult
  • [#6282] - Fail when registering invalid inputs and outputs via TaskInputs and TaskOutputs methods
  • [#6281] - Remove LenientTaskInputsDeprecationSupport
  • [#6280] - Forbid using TaskInputs#file with something that isn't a file
  • [#6279] - Remove TaskDestroyables#file/files
  • [#6278] - Forbid removing a task when a Provider for that task is also in the dependencies
  • [#6277] - Remove task placeholders
  • [#6276] - Remove @DeferredConfigurable
  • [#6275] - Fail when passing null to CopySpec#from/into
  • [#6274] - Remove SimpleFileCollection
  • [#6273] - Remove UnionFileCollection/UnionFileTree#add
  • [#6272] - Remove FileVar/DirectoryVar/PropertyState and related methods
  • [#6271] - Remove AbstractFileCollect#getBuildDependencies
  • [#6270] - Remove deprecated casting of FileCollection
  • [#6269] - Remove FileCollection#stopExecutionIfEmpty
  • [#6268] - Remove BroadcastingCollectionEventRegister#getAddAction
  • [#6267] - Remove the ability to add non-directory-based file trees as declared outputs
  • [#6266] - Remove Task#leftShift
  • [#6265] - Remove deprecated methods for task execution
  • [#6264] - Remove JDepend#classesDir
  • [#6263] - Stop looking for Checkstyle config in subprojects by default
  • [#6262] - Remove DirectoryBuildCache#targetSizeInMb
  • [#6245] - JacocoPlugin forces various task configurations
  • [#6223] - Update default tool versions
  • [#6215] - Update 3rd party libraries
  • [#6197] - Error when compiling plugins as part of a composite build (Gradle 4.9)
  • [#6168] - Javadoc and Groovydoc tasks don't clean their output directories
  • [#6155] - Gradle should not try to download jars for plugin marker artifacts
  • [#6108] - Default value provided by ObjectFactory.property is inconsistent with Property.getOrElse behavior
  • [#6036] - Mapped `Provider` should correctly delegate `Task` dependencies
  • [#5939] - Continuous build adds significant overhead
  • [#5845] - Support for dependency locking in the build script
  • [#5838] - Make TestKit always search-upwards like all Gradle builds do
  • [#5706] - Property.map {} types do not carry task dependencies when used as inputs to another task
  • [#5695] - JavaLibraryDistributionPlugin seems bugged
  • [#5549] - buildSrc configurations are resolved too early
  • [#5546] - Settings does not implement ExtensionAware
  • [#5510] - Task with a doLast block using a lambda is never up-to-date
  • [#5475] - Do not run a task from an include build more than once
  • [#5434] - Improved pom support gives unexpected importance to versions of optional dependencies
  • [#5269] - Support the build cache and parallel test execution with the JaCoCo plugin applied
  • [#4875] - Feature request: Consider adding flatMap to org.gradle.api.provider.Provider
  • [#4701] - Allow incremental annotation processors to read resources
  • [#4543] - 4.6: Using BOM import results in generating invalid pom
  • [#3811] - Provider and Property APIs implicit task dependency inference does not work when creating instance with injected ProjectLayout
  • [#3722] - Publish valid Maven POM for library with dependency on Maven BOM
  • [#3221] - Calling SourceSetContainer#create with an empty string throws confusing exception
  • [#2759] - gradle init should create all conventional directories
  • [#1877] - BuildInit: Generate java/groovy/scala into a package folder
  • [#1812] - Allow importing BOMs as force constraints
  • [#1673] - Build init plugin should support creating Kotlin applications and libraries
  • [#1096] - Add a timeout as a generic feature of a task.
  • [#7555] - Upgrade to ASM 7
  • [#7497] - Improve platform alignment and substitution interactions
  • [#7491] - GRADLE_OPTS documentation in build environment is misleading
  • [#7385] - Limit Metaspace used by Gradle
  • [#7378] - Javadoc does not show method names
  • [#7329] - Failure from BuildListener are ignored
  • [#7323] - Remove support for changing a worker's working directory
  • [#7069] - Fix deploying to AWS S3 backed repositories on Java 11
  • [#7060] - Dependency remains in graph when only constraints reference it
  • [#7050] - Conflict resolution can be bypassed, resulting in arbitrary version chosen
  • [#7016] - BuildScanPlugin.kt's system() call does not return if process produces lots of output on Windows
  • [#7009] - Gradle 5.0-milestone-1 throws an exception when accessing properties in settings.gradle
  • [#6997] - Gradle 5.0-milestone-1 can't resolve some plugin portal plugins
  • [#6968] - Undeprecate --no-rebuild and document its usefulness when working on buildSrc
  • [#6967] - Remove support for old Gradle versions in TAPI
  • [#6900] - Can't fail build in gradle.taskGraph.whenReady(Action)
  • [#6879] - Change auto-applied build scan plugin to 2.0
  • [#6817] - Fail when competing force target a virtual platform
  • [#6787] - The Callable of a Provider get called multiple times when set to an Property in a Task
  • [#6771] - Unincubate all pre-4.x APIs
  • [#6725] - Gradle 4.10: Illegal reflective access to method java.lang.Object.finalize()
  • [#6573] - javac: Should not strip `-processorpath` if there are `-Xplugin:`
  • [#6547] - IDEA plugin resources dir should not overwrite sources dir
  • [#6531] - Fall back to simple test discovery if ASM fails
  • [#6442] - Include Kotlin DSL samples in all user manual chapters
  • [#6371] - Periodic Cache Clearing breaks Gradle Wrapper for long periods of idle
  • [#6296] - Stop using annotation processors from the compile classpath
  • [#6295] - Forbid specifying -processorpath in the raw compiler args
  • [#6259] - BuildProfile not initialised as expected
  • [#6227] - Support annotationProcessor in IDEA
  • [#6216] - Reduce default memory settings for daemon and workers
  • [#6213] - Remove deprecated features for Gradle 5.0
  • [#5120] - Java 11 support
  • [#4629] - Retry HTTP connections to remote repositories during dependency resolution
  • [#4422] - Syntax for using a Maven bom is confusing
  • [#4355] - De-incubate continuous build
  • [#4166] - If the task is non-incremental, not all files in a directory are reported as outOfDate
  • [#3925] - Lockable `Property` concept should be part of the public API
  • [#2882] - Deploying timestamped snapshots to Maven 2 repositories does not produce/update the maven-metadata.xml files properly
  • [#2657] - SLF4J ClassCastException when testing with custom system ClassLoader or Java 9+
  • [#1933] - Remove deprecated public methods in 'tooling-api` module
  • [#1606] - Start Gradle as lower priority process
  • [#1162] - Consumption of Maven BOMs
  • [#719] - [Epic] Java 9 runtime support
  • [#7650] - Gradle 5.0 RC1 doesn't build my composite build anymore.
  • [#7597] - Missing include paths for macOS frameworks
  • [#7586] - Upgrade Kotlin DSL to 1.0
  • [#7580] - Regression in 5.0-rc-1: error during configuration
  • [#7708] - 5.0-rc-2: Tooling API cannot open buildSrc
  • [#7057] - UrlRepositoryDescriptor throws NPE in case of null URL
  • [#6307] - Review Upgrade from Gradle 4.x chapter for dependency management topics
  • [#5948] - Document alignment/platform backlinks
  • [#5622] - Dependency constraints are missing from the DSL reference
  • [#4377] - Document Configuration.withDependencies

New in Gradle 5.0 RC1 (Oct 31, 2018)

  • This release features a production-ready Kotlin DSL, dependency version alignment (similar to and usable with Maven BOMs), task timeouts, Java 11 support, and more.
  • Kotlin DSL 1.0:
  • First and foremost, Gradle Kotlin DSL is now production-ready with it's 1.0 release! Authoring your build logic using Kotlin provides significant additional editing assistance in IDEs, including: improved completion, error highlighting, and refactoring tools. Please read our Gradle Kotlin DSL Primer and follow our migrating build logic from Groovy to Kotlin guide if you're interested. If you prefer the flexibility and dynamic features of Groovy, that's totally okay — the Groovy DSL will not be deprecated.
  • Dependency version alignment:
  • This version of Gradle introduces dependency version alignment. This allows different modules belonging to the same logical group (platform) to have identical versions in a dependency graph. Maven BOMs can be imported to define platforms as well.
  • Gradle build initialization features:
  • gradle init functionality has been upgraded in this release: is now optionally interactive, includes new kotlin-library and kotlin-application project types, provides options for configuring project and package names, and more.
  • Searchable documentation:
  • Search for Gradle Docs is back. The kind folks at Algolia kindly host an index used to allow you to search the user manual and DSL reference.
  • Gradle API Javadocs now take advantage of Javadoc built-in autocomplete, making it easier to find classes and methods you're interested in.
  • Task timeouts:
  • You can now specify a timeout duration for a task, after which it will be interrupted. Read more about task timeouts in the docs.
  • Performance features:
  • Gradle can now be started as a low-prority process. This ensures that other applications like your IDE or browser stay responsive, even while a very demanding build is running.
  • When using @OutputFiles or @OutputDirectories with an Iterable type, Gradle used to disable caching for the task. This is no longer the case, and using such properties doesn't prevent the task from being cached. The only remaining reason to disable caching for the task is if the output contains file trees.
  • The JaCoCo plugin plugin now works seamlessly with the build cache. When applying the plugin with no extra configuration, the test task stays cacheable and parallel test execution can be used.

New in Gradle 5.0 Milestone 1 (Oct 4, 2018)

  • The Gradle team is pleased to announce Gradle 5.0 Milestone 1.
  • We are excited to share some great new features and improvements with you in this release:
  • First and foremost, Gradle Kotlin DSL is now production-ready with it's 1.0 release! Authoring your build logic using Kotlin provides significant additional editing assistance in IDEs, including: improved completion, error highlighting, and refactoring tools. Please follow our migrating build logic from Groovy to Kotlin guide if you're interested. If you prefer the flexibility and dynamic nature of Groovy, that's totally okay — the Groovy DSL will never be deprecated.
  • You can now specify a timeout duration for a task, after which it will be interrupted. Read more about task timeouts in the docs.
  • Next up, this version of Gradle introduces dependency version alignment. This allows different modules belonging to the same logical group (platform) to have identical versions in a dependency graph. Maven BOMs can be imported to define platforms as well.
  • Moving on, gradle init functionality has been upgraded in this release: is now optionally interactive, includes new kotlin-library and kotlin-application project types, provides options for configuring project and package names, and more.
  • This release introduces useful changes for plugin and custom task authors, including an API for creating SourceDirectorySets, improvements to the Provider API, and improved build cache compatibility.
  • Finally, because this is a new major version of Gradle, many of the things that were deprecated in the Gradle 4.x versions have been removed. For example, running Gradle now requires Java 8 or higher (though tests can be run using Java 6 or 7).

New in Gradle 4.10.2 (Sep 20, 2018)

  • Dependent module Scala compilation in test context fails for 4.10.1 #6735
  • Gradle fails to resolve project dependencies against Scala projects #6750
  • Candidate set provided to AttributeDisambiguationRule contains null entry #6747

New in Gradle 4.10.1 (Sep 12, 2018)

  • This bug-fix release addresses 6 regressions in Gradle 4.10
  • FileTreeElement.getPath() returns absolute system dependent filepath.
  • Up-to-date checks for missing files can be incorrect
  • Gradle fails when no incremental compile snapshot data available.
  • Gradle 4.10 incorrect ordering between dependencies of dependent tasks.
  • tasks.withType(ScalaCompileclass.java).configureEach fails on multi-project builds.
  • Double deprecation message when using publishing plugin.

New in Gradle 4.10 (Aug 28, 2018)

  • The Gradle team is pleased to announce Gradle 4.10. This is a big release.
  • First and foremost, this release of Gradle features an improved incremental Java compiler, now enabled by default.
  • This will result in significantly reduced Java compilation time in subsequent builds when outputs are not up-to-date or resolved from the build cache.
  • Chances are caches in those .gradle/ directories have accumulated a few (or a few dozen) gigabytes over time.
  • If so, you'll be relieved to know that Gradle will now periodically clean up unused /caches under GRADLE_USER_HOME and project root directories.
  • A moment you have anticipated is nearly here, as the Kotlin DSL reaches version 1.0 RC3.
  • Configuration avoidance, buildSrc refactoring propagation to the IDE, and lots of DSL polish make this the release to try.
  • Gradle Kotlin DSL 1.0 will ship with the next version of Gradle, 5.0.
  • Read this blog post for guidance on trying the Kotlin DSL and submitting feedback.
  • You can now use SNAPSHOT plugin versions with the plugins {} and pluginManagement {} blocks.
  • This is especially good news for Kotlin DSL users, who will get code assistance and auto-completion for these SNAPSHOT plugins.
  • Special thanks to Sébastien Deleuze for contributing.
  • Last but not least, included builds can now be nested.
  • This makes some common workflows more convenient, such as working on multiple source repositories at the same time to implement a cross-cutting feature.
  • We hope you will build happiness with Gradle 4.10, and we look forward to your feedback via Twitter or on GitHub.

New in Gradle 4.10 RC 2 (Aug 16, 2018)

  • This release candidate contains fixes for the following issues reported against 4.10 RC1:
  • #6319 project.afterEvaluate can't be called from plugin.apply.
  • #6337 Invalid version resolved for 1.+ when dependency locking is enabled.
  • #6354 Cache cleanup deletes entries currently being created by another process.
  • Upgrade Kotlin DSL 1.0-rc-1 to 1.0-rc-3. See the Kotlin DSL release notes for changes.

New in Gradle 4.10 RC 1 (Aug 9, 2018)

  • First and foremost, this release of Gradle features an improved incremental Java compiler, now enabled by default. This will result in significantly reduced Java compilation time in subsequent builds when outputs are not up-to-date or resolved from the build cache.
  • Chances are caches in those .gradle/ directories have accumulated a few (or a few dozen) gigabytes over time. If so, you'll be relieved to know that Gradle will now periodically clean up unused /caches under GRADLE_USER_ HOME and project root directories.
  • A moment you have anticipated is nearly here, as the Kotlin DSL reaches version 1.0 RC1. Configuration avoidance, buildSrc refactoring propagation to the IDE, and lots of DSL polish make this the release to try. Gradle Kotlin DSL 1.0 will ship with the next version of Gradle. Please give it a go and file issues in the gradle/kotlin-dsl project. If you are interested in using the Kotlin DSL, please check out the Gradle guides, especially the Groovy DSL to Kotlin DSL migration guide.
  • You can now use SNAPSHOT plugin versions with the plugins {} and pluginManagement {} blocks. This is especially good news for Kotlin DSL users, who will get code assistance and auto-completion for these SNAPSHOT plugins. Special thanks to Sébastien Deleuze for contributing.
  • Last but not least, included builds can now be nested. This makes some common workflows more convenient, such as working on multiple source repositories at the same time to implement a cross-cutting feature.

New in Gradle 4.9 (Jul 17, 2018)

  • The Gradle team is pleased to announce Gradle 4.9.
  • First, publishing tools get some more love: projects that publish auxiliary publications (e.g. test fixtures) through maven-publish and ivy-publish can now be depended upon by other projects in the same build. There is also a new Publishing Overview chapter in the user manual and updates throughout the documentation regarding publishing artifacts using Maven and Ivy.
  • In addition to lazy tasks use, Kotlin DSL build scripts are evaluated faster with version 0.18.4, included in this version of Gradle. IntelliJ IDEA and Android Studio user experience is also improved.
  • See details in the Kotlin DSL v0.18.x release notes.
  • You can now pass arguments to JavaExec tasks directly from the command-line using --args:
  • ❯ gradle run --args 'foo --bar'
  • No more need to hard-code arguments in your build scripts. Consult the documentation for the Application Plugin for more information.
  • Last but not least, this version of Gradle has an improved dependency insight report. Read the details further on.

New in Gradle 4.9 RC2 (Jul 11, 2018)

  • This release candidate contains fixes for the following issues reported against 4.9 RC1:
  • #5925 Resolution result ordering is non-deterministic in the presence of capability conflicts
  • #5909 Ignore dependency locking during build dependency resolution phase
  • #5856 Emit build operations for early executed artifact transforms
  • #5876 Console sometimes shows WAITING as the build status just prior to starting task execution
  • #5871 Composite builds Kotlin DSL sample hangs with 4.9-rc-1
  • #5848 NPE during incremental annotations processing with error-prone plugin
  • #5882 Cannot inject a RepositoryResourceAccessor for flatdir repositories
  • #5853 Allow ProjectBuilder tests when classpath contains relative paths

New in Gradle 4.9 RC1 (Jul 4, 2018)

  • Fixed issues:
  • [#5772] - Build operations for task registration/creation are emitted by default
  • [#5771] - Gradle 4.8+ fails with NotSerializableException on Intellij IDEA project import
  • [#5750] - Default "**/*.java" include filter added to Java compilation tasks in Gradle 4.8
  • [#5724] - Gradle Includes Vulnerable XercesImpl Jar. Upgrade when patched version available on Maven Central.
  • [#5714] - Do not compile or execute a build script when there is a failure building the build script classpath
  • [#5646] - Creating a task inside configureEach causes CME
  • [#5638] - Remove @Incubating annotations from publishing types
  • [#5583] - Project configuration build operations are no longer nested
  • [#5565] - Enable injection of RepositoryResourceAccessor in ComponentMetadataRule
  • [#5541] - Reduce memory used in FileUtils#calculateRoots
  • [#5529] - 4.8-rc1 introduced new illegal reflective access operation
  • [#5526] - Add caching support to ComponentMetadataRule
  • [#5505] - gradle distribution depends on jackson-databind version 2.8.11 which has insecure deserialization vulnerability (CVE-2018-5968)
  • [#5473] - Allow an included build to use file collection dependencies
  • [#5379] - Broken link in docs despite looking correct in adoc
  • [#5311] - Introduce Publishing chapter in User Guide
  • [#5305] - TestWorker fails to catch SecurityException when calling System.setSecurityManager
  • [#5278] - ClassCastException when generating Eclipse files for Gradle
  • [#5207] - Why do javadoc tasks of depending projects depend on each other?
  • [#5091] - Removing project .gradle directory disproportionately degrades buildSrc performance
  • [#4960] - Recompile instead of failing when annotation processors violate the incremental contract
  • [#4895] - Included build failure does not break the build
  • [#4370] - Composite build failures are reported incorrectly for dependency on different subprojects of an included build
  • [#3490] - A failure in an included build should be reported at the end of logging output
  • [#1743] - The application plugin's "run" task should be able to take program arguments
  • [#1061] - Publishing is not able to resolve a dependency on a project with multiple different publications

New in Gradle 4.8.1 (Jun 21, 2018)

  • This bug-fix release addresses 6 regressions in Gradle 4.8:
  • #5740: Maven Central dropped support for older TLS implementations. This makes the dependency resolution fail if the Gradle build runs on JDK 7.
  • #5701: Gradle 4.8 broke compatibility with the artifactory and bintray publishing plugins.
  • #5708: Gradle 4.8 sometimes fails with ConcurrentModificationException when project.tasks.withType() is used.
  • #5729: The dependency resolution engine sometimes fails with "Unexpected parent dependency" message, which became more apparent in Gradle 4.8.
  • #5722: Gradle 4.8 broke the ability of the SourceSet to override the compile tasks' destination directory.
  • #5692: Gradle 4.8 doesn't consider versions equal when using dependencySubstitution and failOnVersionConflict.

New in Gradle 4.8 (Jun 4, 2018)

  • The publishing plugins get some highly-anticipated improvements in this release:
  • The Signing Plugin now supports signing all artifacts of a publication.
  • The Maven Publish Plugin now provides a dedicated, type-safe DSL to customize the POM generated as part of a Maven publication.
  • The Ivy Publish Plugin now provides a dedicated, type-safe DSL to customize the Ivy module descriptor generated as part of an Ivy publication.
  • Configuration-wide dependency excludes are now published
  • The maven-publish and ivy-publish plugins are now considered stable and use of the maven plugin is discouraged as it will eventually be deprecated — please migrate.
  • User experience for incremental annotation processing is improved.
  • Compilation will no longer fail when a processor does something that Gradle detects will not work incrementally.
  • Unused non-incremental processors no longer prevent incremental compilation.
  • Finally, annotation processors are now able to decide dynamically if they are incremental or not.
  • This allows processors with extension mechanisms to check extensions for incrementality before enabling incremental annotation processing.
  • New native plugins continue to improve with better control over system include path for native compilation and other improvements.
  • Gradle 4.8 includes Kotlin DSL 0.17.5, bringing the latest Kotlin 1.2.41 release and many improvements to the user experience including location aware runtime error reporting, convenient configuration of nested extensions, faster and leaner configuration time, and TestKit support.
  • At the same time the IntelliJ IDEA Kotlin Plugin fixed many long standing build script editing related issues.

New in Gradle 4.8 RC3 (Jun 4, 2018)

  • This release candidate contains fixes for the following issues reported against 4.8 RC2:
  • #5570 Revert behavior around task removal from the container
  • #5564 Nag users only once about stable_publishing flag
  • #5550 Put DeferredConfigurable back in place
  • #5552 Do not run the action provided to tasks.all() more than once

New in Gradle 4.8 RC1 (May 16, 2018)

  • Fixed issues:
  • [#5413] - Dependency locking does not work with unique SNAPSHOT modules
  • [#5396] - Regression: `Task.execute()` fails with NPE when task is constructed via `ProjectBuilder`
  • [#5366] - Remove exception path in LockFileReaderWriter constructor
  • [#5364] - Behavior of force flag has changed in Gradle 4.7
  • [#5359] - Zip task is deleting out-dated zip but not creating new one with gradle 4.7
  • [#5354] - Include dependency locking in command-line interface chapter
  • [#5351] - Project dependencies should work in builds run using `GradleBuild` task
  • [#5347] - Build scan does not work with Play hot reload in Gradle 4.7
  • [#5343] - Dependencies task output for a composite build doesn't show expected project name
  • [#5244] - Document how to use the Ivy/Maven Publish Plugins to publish a distribution
  • [#5167] - Refreshing an including build in IntelliJ IDEA 2016.1.4 does not work with 4.8 anymore
  • [#5149] - Apply naming and style conventions to ivy-publish, maven-publish, and signing plugin chapters
  • [#5148] - Breaking change after lazy task creation
  • [#5116] - Document how to reference/disable certain publishing tasks
  • [#5099] - Disabling the Sign task should not break publishing
  • [#5097] - Document how to publish additional artifacts using the publishing plugins
  • [#5096] - Document how to disable signing for snapshots/local builds
  • [#5095] - Document how to publish snapshots and releases in a different repositories using the maven-publish plugin
  • [#5094] - Document how to publish a Java library to Maven Central (including javadoc, sources, and required POM info) using the maven-publish plugin
  • [#5093] - Sign tasks should have a description
  • [#5090] - init scripts from custom distributions are sometimes ignored
  • [#5035] - Configuration-wide excludes should be represented in published Gradle metadata file
  • [#5034] - Configuration-wide excludes should be represented in published POM
  • [#4998] - Create publishing tasks without model rules
  • [#4997] - Remove DeferredConfigurable
  • [#4996] - Make IvyPublication and IvyArtifact lazy
  • [#4995] - Make MavenPublication and MavenArtifact lazy
  • [#4980] - The Sign task should have the signature files as output
  • [#4961] - Incrementally compile if non-incremental processors are never used
  • [#4946] - Spike removal of DeferredConfigurable concept
  • [#4945] - Make PublishingExtension behave like other extension objects
  • [#4943] - Support signing publications
  • [#4942] - Use Maven 3 repository layout
  • [#4939] - Mark maven-publish and ivy-publish as stable
  • [#4938] - Set up Java 11 test stage
  • [#4935] - CompileJava does not delete generated sources
  • [#4931] - UndeclaredThrowableException with JDK 9 or JDK 10
  • [#4924] - Changing test framework-specific properties should mark test task out-of-date
  • [#4915] - Allow Annotation processor to declare incremental behavior dynamically
  • [#4900] - Have build cache respect `removeUnusedEntriesAfterDays`
  • [#4893] - Gradle should not fail if it cannot process a .sha1 file during dependency cache access
  • [#4860] - gradle fails due to dependency on Unsafe::defineClass which is removed in JDK 11
  • [#4610] - Dependency constraint can result in evicted module versions being retained in the graph
  • [#4609] - Dependency constraint that provides a version will cause other dependency exclusions to be ignored
  • [#4567] - "Exclude" on declared dependencies does not work with BOM (gradle 4.6 feature)
  • [#4502] - WorkerExecutor should limit the number of active work items
  • [#4356] - Configuration excludes should be represented in published Ivy metadata
  • [#4218] - Remove malformed jar deprecation
  • [#3935] - Incremental Java compilation fails in some cases
  • [#3348] - Provide a better API for making POM modifications
  • [#3290] - ConcurrentModificationException w/ Composite Build
  • [#3286] - taskReport task sometimes throws exception when using parallel build
  • [#3269] - buildNeeded/buildDependents does not work with Java Library plugin
  • [#3182] - A user should be able to derive locks for a build and write to new file
  • [#3064] - Improve documentation for publishing custom artifacts
  • [#2663] - Checkstyle configuration from URI
  • [#2496] - Project.getProperties triggers (early) evaluation of the publishing block
  • [#2128] - Ctrl+C kills daemon during run (Java)
  • [#1165] - Stable Publishing Plugins
  • [#4199] - buildFinished callbacks may fire before all tasks have completed in a composite build

New in Gradle 4.7 (Apr 19, 2018)

  • First and foremost, Gradle's incremental Java compiler can now run annotation processing incrementally. No user-facing configuration is necessary, but processor authors need to opt-in. We request annotation processor authors read the documentation for this feature and contact the Gradle team via the forum for assistance.
  • Java enthusiasts will be happy to read that this release supports running Gradle builds with JDK 10.
  • Gradle log output is now grouped by task for non-interactive executions, making interleaved logs a thing of the past on CI. It also enables build scan plugin v1.13 to show logs per task.
  • Moving on to other areas of user experience: running tests is further improved as failed tests now run first. Together with the --fail-fast option it provides the quickest possible feedback loop.
  • This release introduces an incubating new capability for Kotlin DSL users: precompiled script plugins. This means that you can create a Kotlin DSL script within a regular Kotlin source set and get the benefits of binary plugins. For example, src/main/kotlin/nyan.gradle.kts could be used as plugins { id("nyan") }.
  • Kotlin DSL v0.16 also includes Kotlin 1.2.31, a more consistent API, better IDE support, and more.

New in Gradle 4.7 RC2 (Apr 13, 2018)

  • This release candidate contains fixes for the following issues reported against 4.7 RC1:
  • NPE starting the daemon with 4.7-rc-1, Java 10 and user locale without a region
  • Output of exec/javaexec tasks can sometimes be lost

New in Gradle 4.7 RC1 (Apr 5, 2018)

  • First and foremost, Gradle's incremental Java compiler can now run annotation processing incrementally. No user-facing configuration is necessary, but processor authors need to opt-in. We request annotation processor authors read the documentation for this feature and contact the Gradle team via the forum for assistance.
  • Java enthusiasts will be happy to read that this release supports running Gradle builds with JDK 10.
  • Gradle log output is now grouped by task for non-interactive executions, making interleaved logs a thing of the past on CI. It also enables build scan plugin v1.13 to show logs per task.
  • Moving on to other areas of user experience: running tests is further improved as failed tests now run first. This allows use of the --fail-fast option to provide the quickest possible feedback loop.
  • This release introduces an incubating new capability for Kotlin DSL users: precompiled script plugins. This means that you can create a Kotlin DSL script within a regular Kotlin source set and get the benefits of binary plugins. For example, src/main/kotlin/nyan.gradle.kts could be used as plugins { id("nyan") }.
  • Kotlin DSL v0.16 also includes Kotlin 1.2.31, a more consistent API, better IDE support, and more. See details and examples in the Kotlin DSL v0.16 release notes.
  • Last but not least, the IDEA Gradle Plugin now automatically marks Java resources directories as resources in the IDEA module definitions. This behavior can be customized.

New in Gradle 4.6 (Feb 28, 2018)

  • First and foremost, this release of Gradle includes built-in support for JUnit Platform and the JUnit Jupiter/Vintage Engine, also known as JUnit 5 support.
  • You can use the new filtering and engines functionality in JUnit 5 using the examples provided below and in the documentation.
  • Also regarding testing, you can now improve your testing feedback loop when running JVM-based tests using the new fail-fast option for Test tasks, which stops the build immediately after the first test failure.
  • Moving on to dependency management improvements: you can now declare dependency constraints for transitive dependencies and avoid problems caused by oft-hidden upstream dependency changes.
  • This release also features enhanced Maven dependency compatibility: support for importing BOMs, optional dependencies, and compile/runtime separation when consuming POMs.
  • For now you must enable these features by adding enableFeaturePreview('IMPROVED_POM_SUPPORT') to your settings.gradle file, as they break backward compatibility in some cases.
  • This version of Gradle also comes with a couple especially useful new APIs for task development. You can now declare custom command-line flags for your custom tasks, for example: gradle myCustomTask --myfoo=bar. In addition, tasks that extend Test, JavaExec or Exec can declare rich arguments for invoking the underlying executable. This allows for better modeling of tools like annotation processors.
  • Speaking of annotation processors, it is now more convenient to declare dependencies that are annotation processors through the new annotationProcessor dependency configuration. Using a separate dependency configuration for annotation processors is a best practice for improving performance.
  • Kotlin DSL v0.15.6 is included in this release of Gradle, and features initialization scripts support, nicer script compilation error reporting, performance improvements, and better IntelliJ IDEA integration. Details are available in the linked release notes.

New in Gradle 4.5.1 (Feb 5, 2018)

  • This bug-fix release addresses 3 regressions in Gradle 4.5.
  • Changes in dependency management caused a regression in 4.5 where in some rare cases a dependency could be imported into a different scope than the one declared.
  • Starting in 4.5, the build cache configuration is shared between builds part of a composite build. NullPointerException could be observed if the parent build finished before the different composites. This lifecycle issue has now been resolved.
  • A regression in Eclipse project generation caused a sub-project to be added as a dependency to itself, resulting in an error when opening the project in Eclipse.

New in Gradle 4.5 (Jan 25, 2018)

  • First and foremost, this release of Gradle features improvements to the build cache:
  • Caching for C and C++ compilation is now stable.
  • The ANTLR plugin now takes advantage of the build cache.
  • A couple of rough edges to build cache behavior have been polished, read details below.
  • In addition to cacheability improvements for native development, incremental compilation for C/C++ does finer-grained analysis of dependencies between source files and header files, which will result in fewer files compiled and a higher cache hit-rate.
  • Now on to performance improvements everyone can enjoy: less memory consumption and faster up-to-date behavior. Gradle 4.5 features much more memory-efficient incremental compilation. Combined with less file canonicalization, faster task selection, and faster variant-aware dependency resolution, this results in up to 30% faster up-to-date checking. The improvement will be especially pronounced for projects with a large number of constants, as is typical in Android projects. For example, here are 2 snapshots comparing cross-build caches.
  • Next up, you can finally sign artifacts using gnupg-agent. Special thanks to Christoph Böhme for contributing this highly-anticipated feature.
  • Documentation has been upgraded in this release, with use-case oriented examples for several highly trafficked pages, improved navigation, and a more pleasant experience in many ways. Read details about the improvements, or just start with the new docs home page.
  • Individual deprecation warnings are no longer displayed in console output by default, as many users often cannot take action on deprecation warnings from third party plugins. You can now control the verbosity of logging deprecation warnings.
  • Last but not least, 2 Kotlin DSL updates:
  • You can now generate Gradle Kotlin DSL scripts using gradle init --dsl kotlin.
  • Kotlin DSL v0.14 is included in this release of Gradle. It features code navigation to Gradle sources in IDEs with the Gradle binary distribution (not just -all anymore), embedded Kotlin upgraded to 1.2.0 and more.
  • We hope you will build happiness with Gradle 4.5, and we look forward to your feedback via Twitter or on GitHub.
  • Table Of Contents:
  • New and noteworthy ?C/C++ compilation improvements
  • ANTLR task is now cacheable by default
  • Documentation enhancements
  • Signing artifacts with gpg-agent
  • Reduced deprecation logging in console
  • Init task can now generate Kotlin DSL build scripts
  • New plugin APIs
  • Default CodeNarc has been upgraded to 1.0
  • Configure executable directory in distributions
  • Arbitrary task property names
  • Promoted features:
  • Fixed issues
  • Deprecations ?Deprecation of no-search-upward command line options
  • Potential breaking changes ?Build Cache
  • Incubating Depend task removed
  • Gradle no longer tracks the canonical path of input file tree roots
  • Project.file() no longer normalizes case
  • ListProperty no longer extends Property
  • External contributions
  • Known issues
  • New and noteworthy:
  • Here are the new features introduced in this Gradle release.
  • C/C++ compilation improvements
  • Build Cache Support:
  • We introduced experimental C/C++ caching support in Gradle 4.3, but this feature was hidden behind an additional flag until we had fixed some underlying correctness issues.
  • In this release, we have fixed some underlying issues with calculating the correct build cache key for C++ compilation and have removed the special flag. If you enable the build cache, Gradle will try to reuse task outputs from C/C++ compile tasks when all inputs (compiler flags, source, dependencies) are identical, which can greatly reduce build times.
  • Please note that there are some caveats when using the build cache. In particular for C++, object files that contain absolute paths (e.g., object files with debug information) are reusable and cacheable, but may cause problems when debugging.
  • Incremental Compilation:
  • Gradle's incremental C/C++ compilation works by analysing and understanding the dependencies between source files and the header files that they include. Gradle can use this information to compile only those source files that are affected by a change in a header file. In some cases, Gradle could not analyze all of these dependencies and would assume all source files depend on all header files. Changes to any header file would require recompiling all source files, regardless of whether the compiler output would change or not. This also affected how well the Gradle build cache could be used to skip compilation.
  • In this release, Gradle's incremental C/C++ compilation is now able to understand most dependencies between source files and header files. This means incremental compilation will occur more often and builds are more likely to see cache hits.
  • ANTLR task is now cacheable by default:
  • When generating grammar sources with ANTLR, now the task's outputs are stored and retrieved from the build cache.
  • Documentation enhancements:
  • This release of Gradle adds more examples and use-case oriented documentation. In particular, notable improvements have been made to documentation for the command-line interface, configuring the build environment, dependency management, and Gradle wrapper.
  • In addition, major improvements were made to discoverability of content through improved navigation in the user manual and DSL reference. docs.gradle.org now loads faster (especially in Asia), is more mobile-friendly, and gives you a much better sense of where you are.
  • docs star ratings and edit widget
  • Your feedback will be very helpful for continued improvement, which you can provide through new "star ratings" and "edit this page" functionality on each user manual page, in addition to GitHub issues.
  • Signing artifacts with gpg-agent
  • You can now sign generated artifacts via GnuPG's agent. Example usage:
  • signing {
  • useGpgCmd()
  • sign configurations.archives
  • Please see signing plugin documentation for more details.
  • Reduced deprecation logging in console:
  • In this release, deprecation warnings are no longer displayed in the console output by default. Instead, all deprecation warnings in the build will be collected and a summary will be rendered at the end of the build.
  • You can run the build with the command line option --warning-mode=all or the property org.gradle.warning.mode=all to have all warnings displayed as earlier version of Gradle. You can use the command line option --warning-mode=none or the Gradle property org.gradle.warning.mode=none to suppress all warnings, including the one displayed at the end of the build.
  • Learn more about customizing logging warnings in the command-line interface documentation.
  • Init task can now generate Kotlin DSL build scripts
  • It is now possible to generate new Gradle builds using the Kotlin DSL with the help of the init task and its new --dsl option:
  • gradle init --dsl kotlin
  • The new option defaults to groovy and is supported by all build setup types except migration from Maven builds.
  • New plugin APIs:
  • Provider API - SetProperty
  • A convenience for dealing with sets has been added to the Provider API.
  • Use of runtime types when declaring @Nested task inputs
  • When analyzing @Nested task properties for declared input and output sub-properties, Gradle used to only observe the declared type of the property. This meant ignoring any sub-properties declared by a runtime sub-type.
  • Since Gradle 4.5, Gradle uses the type of the actual value instead, and hence can discover all sub-properties declared this way.
  • Rich Java compiler arguments:
  • When you have to expose a file location to your annotation processor, it is essential for Gradle to learn about this additional input (or output). Without tracking the location and contents of the given file (or directory), features like incremental build and task output caching cannot function correctly. Before Gradle 4.5, you had to let Gradle know about such inputs or outputs manually by calling compileJava.inputs.file(...) or similar.
  • Gradle 4.5 introduces a better way to handle this situation by modeling the annotation processor as a CompilerArgumentProvider. This approach allows the declaration of complex inputs and outputs, just like how you would declare @InputFile and @OutputDirectory properties on the task type.
  • The approach is not limited to annotation processors, but can be used to declare any kind of command-line argument to the compiler. The only thing you need to do is to add your custom CompilerArgumentsProvider to CompileJava.options.compilerArgumentProviders.
  • @Nested on iterables:
  • When applying the @Nested to an iterable property, each element is now treated as a separate nested input. CompileJava.options.compilerArgumentProviders shows this new behavior.
  • Default CodeNarc has been upgraded to 1.0:
  • Now CodeNarc's default version has been upgraded to 1.0, enjoy!
  • Configure executable directory in distributions:
  • Previously, executables in distributions would be placed in bin directory and couldn't be configured. Now you can configure this directory with executableDir property.
  • Arbitrary task property names:
  • When registering task properties via the runtime API, property names are not required to be Java identifiers anymore, and can be any non-empty string.
  • 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” for more information.
  • The following are the features that have been promoted in this Gradle release.
  • Fixed issues:
  • Unable to retrieve the issue information. You may not be connected to the Internet, or there may have been an error.
  • Deprecations:
  • Features that have become superseded or irrelevant due to the natural evolution of Gradle become deprecated, and scheduled to be removed in the next major Gradle version (Gradle 5.0). See the User guide section on the “Feature Lifecycle” for more information.
  • The following are the newly deprecated items in this Gradle release. If you have concerns about a deprecation, please raise it via the Gradle Forums.
  • Deprecation of no-search-upward command line options
  • The command line options for searching in parent directories for a settings.gradle file (-u/--no-search-upward) has been deprecated and will be removed in Gradle 5.0. A Gradle project should always define a settings.gradle file to avoid the performance overhead of walking parent directories.
  • Potential breaking changes:
  • Two overloaded ValidateTaskProperties.setOutputFile() methods were removed. They are replaced with auto-generated setters when the task is accessed from a build script.
  • The maven-publish plugin now produces more complete maven-metadata.xml files, including maintaining a list of <snapshotVersion> elements. Some older versions of Maven may not be able to consume this metadata.
  • Build Cache:
  • HTTP build cache does not follow redirects:
  • When connecting to an HTTP build cache backend via HttpBuildCache, Gradle does not follow redirects any more, and treats them as errors instead. Getting a redirect from the build cache backend is mostly a configuration error (e.g. using an http url instead of https), and has negative effects on performance.
  • Build cache configuration of included builds no longer respected:
  • In earlier versions of Gradle, each included build within a composite used its own build cache configuration. Now, included builds inherit the configuration from the root build. Included builds may still define build cache configuration in their settings.gradle file, it is just no longer used.
  • This change will not cause build breakage and does not require any change in build logic to adapt to.
  • Included builds of composite build now share build cache configuration:
  • Previously, each build within a composite build used its own build cache configuration. Now, included builds, and their buildSrc builds, automatically inherit the build cache configuration of the root build. This makes managing build cache configuration for composite builds simpler and effectively allows better build cache utilization.
  • Included builds may still define build cache configuration in their settings.gradle file, it is just no longer respected.
  • The buildSrc build of the root project continues to use its own build cache configuration, due to technical constraints. However, the buildSrc build of any included build will inherit the build cache configuration from the root build. For more on configuring the build cache for the root buildSrc build, please see the documentation for using the build cache.
  • Incubating Depend task removed:
  • The Depend task has been removed without a replacement. Its capability has been merged into the respective native compilation tasks.
  • Gradle no longer tracks the canonical path of input file tree roots
  • Gradle was inconsistently handling symlinks when snapshotting inputs. For the root of a file tree it would take the canonical path into account. For individual files and contents of trees, it would only consider the normalized path instead. Gradle will now always use the normalized path. This means that a task will not rerun if a directory is replaced with a symlink to the exact same contents. If you have a use case that requires reacting to the canonical path of inputs, please open an issue and we'll consider an opt-in API that will canonicalize all inputs, not just tree roots.
  • Project.file() no longer normalizes case:
  • The Project.file() and related methods used to normalize the case on case-insensitive file systems. This means that the method would check whether any parts of the hierarchy of a given file already existed in a different case and would adjust the given file accordingly. This lead to lots of IO during configuration time without a strong benefit.
  • The Project.file() method will now ignore case and only normalize redundant segments like /../. It will not touch the file system.
  • ListProperty no longer extends Property:
  • ListProperty now extends HasMultipleValues and Provider instead of Property. The Property interface represents a property whose incoming and outgoing types are the same. A List can be assembled from any Iterable rather than just any List, so the new arrangement reflects this to allow a ListProperty<T> to be set using any Iterable<T>.
  • This also applies to the DSL. The Groovy DSL will allow any Iterable to be used to set the value of a ListProperty.
  • The new SetProperty type follows this same pattern.
  • External contributions:
  • We would like to thank the following community members for making contributions to this release of Gradle.
  • Nikita Skvortsov — Optimize generated IDEA dependencies (gradle/gradle#3460)
  • Theodore Ni — Ignored TestNG tests should not throw an exception (gradle/gradle#3570)
  • James Wald — Introduce command line option for Wrapper task to set distribution SHA256 sum (gradle/gradle#1777)
  • zosrothko — Restore Eclipse contribution instructions (gradle/gradle#3715)
  • Kevin Macksamie — Fix link to Lazy Configuration in docs (gradle/gradle#3848)
  • Jason Tedor - Adapt Java version detection to support JEP-322 (gradle/gradle#3892)
  • S K - Add support for configurable start script directory (gradle/gradle#2977)
  • Jokubas Dargis - Improve performance of resource list operation in GCS repositories (gradle/gradle#3023)
  • Christoph Böhme - Support for GnuPG's gpg-agent (gradle/gradle#1703)
  • George Thomas - Fix apostrophe abuse in dependency management section of user guide (gradle/gradle#3895)

New in Gradle 4.4.1 (Dec 21, 2017)

  • This bug-fix release addresses 3 regressions in Gradle 4.4.
  • We started shipping JGit 4.5.3.201708160445-r in Gradle 4.4. Some of the non-shaded JGit resources leaked into the gradleApi() dependency and caused problems in some builds. We now shade all of JGit's resources.
  • Some builds using Kotlin DSL had problems applying the build-scan plugin in Gradle 4.4. We've updated to kotlin-dsl 0.13.2.
  • Gradle 4.4 contained changes to internal APIs that broke the popular Nebula dependency lock plugin. This release restores binary compatibility for that plugin. Internal APIs are subject to change, although we try to be mindful of the impact of every change in each Gradle release. If particular internal APIs are useful, please open an issue describing your use case, so we can judge where our public APIs are lacking.

New in Gradle 4.4 (Dec 6, 2017)

  • Visual Studio 2017 is now supported. Please read details about vswhere and VS toolchain discovery changes if you plan to use Gradle with VS 2017.
  • The eclipse plugin now provides separate output folders. This allows Eclipse plugins to provide more sophisticated classpath management. Buildship 2.2 will take advantage of this feature to avoid one large global classpath when running Java applications or executing tests in Eclipse IDE.
  • No discussion about IDE support for Gradle would be complete without mentioning improvements to the Kotlin DSL. Version 0.13 is included in Gradle 4.4 and provides support for writing settings.gradle.kts files, Kotlin standard library extensions to the Java 7 and Java 8 APIs for use in build scripts, improvements to the plugins {} DSL, and more!
  • This version of Gradle supports version ranges in parent elements of a POM.
  • C and C++ developers will enjoy better incremental builds and build cache support for C/C++ because this version of Gradle takes compiler version and system headers into account for up-to-date checks.
  • This version of Gradle fully supports the combination of Play 2.6 and Scala 2.12, with improvements and fixes to runPlayBinary, the distributed Play start script, and other improvements.
  • Previous versions of Gradle required that all transitive dependencies of a given plugin were present in the same repository as the plugin. Gradle 4.4 takes all plugin repositories into account and can resolve transitive plugin dependencies across them.
  • Last but not least, several 3rd party dependencies including Ant were updated to their latest versions containing security and other bug fixes.

New in Gradle 4.4 RC6 (Dec 4, 2017)

  • This release candidate contains a fix for a concurrency regression that can cause an exception in very rare cases (#3679), which was reported against 4.4 RC5.

New in Gradle 4.4 RC5 (Dec 3, 2017)

  • This release candidate contains a fix for the following issues reported against 4.4 RC4:
  • #3663: ClassCastException when verifying SSL certificates
  • #3662: Windows resource compiler does not find Visual Studio includes

New in Gradle 4.4 RC4 (Nov 28, 2017)

  • #3627: API change in the test task causes compile error when used with Groovy and @CompileStatic

New in Gradle 4.4 RC3 (Nov 27, 2017)

  • Compared to 4.4 RC2, this release candidate upgrades the auto-applied build scan plugin version when using --scan to 1.10.3 for an improved build scan experience with Android projects.

New in Gradle 4.4 RC2 (Nov 24, 2017)

  • Fix constructor maintained for backward compatibility with shadow plugin 1.2.4

New in Gradle 4.4 RC1 (Nov 22, 2017)

  • The Gradle team is pleased to announce Gradle 4.4. First and foremost, this release of Gradle features some exciting improvements for IDE users.
  • There are:
  • The eclipse plugin now provides separate output folders. This removes test dependencies from the runtime classpath in Eclipse and should make developing applications with STS and Buildship much more pleasant.
  • Visual Studio 2017 is now supported. Please read details about vswhere and VS toolchain discovery changes if you plan to use Gradle with VS 2017.
  • No discussion about IDE support for Gradle would be complete without mentioning improvements to the Kotlin DSL. Version 0.13 is included in Gradle 4.4 and provides support for writing settings.gradle.kts files, Kotlin standard library extensions to the Java 7 and Java 8 APIs for use in build scripts, improvements to the plugins {} DSL, and more! See the Kotlin DSL 0.13 release notes for more details.
  • Gradle now supports version ranges in parent elements of a POM. See an example in the full release notes.
  • C and C++ developers will enjoy better incremental builds and build cache support for C/C++ because this version of Gradle takes compiler version and system headers into account for up-to-date checks.
  • This version of Gradle fully supports the combination of Play 2.6 and Scala 2.12, with improvements and fixes to runPlayBinary, the distributed Play start script, and other improvements.
  • Previous versions of Gradle required that all transitive dependencies of a given plugin were present in the same repository as the plugin. Gradle 4.4 takes all plugin repositories into account and can resolve transitive plugin dependencies across them. Learn about this and other plugin repository handling improvements in the details.
  • Last but not least, several 3rd party dependencies including Ant were updated to their latest versions containing security and other bug fixes.
  • Upgrade Instructions:
  • Switch your build to use Gradle 4.4 RC1 quickly by updating your wrapper properties -
  • ./gradlew wrapper --gradle-version=4.4-rc-1

New in Gradle 4.3.1 (Nov 8, 2017)

  • With 4.3.1, only repository timeout errors will prevent Gradle from searching for a module in a subsequent repository.
  • Moreover, the connection and socket timeouts for HTTP/HTTPS requests have been increased to 30 seconds.
  • This version of Gradle also removes an overload of TaskInputs.property which caused statically compiled plugin code to use the wrong method when calling TaskInputs.property(..., null).
  • Finally, when using --scan the build scan plugin is applied before other plugins to avoid rendering a warning message.

New in Gradle 4.3 (Oct 31, 2017)

  • The Gradle team is pleased to announce Gradle 4.3.
  • First and foremost, this release of Gradle features experimental build cache support for C and C++ compilation. This further improves performance of native application builds as it does for the JVM ecosystem. Your feedback will be very helpful to make this feature stable.
  • JVM developers who use annotation processors and the build cache should consider using a new compileJava.options.annotationProcessorGeneratedSourcesDirectory property to make caching more effective.
  • The Gradle Kotlin DSL moves forward with a v0.12 release (included in Gradle 4.3). It brings Java 9 support, Kotlin 1.1.51, better support for Kotlin dependencies, improved documentation and samples, and more. Heads up Kotlin users: will want to ensure they declare the version of the Kotlin plugin; it no longer defaults to the embedded version.
  • You can now use the build scan plugin without configuring it in your build. Using the --scan command line flag will automatically apply the latest compatible version of the plugin if it's not already applied.
  • Several improvements have been made to improve user experience, increase robustness in the face of network problems, and solidify existing APIs.
  • Gradle now defines connection and socket timeouts for all HTTP(S) requests. This prevents certain types of network problems from hanging builds, and is especially helpful for build cache users. Furthermore, Gradle will blacklist remote repositories for the duration of a build where requests time out.
  • The plugins {} DSL can now be used in more cases. Subprojects can now apply plugins declared in buildSrc and non-core plugins already declared in parent projects.
  • The runtime task inputs API (what you'd typically see in a Gradle script instead of a binary plugin) is now more consistent with the statically-compiled API. Specifically, Gradle now creates directories for output properties, validates inputs and outputs, and allows classpath property declaration similar to when using annotations.
  • A new console verbose mode will print outcomes of all tasks (like UP-TO-DATE) like Gradle 3.5 and earlier did. You can set this via --console=verbose or by a new Gradle property org.gradle.console=(plain rich verbose). Furthermore, all boolean flags like --parallel now have inverses like --no-parallel to make for a more consistent CLI.
  • Last but not least, new task output DirectoryProperty and RegularFileProperty types carry generating task information that allow Gradle to infer task dependencies. Use these types in your custom tasks instead of Files.

New in Gradle 4.3 RC4 (Oct 27, 2017)

  • This release candidate contains fixes for the following issue reported against 4.3 RC3:
  • Gradle Kotlin DSL included in this release has been updated to 0.12.3 to fix a breaking change to Kotlin build scripts using the Property API. See gradle/kotlin-dsl#574 for more details.
  • Upgrade Instructions:
  • Switch your build to use Gradle 4.3 RC4 quickly by updating your wrapper properties:
  • ./gradlew wrapper --gradle-version=4.3-rc-4

New in Gradle 4.3 RC3 (Oct 25, 2017)

  • This release candidate contains fixes for the following issues reported against 4.3 RC2.
  • #3262: The use of Project.property(Class) or ProviderFactory.property(Class) should not render a deprecation warning
  • #3250: Auto-applied build scan plugin not found when used in Kotlin DSL
  • Check the release notes for more information. If no regressions are reported, a final release will typically follow in the next week.
  • Upgrade Instructions:
  • Switch your build to use Gradle 4.3 RC3 quickly by updating your wrapper properties - ./gradlew wrapper --gradle-version=4.3-rc-3

New in Gradle 4.4 Build 20171023235954 Nightly (Oct 24, 2017)

  • New and noteworthy:
  • Support version ranges in parent elements:
  • Gradle now suppoprts version range in parent elements of POM, which was introduced by Maven 3.2.2: "Parent elements can now use bounded ranges in the version specification. You can now consistently use ranges for all intra-project dependencies, of which parents are a special case but still considered a dependency of projects that inherit from them."
  • The following is now permissible:
  • <project> <modelVersion>4.0.0</modelVersion> <parent <groupId>org.apache</groupId> <artifactId>apache</artifactId> <version>[3.0,4.0)</version> </parent> <groupId>org.apache.maven.its.mng2199</groupId> <artifactId>valid</artifactId> <version>1</version> <packaging>pom</packaging> </project>
  • Support for Maven optional dependencies:
  • Gradle will now take Maven optional dependencies into account during dependency resolution. Before, optional dependencies were not included in the dependency graph. As of Gradle 4.4, optional dependencies will participate in dependency resolution as soon as another dependency on the same module is found in the graph. For example, if a transitive dependency on foo:bar:1.1 is optional, but another path in the dependency graph brings foo:bar:1.0 (not optional), then Gradle will resolve to foo:bar:1.1. Previous releases would resolve to foo:bar:1.0. However, if no "hard" dependency is found on the optional module, then it will not be included, as previous Gradle versions did.
  • Eclipse plugin separates output folders:
  • The eclipse plugin now defines separate output directories for each source folder. This ensures that main and test classes are compiled to different directories.
  • The plugin also records which Eclipse classpath entries are needed for running classes from each source folder through the new gradle_scope and gradle_used_by_scope attributes. Future Buildship versions will use this information to provide a more accurate classpath when launching applications and tests.
  • Parametrized tooling model builders:
  • The Tooling API now allows model builders to accept parameters from the tooling client. This is useful when there are multiple possible mappings from the Gradle project to the tooling model and the decision depends on some user-provided value. Android Studio for instance will use this API to request just the dependencies for the variant that the user currently selected in the UI. This will greatly reduce synchronization times.
  • Security upgrade of third-party dependencies to avoid potential vulnerabilities:
  • CVE-2017-7525 (critical)
  • SONATYPE-2017-0359 (critical)
  • SONATYPE-2017-0355 (critical)
  • SONATYPE-2017-0398 (critical)
  • CVE-2013-4002 (critical)
  • CVE-2016-2510 (severe)
  • SONATYPE-2016-0397 (severe)
  • CVE-2009-2625 (severe)
  • SONATYPE-2017-0348 (severe)
  • Deprecations:
  • Deprecation of no-rebuild command line options:
  • The command line options for avoiding a full rebuild of dependent projects in a multi-project builds (-a/--no-rebuild) were introduced in a very early version of Gradle. Since then Gradle optimized its up-to-date checking for project dependencies which renders the option obsolete. It has been deprecated and will be removed in Gradle 5.0.
  • Potential breaking changes:
  • Maven optional dependencies may lead to different dependency resolution result:
  • Supporting optional dependencies means that depending on the shape of your dependency graph, you may now have a different dependency resolution result after upgrading to Gradle 4.4. Should you see any problem, build scans can help you debug those.
  • Change to the Test task structure:
  • Common test framework functionality in the Test task has been moved to AbstractTestTask.
  • Changes in the eclipse plugin:
  • The default output location in EclipseClasspath changed from ${project.projectDir}/bin to ${project.projectDir}/bin/default.

New in Gradle 4.3 RC2 (Oct 24, 2017)

  • This release candidate contains fixes for the following issue reported against 4.3 RC1:
  • #3193: TaskInputs validation is too strict
  • First and foremost, this release of Gradle features experimental build cache support for C and C++ compilation. This further improves performance of native application builds as it does for the JVM ecosystem. Your feedback will be very helpful to make this feature stable.
  • JVM developers who use annotation processors and the build cache should consider using a new compileJava.options.annotationProcessorGeneratedSourcesDirectory property to make caching more effective.
  • The Gradle Kotlin DSL moves forward with a v0.12 release (included in Gradle 4.3). It brings Java 9 support, Kotlin 1.1.51, better support for Kotlin dependencies, improved documentation and samples, and more. Heads up Kotlin users: will want to ensure they declare the version of the Kotlin plugin; it no longer defaults to the embedded version.
  • You can now use the build scan plugin without configuring it in your build. Using the --scan command line flag will automatically apply the latest compatible version of the plugin if it's not already applied.
  • Several improvements have been made to improve user experience, increase robustness in the face of network problems, and solidify existing APIs.
  • Improvements:
  • Gradle now defines connection and socket timeouts for all HTTP(S) requests. This prevents certain types of network problems from hanging builds, and is especially helpful for build cache users. Furthermore, Gradle will blacklist remote repositories for the duration of a build where requests time out.
  • The plugins {} DSL can now be used in more cases. Subprojects can now apply plugins declared in buildSrc and non-core plugins already declared in parent projects.
  • The runtime task inputs API (what you'd typically see in a Gradle script instead of a binary plugin) is now more consistent with the statically-compiled API. Specifically, Gradle now creates directories for output properties, validates inputs and outputs, and allows classpath property declaration similar to when using annotations.
  • A new console verbose mode will print outcomes of all tasks (like UP-TO-DATE) like Gradle 3.5 and earlier did. You can set this via --console=verbose or by a new Gradle property org.gradle.console=(plain rich verbose). Furthermore, all boolean flags like --parallel now have inverses like --no-parallel to make for a more consistent CLI.
  • Last but not least, new task output DirectoryProperty and RegularFileProperty types carry generating task information that allow Gradle to infer task dependencies. Use these types in your custom tasks instead of Files.

New in Gradle 4.2.1 (Oct 24, 2017)

  • This bug-fix release addresses a regression in 4.2, which caused Android instrumented tests to fail. It also improves Java 9 compatibility and clarifies a few deprecation warnings. We recommend that all Gradle 4.2 users upgrade to 4.2.1
  • Bug fixes:
  • Improve documentation for Settings.include and link this in the name deprecation
  • Gradle 4.2 throws java.lang.StringIndexOutOfBoundsException launching projects in disk root directory
  • Android testing broken since Gradle 4.2
  • Revert change that broke Android testing
  • Upgrade to Groovy 2.4.12 for full Java 9 compatibility
  • Gradle 4.2 fails with Zulu JDK 9
  • Incorrect cache behavior when file name contains special characters
  • Fix URI-quoted chars in cached outputs bug
  • Upgrade Instructions:
  • Switch your build to use Gradle 4.2.1 by updating your wrapper properties with ./gradlew wrapper --gradle-version=4.2.1
  • Reporting Problems:
  • If you find a problem with Gradle 4.2.1, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.