gradle / gradle-client

Desktop application acting as a Gradle Tooling API client
Apache License 2.0
9 stars 1 forks source link
gradle

Gradle Client

GitHub License GitHub Top Language GitHub Actions Workflow Status GitHub Issues

This is a desktop application acting as a Gradle Tooling API client to connect to Gradle builds.

IDEs typically use the Gradle Tooling API to provide support for Gradle builds. This application is used to showcase what IDEs could do with new Gradle tooling features.

Usage

You can download the latest version of Gradle Client for macos, Linux or Windows from the Releases assets.

Once installed on your system, simply launch the application.

Adding a build

The first screen shown by the Gradle Client allows you to add local Gradle builds to explore.

Click the Add build button and pick the folder of a local build. Note that the folder must contain a settings.gradle(.kts|.dcl) file to be accepted.

Each added build is displayed in a list. From that list you can remove a build by clicking on the cross β•³ button present on the right.

By clicking on a build in the list you navigate to the connection screen.

Connecting to a build

This screen allows you to define the parameters necessary to connect to a Gradle build:

Java Home - required

Gradle User Home - optional

Gradle Distribution - required

Once you are done defining the connection parameters you can click the Connect button to continue.

Interacting with a build

Once connected you will see a list of available actions on the left. Clicking any of these will run the action. At the bottom of the screen you can expand a drawer to read the logs.

Build Environment

Build Model

Projects Model

Declarative Schema (Only for builds using Declarative Gradle)

Declarative Documents (Only for builds using Declarative Gradle)

Navigating in the application

On each screen you can use the back β¬… button to navigate to the previous screen.

You can quit the application by closing its window or by hitting Ctrl-Q / Cmd-Q.

Building Gradle Client

⚠️ These instructions are for software developers working on the Gradle Client. Usage instructions can be found above.

The build requires Java 17 with jlink and jpackage JDK tools. The build will fail to configure with the wrong Java version. Building release distributables will fail if the required JDK tools are not available.

# Run from sources
./gradlew :gradle-client:run

# Run from sources in continuous mode
./gradlew -t :gradle-client:run

# Run debug build type from build installation
./gradlew :gradle-client:runDistributable

# Run release build type from build installation
./gradlew :gradle-client:runReleaseDistributable

To add more actions start from GetModelAction.kt.

Packaging Gradle Client

Packaging native distributions is platform dependent.

The GitHub Actions based CI builds the native distributions. They are attached as artifacts to each workflow run. They are also automatically attached as release assets when building a tag.

Mac

# Package DMG on MacOS
./gradlew :gradle-client:packageReleaseDmg

DMG file is output in gradle-client/build/compose/binaries/main-release/dmg.

Linux

# Package DEB on Linux
./gradlew :gradle-client:packageReleaseDeb

DEB file is output in gradle-client/build/compose/binaries/main-release/deb.

Windows

# Package MSI on Windows
./gradlew :gradle-client:packageReleaseMsi

MSI file is output in gradle-client/build/compose/binaries/main-release/msi.