2023 Lunar Year in Review

Hi all! On behalf of the Gradle community, we wish you a Happy New Lunar Year! 2023 was a great year for Gradle Build Tool, with many new features and initiatives being released. Let’s recap the key updates:

  • Gradle 8 baseline with 7 feature packed releases
  • Kotlin DSL became the new default for Gradle
  • Configuration Caching, Build Speed and Scalability Improvements
  • Our First Google Summer of Code and Major League Hacking participation
  • Gradle Enterprise renaming to Develocity, and Gradle Build Scan enhancements
  • What’s next, Declarative Gradle and the road towards Gradle 9

2023 Lunar Year in Gradle

Gradle 8

In February 2023, the Gradle team announced Gradle 8.0 - a new release that upgraded Kotlin DSL to v1.8 and greatly improved its compilation speed. Gradle 8.0 expanded integration with Java tools like CodeNarc, PMD, and Foojay Disco API for toolchain management. This major release had more than 40 code contributors from the Gradle community. Thanks, everyone!

Gradle 8.0 release

See this blog post for the full list of the introduced features and the migration guidelines. After the 8.0 release, we had 6 more major releases with many more features. Beyond the key updates listed below, you can find more in the changelogs and our newsletter.

Kotlin DSL is the New Default

In April 2023, Kotlin DSL became the default recommended option for new Gradle projects. Kotlin DSL for Gradle uses the Kotlin language to enable full IDE assistance for build authoring in IntelliJ IDEA and Android Studio. This includes auto-completion, smart content assist, quick access to documentation, navigation to source, and context-aware refactoring. With Kotlin DSL, you can edit your build logic with the same editing experience you are used to when working with your production and test code. Groovy DSL remains fully supported, and there are no plans for deprecation. Learn More about Kotlin DSL in Gradle.

Kotlin DSL is Now the Default for New Gradle Builds

Culminating efforts around Kotlin DSL in Gradle and its massive adoption in 2023, Gradle joined the Kotlin Foundation as a silver member. See the full press release here. We now participate in many technical and outreach initiatives the foundation runs.

New members of the Kotlin Foundation in 2023

Configuration Caching

In Gradle 8.1 (April 2023), we also announced the general availability of the Gradle Configuration Cache. This feature significantly improves build performance by caching the result of the configuration phase and reusing this for subsequent builds. Using the configuration cache, Gradle can skip the configuration phase entirely when nothing that affects the build configuration, such as build scripts, has changed. See this blog post by Mikhail Lopatkin to learn more about how configuration caching works.

Gradle Configuration Cache in Action

Gradle Build Speed and Scalability

In addition to configuration caching, Gradle Build Tool received many updates to improve developer velocity at scale, especially in the 8.2 and 8.3 releases at the beginning of the year. We added support for Persistent Compiler Daemons to reduce initialization times. We were able to drastically reduce memory consumption and, at the same time, reduce build times:

Memory consumption reductions on a sample Android Studio project:

Memory consumption reductions on a sample Android Studio project

Build times in different Gradle versions and Bazel:

Build times in different Gradle versions and Bazel

To learn more about performance improvements, see this blog post.

Documentation Updates

As you may have noticed, the Gradle User Manual got a significant update this year, including but not limited to content refresh, new examples, and navigation experience. There are many new pages, including new solution pages for technologies and IDEs. Take a look!

Gradle User Manual - new documentation page

In the recent Gradle 8.6 release, we also introduced the Dark Theme for Gradle documentation, and there are plans to continue improving the documentation engine and simplify feedback and contribution to the docs. We have a #docs channel on the Gradle Community Slack, and we welcome anyone to discuss the content and documentation experience there.

Our First Google Summer of Code

In the summer of 2023, The Kotlin Foundation sponsored four projects for the Google Summer of Code 2023. The Gradle Kotlin Script Support for Eclipse and BuildShip project by Nikolai Vladimirov was one of them! Gradle, a Kotlin Foundation member, and Donát Csikós provided mentoring support for this project.

