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 these nightly builds are not signed/notarized and will require you to accept running them anyway.
Also 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.
- Open Tools -> Internal Actions -> Registry
- Search for the Declarative Gradle flags by typing
declarative
- Enable the
gradle.declarative.studio.support
andgradle.declarative.ide.support
flags - Restart the IDE
IntelliJ IDEA#
Download and install a special IntelliJ IDEA 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.
Follow the same instructions as with Android Studio above to enable Declarative features.
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.
Warn
Note that the Gradle Client is not signed/notarized and will require you to accept running it anyway.
Pick a sample#
After you've installed everything, pick out a samples to try the Declarative Gradle features.