IntelliJ IDEA News

Declarative Gradle in IntelliJ IDEA 

Last year Gradle announced a new experimental project called Declarative Gradle that aims to make Gradle build scripts easier to read and use. Instead of writing detailed instructions for how to build your project, Declarative Gradle allows you to describe what your software needs (like libraries, applications, or tests) in a clear and simple way. This makes it easier to understand and work with, even if you’re new to Gradle.

This November, they released the second EAP and are eager to get feedback. Read their blog post to learn more about the current state of Declarative Gradle and what it can offer developers, including Android Gradle plugin support and IDE integrations for syntax highlighting, code completion, and other features.

Together with the Gradle and Android Studio teams, we have been working to provide first-class support for declarative DCL scripts in Android Studio and IntelliJ IDEA. First available in Android Studio, this is now ready for you to try out in a special IntelliJ IDEA EAP build!

How to try Declarative Gradle in IntelliJ IDEA

  1. Download the special build from this Google Drive folder.
  2. Start the IDE and enable the required configuration:
    • Open Tools | Internal Actions | Registry.
    • Enable the gradle.declarative.studio.support and gradle.declarative.ide.support flags.
    • Restart the IDE.
  3. Pick a sample project – there are Java and Kotlin samples available
  4. Open the project in IntelliJ IDEA.
  5. Check the new .dcl build configuration and try working with the project.
  6. Share your feedback to shape it further.

How to share feedback

You can provide feedback on Declarative Gradle:

  • Directly with Gradle via their feedback form
  • In the #gradle channel on the Kotlin Foundation Slack. 
  • On YouTrack or through any other channel you are used to. 

Thank you!

image description