Skip to content

Samples#

Tip

Make sure you followed the setup instructions fully before trying out a sample.

All samples in this page can be used to demonstrate features made possible by Declarative Gradle.

After picking a sample, read about new Declarative Gradle features.

Provide us feedback.

Java Application#

A sample Java application written in the Declarative Gradle DSL, using the prototype Declarative Gradle javaApplication Software Type defined in the org.gradle.experimental.jvm-ecosystem ecosystem plugin.

Please follow the README available at github.com/gradle/declarative-samples-java-app to try this sample.

Kotlin Application#

A sample Kotlin application written in the Declarative Gradle DSL, using the prototype Declarative Gradle kotlinJvmApplication Software Type defined in the org.gradle.experimental.kmp-ecosystem ecosystem plugin.

Please follow the README available at github.com/gradle/declarative-samples-kotlin-app to try this sample.

Android Application#

A sample Android application written in the Declarative Gradle DSL, using the prototype Declarative Gradle androidApplication Software Type defined in the org.gradle.experimental.android-ecosystem ecosystem plugin.

Please follow the README available at github.com/gradle/declarative-samples-android-app to try this sample.

Now In Android#

Now in Android is a fully functional Android app built entirely with Kotlin and Jetpack Compose from the Android team. We forked Now in Android and updated the build to work with Declarative Gradle. The prototype repository can be found in github.com/gradle/nowinandroid.

Please follow the README available at github.com/gradle/nowinandroid/DECLARATIVE-README.md to try this sample.

Bleeding edge prototypes#

If you want to go further you can take a look at some more projects for JVM, Android, KMP, Swift and C++ projects. These projects may use newer versions of Gradle or require additional manual setup, so you should try the other samples first.

They are available at github.com/gradle/declarative-gradle/tree/main/unified-prototype.

Please follow the README available in each directory linked below to try these samples.

Java#

Kotlin#

Android#

Swift#

C++#