Skip to content

Setup#

Declarative Gradle samples require nightly versions of Gradle and Android Studio. They all use the Gradle Wrapper to point to the right Gradle version, so you don't have to worry about installing a specific version of Gradle.

To try out the samples and see all of the features, you need to install a few other components as described below:

JDK#

Make sure to use a JDK >= 17 and that your JAVA_HOME points to it.

You can use a JDK from any vendor. We recommend Eclipse Temurin™ (OpenJDK).

IDE#

Android Studio#

Download and install a special Android Studio Nightly release. You can find the promoted nightly releases in this Google Drive folder for macOS (Apple Silicon and Intel), Windows and Linux. Pick the most recent one that matches your operating system.

Declarative features are only available on particular nightly releases.

Warn

Note that on macOS, these special Android Studio releases require to be in ~/Applications.

Enable more declarative features in Studio#

While syntax highlighting of .gradle.dcl files works out of the box in Studio nightlies, other features require flags to be enabled.

  1. Open Tools -> Internal Actions -> Registry
  2. Search for the Declarative Gradle flags by typing declarative
  3. Enable the gradle.declarative.studio.support and gradle.declarative.ide.support flags
  4. Restart the IDE

Visual Studio Code#

Download the Declarative Gradle VSIX and install it in your Visual Studio Code.

This extension was also tested in GitHub Codespace and should work in any Visual Studio Code derivative.

Eclipse IDE#

Install the Declarative Gradle editor support for the Eclipse IDE from Buildship snapshot Update Site in our Eclipse IDE.

Make sure to follow the setup instructions as more steps are needed for this to work.

Gradle Client#

The Gradle Client is a standalone application used to demonstrate declarative features not yet implemented in the IDE.

Download the latest release from the Gradle Client repository on GitHub and install it.

The DMG file is for macOS, the DEB file is for Linux and the MSI file is for Windows.

Pick a sample#

After you've installed everything, pick out a samples to try the Declarative Gradle features.