Accelerate developer productivity with Gradle 5.0

Gradle 5.0 is here: Now with Java 11 support, production ready Kotlin DSL, and more!

Jane Elizabeth
gradle 5.0
© Shutterstock / Donovan van Staden

We’ve been keeping an eye out for Gradle, since rc.1 dropped earlier this month. Now, Gradle 5.0 is here! This major release comes with all kinds of new features and changes for developers, including Java 11 support, production ready Kotlin DSL, dependency alignment, task timeouts, and more!

Gradle 5.0 is here! We’ve been waiting excitedly since the rc 1 dropped earlier this month, but now it’s finally here! Now, developers can build, automate, and deliver better software faster than ever.

Gradle 5.0 comes with all kinds of major changes and new features for developers to enjoy and explore. At the top of the list are Java 11 support and a production-ready DSL, but there’s more to this release. In fact, we can hardly go over everything, so head on over to the Gradle website to see the full list of changes, available here.

Let’s dive right in and see what’s in store for developers!

Gradle 5.0

To start, Gradle Kotlin DSL is now production-ready with a 1.0 release! Developers can author their build logic using Kotlin to provide a considerable amount of additional editing assistance in their IDEs of choice. This includes editing features like improved completion, error highlighting, quick documentation, and refactoring.

Previously, Gradle focused on Groovy and while they are making the switch to Kotlin, the Groovy DSL will not be depreciated.

Gradle 5.0 now supports Java 11. Developers can run Gradle builds with JDK 11.

This release also introduces dependency version alignment, which allows different modules belonging to the same logical group (a platform) to have identical versions in a dependency graph. Maven BOMS can be imported to define platforms as well. More information about handling inconsistent module versions is available here.

There are some pretty significant changes to the Gradle build initialization features in the 5.0 release. The changes to gradle init include:

  • It is now optionally interactive. If developers run the init task from an interactive console, Gradle will prompt them for details of the build they’d like to generate.
  • The init task can generate a Kotlin library or application, using the the kotlin-library or kotlin-application setup type.
  • Developers can generate builds using recommended configurations. The inittask generates build scripts that use the recommended implementationtestImplementation, and testRuntimeOnly configurations instead of compiletestCompile, and testRuntime, respectively, for all build setup types.
  • Now, developers can configure project and source package names in an init task prompt.
  • The init task also creates more empty resource directories.
  • Although the init task does not automatically create a Git repository, now it will create a .gitignore file to make it easier to set one up. This file ignores Gradle’s build outputs.

SEE ALSO: Gradle 5.0 rc 1 is here: Get a sneak peek at what’s coming in 5.0

Every task has a timeout property. The task timeout can be used to limit its execution time. When said task reaches its timeout, the task execution thread is interrupted and the task is marked as failed.

Gradle Docs is a lot more searchable now! There is now an index that users can search for information on both the user manual and DSL references.

New performance features for Gradle 5.0 include:

  • Gradle can be started as a low-priority process
  • Plural task output properties don’t disable caching anymore
  • JaCoCo plugin now works with the build cache and parallel test execution
  • Plugin authoring features, including a public method to create SourceDirectorySet instances

Plus, the Gradle Native project continues to grow and expand!

We’ve hardly scratched the surface of all that Gradle 5.0 has to offer. Head on over to here for the full list of bugfixes, fixed issues, and more!

SEE ALSO: Gradle 4.9 is here: Fixed leaks, experimental new task API and so much more

Getting Gradle 5.0

Looking to upgrade your version of Gradle? There’s a detailed upgrade guide for developers who already have a Gradle build here. Keep in mind there are some breaking changes and considerations for any developer moving from 4.x up.  There’s also an installation guide for any new developers looking to start their epic Gradle journey, available here.

Gradle is also freely available on GitHub. As always, feedback and help is always needed. Feel free to contribute to the Gradle project here.

best dog

Jane Elizabeth
Jane Elizabeth is an assistant editor for

Inline Feedbacks
View all comments