The project’s initial goal was to improve user interaction with Gradle Kotlin scripts inside the Eclipse IDE. The project aimed to implement several key functionalities, including syntax highlighting for Kotlin scripts, content assistance, go-to-definition, accurate diagnostics for syntax errors, signature help, and hovering. Nikolai successfully delivered these features by implementing support for Kotlin scripts based on the existing kotlin-language-server project, creating a new system to separate compilation environments for each build script. Read more about this project by Nikolai and the team.

Syntax highlighting for .kts scripts in Eclipse IDE

In 2023, we also sponsored two Major League Hacking interns who improved documentation and made various improvements in Gradle Build Tool, including better error handling for the project. See the blog post for details.

And stay tuned for Google Summer of Code 2024! We have submitted a few project ideas to the Kotlin Foundation and to the Eclipse Foundation.

Gradle Enterprise Renaming, Welcome Develocity

For Develocity, formerly known as Gradle Enterprise, it was also a packed year. First, Gradle Enterprise became Develocity, addressing the naming confusion reported by many community members. See this blog post for the full list of Develocity and Gradle Build Scan updates.

Develocity 2023 update

Gradle Build Scan

There are also many enhancements in Gradle Build Scan which now provides even more insights for Gradle. With the new versions you can:

Gradle Build Scan

The test improvements for this year were great as well! In particular, we added Detection of flaky tests and Fine-grained Test Distribution observability to the build scans. Those features depend on the build history and hence require a full-fledged Develocity instance.

Enters Declarative Gradle

This year, we also announced the Declarative Gradle project. The goal is to deliver an elegant and extensible declarative build language that allows developers to describe any software clearly and understandably. The Gradle Team drives this project and collaborates closely with Google and JetBrains, which also runs an experimental project called Amper. See this blog post by Piotr Jagielski to learn more about the project and its goals.

Here is how Declarative Gradle top-level definitions in Kotlin DSL may look like:

// Clear type of software the project produces
javaLibrary {
    // GroupID/ArtifactID/Version for publishing
    publishedAs("my-group:my-lib:2.0")

    // Common dependencies for all targets
    dependencies {
        api("some:lib:1.2")
        implementation(projects.someLib)
    }

    // A library might have more than one target
    targets {
        // All information about specific targets is grouped here
        java(11) { // Specific information about Java 11 target
            dependencies {
                implementation("some:back-port-lib:1.5")
            }
        }
        java(21) // No additional info for the Java 21 target
    }

    tests {
        unit {
            // Dependencies for the unit tests
            dependencies {
                implementation("some:other-lib:1.4")
            }
        }
    }
}

You can find some prototypes and experimental work in the gradle/declarative-prototypes repository. Work in progress, and any feedback is welcome! See the README file for discussion and feedback links.

What’s Next?

In the following months, our key priorities remain improving the developer experience for Gradle users, particularly Declarative Gradle, and improving error reporting that will help simplify mitigation of stricter task dependency management introduced in Gradle 8.x. We also plan to provide better project isolation, extending the configuration caching and improving performance, particularly for the synchronization of Android Studio and IntelliJ IDEA projects.

On February 06, Louis Jacomet, a lead software engineer and the support team leader at Gradle, spoke at Jfokus about the road to Gradle 9 and our focus on scalability and comprehensibility. Louis highlighted the following:

  • Continued investment in configuration caching
  • Upcoming isolated projects feature
  • Higher-level modeling of software projects
  • Separation of concerns for building users and authors

Many of those items are already on the Gradle Build Tool public roadmap, and you can find the information and links there. We will keep posting updates on the evolution of Gradle 9 in the following newsletters.

You can find the slides from Louis here. The video recording will be published later on the Jfokus page and YouTube channel. We also plan to publish the text version on the Gradle blog soon. Stay tuned!

The Road to Gradle 9

How Do I Participate?

If you want to share feedback or join any of these initiatives, please join us on the community Slack channel! Our GitHub issues and Community forums are also open 24/7.

Check out the Gradle Build Tool public roadmap to learn more about what is coming soon in the next releases!

And have a Gradlest New Year!