Gradle plugins

Collection of custom Gradle plugins for embedded firmware development, platform development and build automation in my Gradle monorepo projects.

Recently updated
Maintained
Count of contributions in last year: 6
MonWedFri
NovDecJanFebMarAprMayJunJulAugSepOctNov
Reading time:2min

Available plugins

ModulePlugin IDDescriptionDocsRepository
esp-idf-pluginpl.miloszgilga.gradle.espidfCross-platform Gradle wrapper for ESP-IDF firmware projects (Windows, Linux, macOS).JavadocReposilite

Usage

Add plugins repository

pluginManagement {
  repositories {
    maven {
      name = "ReposiliteReleases"
      url = uri("https://m2.miloszgilga.pl/releases")
    }
    // optional: required only if using snapshot versions
    maven {
      name = "ReposiliteSnapshots"
      url = uri("https://m2.miloszgilga.pl/snapshots")
    }
    gradlePluginPortal()
  }
}

Usage of esp-idf-plugin

Note

To use this plugin, you must still have the ESP-IDF framework installed and configured on your system. This plugin serves as a convenient cross-platform wrapper for monorepo projects using Gradle Kotlin DSL.

Configuration

Apply the plugin and customize the espIdf extension in your firmware project's build.gradle.kts:

plugins {
  id("pl.miloszgilga.gradle.espidf") version "X.X.X"
}

espIdf {
  chip.set("esp32c3") // default: "esp32"
  port.set("/dev/ttyACM0") // default: OS-specific serial port (COM3, /dev/ttyACM0, /dev/cu.usbmodem101)
  baud.set("921600") // default: "921600"
  appVersion.set("1.0.0") // default: project.version (or "0.0.1-local-dev" if unspecified)
}

Available tasks (firmware group)

TaskDescription
checkEnvVerifies that the ESP-IDF environment and idf.py are properly configured.
setChipSets the compilation target chip (e.g., esp32c3, esp32s3, esp32).
buildFirmwareBuilds the full firmware (bootloader, partition table, and application).
buildAppOnlyBuilds only the application binary (skips bootloader and partition images).
rebuildFirmwareForces CMake reconfiguration and performs a full firmware rebuild.
flashFirmwareBuilds and flashes the full firmware to the board.
flashAppOnlyBuilds and flashes only the application partition to the board.
monitorFirmwareOpens the serial monitor with address-to-line backtrace decoding.
runFirmwareBuilds, flashes the full firmware, and immediately starts the serial monitor.
eraseFlashErases the entire flash memory on the chip (including NVS and other partitions).
cleanFirmwareCleans build output files (idf.py fullclean).
generateDocsGenerates project documentation using Doxygen.

Used technologies