Getting started

Requirements

The following tools must be installed to use the plugin:

The plugin is built and tested on Linux, Mac OS, Windows (see the list of build environments used in the contributing notes).

Supported distributions

Steps

  1. Install the plugin.
    • Using Gradle DSL (recommended)

      plugins {
          // For JDK 21+
          id 'org.siouan.frontend-jdk21' version '10.0.0'
          // For JDK 17+
          id 'org.siouan.frontend-jdk17' version '10.0.0'
          // For JDK 11+
          id 'org.siouan.frontend-jdk11' version '10.0.0'
      }
      plugins {
          // For JDK 21+
          id("org.siouan.frontend-jdk21") version "10.0.0"
          // For JDK 17+
          id("org.siouan.frontend-jdk17") version "10.0.0"
          // For JDK 11+
          id("org.siouan.frontend-jdk11") version "10.0.0"
      }
    • Using Gradle build script block

      buildscript {
          repositories {
              url 'https://plugins.gradle.org/m2/'
          }
          dependencies {
              // For JDK 21+
              classpath 'org.siouan:frontend-gradle-plugin-jdk21:10.0.0'
              // For JDK 17+
              classpath 'org.siouan:frontend-gradle-plugin-jdk17:10.0.0'
              // For JDK 11+
              classpath 'org.siouan:frontend-gradle-plugin-jdk11:10.0.0'
          }
      }
      
      // For JDK 21+
      apply plugin: 'org.siouan.frontend-jdk21'
      // For JDK 17+
      apply plugin: 'org.siouan.frontend-jdk17'
      // For JDK 11+
      apply plugin: 'org.siouan.frontend-jdk11'
      buildscript {
          repositories {
              url = uri("https://plugins.gradle.org/m2/")
          }
          dependencies {
              // For JDK 21+
              classpath("org.siouan:frontend-gradle-plugin-jdk21:10.0.0")
              // For JDK 17+
              classpath("org.siouan:frontend-gradle-plugin-jdk17:10.0.0")
              // For JDK 11+
              classpath("org.siouan:frontend-gradle-plugin-jdk11:10.0.0")
          }
      }
      
      // For JDK 21+
      apply(plugin = "org.siouan.frontend-jdk21")
      // For JDK 17+
      apply(plugin = "org.siouan.frontend-jdk17")
      // For JDK 11+
      apply(plugin = "org.siouan.frontend-jdk11")
  2. Define the packageManager property in the package.json file: (npm|pnpm|yarn)@x.y.z(+hash) (other syntax defined by Corepack is not supported).
  3. Add .frontend-gradle-plugin/ directory to .gitignore file(s).
  4. Configure the build, test (check), deploy (publish) phases in your project, with the help of the built-in tasks dependency tree and optionally examples provided for typical use cases.
  5. Run gradlew build.
  6. Additionally: