Gradle 8.13-milestone-3 is the first patch release for Gradle 8.12.
It fixes the following issues:
We recommend users upgrade to 8.13-milestone-3 instead of 8.12.
This release features 1, 2, ... n, and more.
We would like to thank the following community members for their contributions to this release of Gradle:
Be sure to check out the public roadmap for insight into what's planned for future releases.
Switch your build to use Gradle 8.13-milestone-3 by updating the Wrapper in your project:
./gradlew wrapper --gradle-version=8.13-milestone-3
See the Gradle 8.x upgrade guide to learn about deprecations, breaking changes, and other considerations when upgrading to Gradle 8.13-milestone-3.
For Java, Groovy, Kotlin, and Android compatibility, see the full compatibility notes.
Gradle provides rich APIs for plugin authors and build engineers to develop custom build logic.
The ProjectLayout class provides access to directories and files within a project.
Starting with this version of Gradle, it can also access the settings directory (the location of the settings.gradle(.kts) file). While the settings directory is not specific to any project, some use cases require resolving file paths relative to it.
Previously, accessing the settings directory required using rootProject.layout.projectDirectory. This approach involved accessing the rootProject object, which is discouraged, and then manually resolving paths to the settings directory.
The new capability addresses a common scenario: resolving files shared across all projects in a build, such as linting configurations or version.txt files in the root folder.
Refer to ProjectLayout.getSettingsDirectory() for additional details.
Gradle provides an HTML test report to help you understand and resolve test failures. This report is automatically generated when using the test task with supported test frameworks, such as JUnit.
Plugin authors and platform providers can now leverage the Test Event Reporting APIs to capture test events and generate reports for tests executed outside Gradle's built-in testing infrastructure:
public abstract class CustomTest extends DefaultTask {
@Inject
public abstract ProjectLayout getLayout();
@Inject
protected abstract TestEventReporterFactory getTestEventReporterFactory();
@TaskAction
void runTests() {
try (TestEventReporter test = getTestEventReporterFactory().createTestEventReporter(
"custom-test",
getLayout().getBuildDirectory().dir("test-results/custom-test").get(),
getLayout().getBuildDirectory().dir("reports/tests/custom-test").get()
)) {
// Start the test
test.started(Instant.now());
// Execute custom test...
// Report test outcome
if (testFailureCount > 0) {
test.failed(Instant.now());
} else {
test.succeeded(Instant.now());
}
}
}
}
This integration allows custom test frameworks to generate rich HTML test reports consistent with Gradle's built-in reporting format, enhancing visibility and usability.
You can find additional details and sample code in Test Reporting API.
Custom tests can include metadata to provide supplementary information about test execution.
The metadata is displayed in the HTML test report for better visibility:
test.metadata(Instant.now(),"Parent class:", String.valueOf(result.getTestIdentifier().getParentId().get()));
Hierarchical nesting is supported to logically group test suites and individual tests. This ensures detailed and structured reporting, with rich metadata scoped to each level:
try (GroupTestEventReporter outer = root.reportTestGroup("OuterNestingSuite")) {
outer.started(Instant.now());
try (GroupTestEventReporter inner = root.reportTestGroup("InnerNestingSuite")) {
inner.started(Instant.now());
try (TestEventReporter test = inner.reportTest("nestedTest", "nestedTest()")) {
test.started(Instant.now());
test.succeeded(Instant.now());
}
inner.succeeded(Instant.now());
}
outer.succeeded(Instant.now());
}
Nested events are reflected in the HTML test reports, providing clear traceability.
Gradle provides a rich set of error and warning messages to help you understand and resolve problems in your build.
The instructions printed under a deprecation warning now correctly indicate how to enable full stack traces for deprecation warnings.
The console properly prints out:
Run with -Dorg.gradle.deprecation.trace=true to print the full stack trace for this deprecation warning.
Previously, the console printed the incorrect suggestion:
Run with --stacktrace to get the full stack trace of this deprecation warning.
Promoted features are features that were incubating in previous versions of Gradle but are now supported and subject to backward 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.
Known issues are problems that were discovered post-release that are directly related to changes made in this release.
We love getting contributions from the Gradle community. For information on contributing, please see gradle.org/contribute.
If you find a problem with this release, 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.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.