Skip to content

Releases: siouan/frontend-gradle-plugin

8.1.0

14 Jun 14:55
Compare
Choose a tag to compare

Requirements

Features

Bug fixes

  • Serialization issues and compatibility with Gradle configuration cache (#217).

Additional notes

  • JDK 11 build will be abandoned in the next major release (9.0.0).

Latest upgrade notes available in release 8.0.0

Contributions

8.0.0

24 Aug 07:25
Compare
Choose a tag to compare

Requirements

Features

  • Support of Node.js Linux ARM64 distributions (#190).
  • Retry capability when downloading the Node.js distribution (#201).

Bug fixes

  • Task installPackageManager and depending tasks could be executed unexpectedly with corrupted inputs when task resolvePackageManager was skipped (#206).

Breaking changes

  • Due to issue #206, support of FGP_NODEJS_HOME environment variable for the Node.js install directory is abandoned as it was impacting significantly implementation of new tasks resolvePackageManager and installPackageManager. However, the same behaviour may be obtained using an explicity configuration of property nodeInstallDirectory (see hereafter).

Upgrading from 7.0.0+

If the build was relying on FGP_NODEJS_HOME environment variable, see this FAQ for an alternative implementation.

Contributions

7.0.0

08 Jul 16:19
Compare
Choose a tag to compare

Support of package managers through corepack

Requirements

Features

  • Initial support of PNPM (#183)
  • Release of JDK 17 built.

Breaking changes

  • Tasks NodeInstallTask and InstallDependenciesTask were renamed to match naming convention of other tasks.
  • Tasks installGlobalYarn, enableYarnBerry, installYarn were removed since installation is now managed by corepack.
  • Task type RunNpx was removed after command npx became deprecated. Command npm exec should be used instead.

Upgrading from 6.0.0+

  • Define property packageManager in your package.json file (e.g. npm@9.6.7, pnpm@8.6.0, yarn@3.6.0, etc.).
  • Add .frontend-gradle-plugin/ directory to .gitignore file(s) (see cacheDirectory property).
  • Rename task classes NodeInstallTask and InstallDependenciesTask into InstallNodeTask and InstallFrontendTask in build scripts.
  • Remove yarnEnabled and yarnVersion properties from build scripts, if any (already known with property packageManager).
  • Update any custom task based on type RunNpx: use type RunNpm instead and prepend exec -- to the script property value. See official documentation here for detailed usage and examples.
  • JDK 8 is not supported anymore. Projects must upgrade to JDK 11+.

6.0.0

07 Nov 17:51
Compare
Choose a tag to compare

Yarn Berry initial support (Yarn 1, Yarn 2+)

Introduction

Yarn 2+ (Berry codename) is a massive rewrite of the package manager. Contrary to former Classic Yarn 1.x for which distribution archives are published, Yarn 2+ cannot be installed with a distribution archive anymore. Download and installation are entirely handled by Yarn itself, thanks to a preliminary global install with NPM.

This release brings an initial support of new Yarn package manager (often referred to as Yarn Berry, Yarn 2, or Yarn PnP), which provides access to Yarn releases 1.x and above in a different way than previous release of the package manager. This initial support means that we focused mainly on migration of projects based on Classic Yarn, to ensure they can go on using the plugin and a Yarn 1.x distribution through Yarn Berry "mode". There may be many use cases specific to Yarn 2 that the plugin is not aware of.

Impacts

The plugin components formerly in charge of downloading Classic Yarn 1.x distributions had to be refactored to handle Yarn installation in a different way, the way enforced by Yarn Berry:

  • The plugin does not download and explode a Yarn distribution anymore.
  • Using a proxy to download Yarn distributions must be configured at Yarn's level.
  • Basic authentication settings for Yarn become unrelevant.
  • Installing Yarn now requires the Node.js distribution to be present (i.e. the installNode task becomes an indirect dependency of the installYarn task). Indirect because before the appropriate Yarn distribution is installed in the (sub-)project, the plugin executes new tasks installGlobalYarn and enableYarnBerry. These 2 "technical" tasks allow to prepare the per-project installation, as explained in Yarn's install guide. The dependency chain now becomes installNode <- installGlobalYarn <- enableYarnBerry <- installYarn, and is executed left to right. The installYarn task still means the same thing: get a ready-to-use Yarn distribution for the project.

Features

  • Added support of Yarn 2 (#139)

Tasks

  • Task type RunNpmYarn was split in 2 distinct types RunNpm and RunYarn.

Upgrading from 5.0.0+

A definitive migration guide is very difficult to achieve, as there are many different configurations to take into account. Feel free to report any issue/improvement in the suggested steps below:

  • Ensure you are able to rollback to a previous version of your project in case of problem (VCS, backup, etc).
  • NODEJS_HOME environment variable is not used anymore by the plugin to resolve the location of the node executable. Now the plugin relies on the FGP_NODEJS_HOME environment variable. Update your environment variables accordingly if your build was explicitly relying on this variable (see documentation of the nodeDistributionProvided property).
  • The project relies on NPM (i.e. yarnEnabled property is false):
    • Update any custom task using the former RunNpmYarn type with RunNpm type.
  • The project relies on Yarn (i.e. yarnEnabled property is true):
    • If the yarnDistributionProvided property is false, the plugin will not use a previously downloaded distribution (i.e. the one pointed by the yarnInstallDirectory property). You may remove it.
    • Any YARN_HOME environment variable may have to be renamed, because YARN_* environment variables are now used automatically by Yarn to resolve some of its settings (see this section). Note that the YARN_HOME environment variable is not used anymore by the plugin to resolve a Yarn distribution on the system.
    • Remove properties yarnDistributionProvided, yarnDistributionUrlRoot, yarnDistributionUrlPathPattern, yarnDistributionServerUsername, yarnDistributionServerPassword, yarnInstallDirectory.
    • Update any custom task using the former RunNpmYarn type with RunYarn type.
    • Proxy settings don't apply to Yarn anymore. Refer to Yarn's documentation of httpsProxy property or httpProxy property) as a replacement.
    • If the nodeDistributionProvided property is false, and the Node.js distribution is not shared with other projects outside the root project, upgrade shall be completed.
    • Otherwise, ensure installing a Classic Yarn 1.x distribution globally (i.e. in the Node.js distribution) does not break other projects (the yarn executable located now in the Node.js distribution might take precedence over another executable).

We don't recommend upgrading simultaneously the plugin and Yarn (i.e. updating yarnVersion property to 2.x), to ease troubleshooting in case of problems. If you do so, keep in mind the plugin won't perform the migration of your project files (for this particular point, you should follow Yarn's migration guide). Instead:

  1. First upgrade the plugin, and migrate project by following Yarn's migration guide. Ensure everything is working fine without changing the yarnVersion property (i.e. keep a Yarn 1.x distribution). At this point, keep in mind Yarn Berry deals with these distributions, and will take over from the plugin to download and install the relevant distribution.
  2. Then update Yarn's version.

5.3.0

25 Jul 09:13
Compare
Choose a tag to compare

Features

  • Added support of Node.js Linux ARMv7 distribution (#165)

Latest upgrade notes available in release 5.0.0

5.2.0

30 May 14:39
Compare
Choose a tag to compare

This release brings support of Gradle 7.0 and its configuration cache. The minimum requirement now becomes Gradle 6.1 instead of Gradle 5.1.

Features

Latest upgrade notes available in release 5.0.0

5.1.0

02 May 09:40
Compare
Choose a tag to compare

Features

  • Added support of Node.js Apple Silicon distribution (ARM64), which requires Node.js 16.0.0 (#148)

Latest upgrade notes available in release 5.0.0

5.0.1

12 Mar 19:24
Compare
Choose a tag to compare

Bug fixes

  • Fixed UnsupportedPlatformException when URL path pattern contains a static value (#149)
  • Fixed basic authentication on distribution server with HTTPS protocol (#152)
  • Fixed whitespaces management in executable paths under Unix-like O/S (#153)

Latest upgrade notes available in release 5.0.0

Contributions

5.0.0

15 Jan 15:20
Compare
Choose a tag to compare

This release brings breaking changes about HTTP/HTTPS proxy management, to provide support of JVM network properties. proxy* properties in the plugin are renamed, and default value for port changes.

Features

  • Possible use of JVM network properties (JDK 11 / JDK 8) when proxying HTTP/HTTPS requests (#136)

Bug fixes

  • Fixed ConcurrentModificationException thrown when Gradle's parallel mode is enabled (#141)
  • Fixed "Invalid cookie header" warnings when running task installYarn (#134)

Tasks

  • Migrate CI to GitHub actions instead of Travis (#145)

Upgrading from 4.0.0+

  1. The plugin's extension now supports distinct settings:
  • To configure usage of a proxy for HTTPS requests: use httpsProxyHost, httpsProxyPort, httpsProxyUsername, httpsProxyPassword properties.
  • To configure usage of a proxy for HTTP requests: use httpProxyHost, httpProxyPort, httpProxyUsername, httpProxyPassword properties.

JVM network property http.nonProxyHosts is also used now by the plugin to eventually disable proxying, for both HTTP and HTTPS requests.

  • If you were using former proxy* properties, in most cases, you should just have to rename these properties into httpsProxy* properties, or httpProxy* properties if you used non-secure URLs in nodeDistributionUrlRoot or yarnDistributionUrlRoot properties. You may also have to set explicitly proxy port with httpsProxyPort or httpProxyPort properties, because the default value changed.
  • If you were not using former proxy* properties, upgrading should be effortless as long as your JVM network properties allow downloading distributions.
  1. Default value for the proxy port is changed

Formerly, the plugin used port 8080 as the default value for the proxyPort property. With new httpsProxyPort and httpProxyPort properties, default values are port 443 and port 80 respectively.

4.0.1

01 Nov 13:58
Compare
Choose a tag to compare

Bug fixes

  • Fixed HTTP 407 responses with HTTP proxy authentication and HTTPS distribution server (#131).

Tasks

  • Removed HTTP with BASIC authentication usage security warning.

Latest upgrade notes available in release 4.0.0