Getting Started with Declarative Gradle#
Declarative Gradle is in the experimental stage, so it requires some extra steps to get started with. It has limited testing and compatibility with IDEs, so your mileage may vary.
Installing Components#
- You will need the latest Gradle Build Tool nightly build. The sample repositories include proper Gradle definitions, so for them, no extra steps are needed
- Make sure to use JDK 17 and
that your
JAVA_HOMEpoints to Java 17. - For Android projects:
- Make sure Android Studio is installed. Note that syntax highlighting works in Android Studio nightlies only.
- Make sure that your ANDROID_HOME path is set.
Getting Started with Android development#
Support for Android is our main priority in the first alpha releases. To help with getting started, we updated the popular Now in Android demo to use Declarative Gradle DSL and its DSL in the build definitions. You can find the repository here.
To get started, follow the steps in this guide
Getting started for other project types#
At the moment, we do not have a detailed guide for other project types. They are coming soon. For now, you can check out the Declarative Gradle prototypes. They include samples and built-in documentation so that you can try them out. It might be too early to adopt them in your projects due to the upcoming compatibility breaking changes, but your're welcome to try Declarative Gradle in non-production projects and experimental branches.
- Declarative Gradle for Java
- Declarative Gradle for Kotlin
- Declarative Gradle for Kotlin Multiplatform (KMP)