Skip to main content

Gradle

Gradle is a build tool with a focus on build automation and support for multi-language development. If you are building, testing, publishing, and deploying software on any platform, Gradle offers a flexible model that can support the entire development lifecycle from compiling and packaging code to publishing websites. Gradle has been designed to support build automation across multiple languages and platforms, including Java, Scala, Android, Kotlin, C/C++, and Groovy, and is closely integrated with development tools and continuous integration servers, including Eclipse, IntelliJ, and Jenkins.

🚀 Usage​

Add the following command to your CI configuration file:

fluentci run --wasm gradle task <task-name>
fluentci run --wasm gradle check
fluentci run --wasm gradle test
fluentci run --wasm gradle build

Commands​

NameDescription
taskRun a Gradle task.
checkCheck the project for errors and warnings.
testRun tests.
buildBuild the project.

Code Examples​

Add fluentci-pdk crate to your Cargo.toml:

[dependencies]
fluentci-pdk = "0.2.1"

Use the following code to call a module function:

use fluentci_pdk::dag;

// ...

dag().call("https://pkg.fluentci.io/[email protected]?wasm=1", "build", vec![])?;

CI/CD Integration​

The following example shows how to integrate FluentCI with popular CI providers to run Gradle tasks:

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
with:
wasm: true
plugin: gradle
args: |
check
test
build