Skip to content

Commit

Permalink
feat: backport changes from branch 7.1-jdk17 (#204)
Browse files Browse the repository at this point in the history
* build: initialize JDK 17 build

* fix: remove Gradle Enterprise test distribution

* refactor: move immutable classes to records

* doc: fix minor documentation issues [skip ci]

* refactor: renamed default branch

* docs: merge latest documentation updates from main branch [skip ci]

* chore(release): initialize release 7.1.0

* feat: add support of Node.js distribution for Linux ARM64 architectures (#199)

Fixes #190

* feat: add support for retryable download of Node.js distribution (#202)

* add retry mechanism to downloads (#200)

* Fixed line endings.

* Fixed Gradle Wrapper mode.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed sitemap.

* Fixed test coverage reporting.

* Fixed website issues.

* Before merging branch 4.0-jdk11.

* Added website publication.

* Updated sitemap.

* Fixed invalid SpringBoot version number in examples

* Initialized release 5.0.1.

* Fixed #153 (#154) (#155)

* Fixed #152 (#156)

* Added contributor.

* Merged fix for #149 (#157)

* Upgraded to Gradle 6.8.3.

* Updated website.

* Initialized release 5.1.0.

* Fixed #148 (#159)

* Merged changes from branch 5.1-jdk8.

* Initialized release 5.2.0.

* Fixed #161 (#163)

* Merged changes from branch 5.2-jdk8.

* Merged changes from branch master.

* Updated documentation.

* Initialized release 5.3.0.

* Fixed #165 (#166)

* Added FAQ section.

* Fixed page title

* chore(release): release 7.0.0

* doc: fixed website publication [skip ci]

* docs: fix web page metadata

* docs: fix web page metadata

* docs: add links to released artifacts, fix descriptions for examples [skip ci]

* docs: fix website publication [skip ci]

* docs: add missing component import [skip ci]

* add retry mechanism to downloads

---------

Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Vincent BA <5869062+v1nc3n4@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>

* feat: add support for retryable download of Node.js distribution

Fixes #201

---------

Co-authored-by: Jean Detoeuf <jean.detoeuf@instana.com>
Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>

* chore(deps): upgrade dependencies (#203)

* fix: fix code quality issue

* docs: update installNode task description and sitemap [skip ci]

* feat: backport changes from branch 7.1-jdk17

---------

Co-authored-by: Jean Detoeuf <jean.detoeuf@instana.com>
Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>
  • Loading branch information
4 people authored Aug 18, 2023
1 parent a910fce commit 1a308a3
Show file tree
Hide file tree
Showing 111 changed files with 1,172 additions and 510 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Actual results: ...

**Environment**

- OS: [e.g. Ubuntu 22.04.1, Windows 10 Pro, Mac OS X]
- JDK: [e.g. Oracle JDK 11 64 bits]
- Gradle: [e.g. Gradle 7.5.1]
- Frontend Gradle plugin: [e.g. 7.0.0 JDK 11]
- OS: [e.g. Ubuntu 22.04.1, Windows 11 Pro, Mac OS X]
- JDK: [e.g. Adoptium Temurin JDK 17 64 bits]
- Gradle: [e.g. Gradle 8.2.1]
- Frontend Gradle plugin: [e.g. 7.1.0 JDK 11]

Settings in `build.gradle[.kts]` file:
```groovy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build

on:
push:
branches: [ 'master', '*.*-jdk*' ]
branches: [ 'main', '*.*-jdk*' ]
pull_request:
branches: [ 'master', '*.*-jdk*' ]
branches: [ 'main', '*.*-jdk*' ]
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ After ensuring the problem was not reported already, any issue may be created us

#### Long-term branches

- Production branch: the `master` branch contains stable releases compiled with the most recent LTS JDK. The `HEAD`
- Production branch: the `main` branch contains stable releases compiled with the most recent LTS JDK. The `HEAD`
revision matches generally the latest stable release, though it may sometimes contain above the latest release some
fixes unrelated to the packaged software (online documentation, CI workflows, etc.) It MUST receive commits only with
pull requests merged from version branches.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="https://www.npmjs.com/" title="npm">npm</a>, <a href="https://pnpm.io/" title="pnpm">pnpm</a>,
<a href="https://yarnpkg.com/" title="Yarn">Yarn</a> builds</h2>
<p align="center">
<a href="https://github.com/siouan/frontend-gradle-plugin/releases/tag/v7.0.0"><img src="https://img.shields.io/badge/Latest%20release-7.0.0-blue.svg" alt="Latest release 7.0.0"/></a>
<a href="https://github.com/siouan/frontend-gradle-plugin/releases/tag/v7.1.0"><img src="https://img.shields.io/badge/Latest%20release-7.1.0-blue.svg" alt="Latest release 7.1.0"/></a>
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-green.svg" alt="License Apache 2.0"/></a>
<br/>
<a href="https://github.com/siouan/frontend-gradle-plugin/actions/workflows/build.yml"><img src="https://github.com/siouan/frontend-gradle-plugin/actions/workflows/build.yml/badge.svg?branch=7.0-jdk17" alt="Build status"/></a>
Expand Down Expand Up @@ -67,6 +67,7 @@ With their feedback, plugin improvement is possible. Special thanks to:
@[rolaca11](https://github.com/rolaca11),
@[stephanebastian](https://github.com/stephanebastian),
@[TapaiBalazs](https://github.com/TapaiBalazs),
@[thebignet](https://github.com/thebignet)
@[tngwoerleij](https://github.com/tngwoerleij),
@[trohr](https://github.com/trohr),
@[xehonk](https://github.com/xehonk)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Example: build a simple JS application using a preinstalled [Node.js][nodejs] distribution.
## Example: build a Javascript application using a preinstalled [Node.js][nodejs] distribution.

This example demonstrates how to configure a Gradle project to build a Javascript application.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNode
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

//val preinstalledNodeDistributionDirectory = file(<path-to-nodejs-install-directory>);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.1.0"
}
}
4 changes: 2 additions & 2 deletions examples/fullstack-war-application/frontend/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
nodeVersion.set("18.16.0")
nodeVersion.set("18.17.1")
assembleScript.set("run build")
cleanScript.set("run clean")
checkScript.set("run check")
Expand Down
2 changes: 1 addition & 1 deletion examples/fullstack-war-application/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
id("war")
id("org.springframework.boot") version "2.7.12"
id("io.spring.dependency-management") version "1.1.0"
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.1.0"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Example: build multiple frontend applications with dedicated sub-projects using shared distributions
## Example: build multiple frontend applications with different package managers and a shared [Node.js][nodejs]
distribution.

This example demonstrates how a single [Node.js][nodejs] distribution may be installed and shared among multiple
subprojects, and how different package managers may be used in these subprojects.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNode

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
nodeVersion.set("18.16.0")
nodeVersion.set("18.17.1")
nodeInstallDirectory.set(file(rootProject.ext.get("nodeInstallDirectory")!!))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunPnpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunPnpm

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.1.0"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunYarn

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.siouan.frontendgradleplugin.infrastructure.gradle.ResolvePackageManag
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunYarn

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
Expand Down
5 changes: 3 additions & 2 deletions examples/npm-application/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Example: build a simple JS application
## Example: build a npm application

This example demonstrates how to configure a Gradle project to install a [Node.js][nodejs] distribution, and build a
Javascript application.
Javascript application with [npm][npm].

### Requirements

Expand All @@ -15,3 +15,4 @@ Javascript application.

[gradle-wrapper]: <https://docs.gradle.org/current/userguide/gradle_wrapper.html> (Gradle Wrapper)
[nodejs]: <https://nodejs.org/> (Node.js)
[npm]: <https://www.npmjs.com> (npm)
4 changes: 2 additions & 2 deletions examples/npm-application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
nodeVersion.set("18.16.0")
nodeVersion.set("18.17.1")
assembleScript.set("run build")
cleanScript.set("run clean")
checkScript.set("run check")
Expand Down
2 changes: 1 addition & 1 deletion examples/npm-application/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.1.0"
}
}
5 changes: 3 additions & 2 deletions examples/pnpm-application/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Example: build a simple JS application
## Example: build a pnpm application

This example demonstrates how to configure a Gradle project to install a [Node.js][nodejs] distribution, and build a
Javascript application.
Javascript application with [pnpm][pnpm].

### Requirements

Expand All @@ -15,3 +15,4 @@ Javascript application.

[gradle-wrapper]: <https://docs.gradle.org/current/userguide/gradle_wrapper.html> (Gradle Wrapper)
[nodejs]: <https://nodejs.org/> (Node.js)
[pnpm]: <https://pnpm.io/> (pnpm)
4 changes: 2 additions & 2 deletions examples/pnpm-application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
nodeVersion.set("18.16.0")
nodeVersion.set("18.17.1")
assembleScript.set("run build")
cleanScript.set("run clean")
checkScript.set("run check")
Expand Down
2 changes: 1 addition & 1 deletion examples/pnpm-application/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.1.0"
}
}
6 changes: 4 additions & 2 deletions examples/yarn-application-with-node-modules-linker/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Example: build a simple JS application
## Example: build a Yarn application with legacy `node-modules` linker

This example demonstrates how to configure a Gradle project to install a [Node.js][nodejs] distribution, and build a
Javascript application.
Javascript application with [Yarn][yarn] and the `node-modules` linker

### Requirements

Expand All @@ -12,6 +12,8 @@ Javascript application.
- [`settings.gradle.kts`](settings.gradle.kts): defines version of used plugins.
- [`build.gradle.kts`](build.gradle.kts): applies and configure this plugin.
- [`package.json`](package.json): scripts connected to Gradle lifecycle tasks `clean`, `assemble`, `check`.
- [`.yarnrc.yml`](.yarnrc.yml): defines custom Yarn configuration options such as the linker.

[gradle-wrapper]: <https://docs.gradle.org/current/userguide/gradle_wrapper.html> (Gradle Wrapper)
[nodejs]: <https://nodejs.org/> (Node.js)
[yarn]: <https://yarnpkg.com/> (Yarn)
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
nodeVersion.set("18.16.0")
nodeVersion.set("18.17.1")
assembleScript.set("run build")
cleanScript.set("run clean")
checkScript.set("run check")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.1.0"
}
}
5 changes: 3 additions & 2 deletions examples/yarn-application-with-pnp-linker/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Example: build a simple JS application
## Example: build a Yarn application with default `pnp` linker

This example demonstrates how to configure a Gradle project to install a [Node.js][nodejs] distribution, and build a
Javascript application.
Javascript application with [Yarn][yarn] and its default linker.

### Requirements

Expand All @@ -15,3 +15,4 @@ Javascript application.

[gradle-wrapper]: <https://docs.gradle.org/current/userguide/gradle_wrapper.html> (Gradle Wrapper)
[nodejs]: <https://nodejs.org/> (Node.js)
[yarn]: <https://yarnpkg.com/> (Yarn)
4 changes: 2 additions & 2 deletions examples/yarn-application-with-pnp-linker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

plugins {
id("org.siouan.frontend-jdk11")
id("org.siouan.frontend-jdk17")
}

frontend {
nodeVersion.set("18.16.0")
nodeVersion.set("18.17.1")
assembleScript.set("run build")
cleanScript.set("run clean")
checkScript.set("run check")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk11") version "7.0.0"
id("org.siouan.frontend-jdk17") version "7.1.0"
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
27 changes: 16 additions & 11 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,22 @@ configurations["intTestRuntimeOnly"]

dependencies {
implementation(gradleApi())
implementation("io.github.resilience4j:resilience4j-retry:1.7.1")
implementation("org.apache.httpcomponents.client5:httpclient5:5.2.1")
implementation("org.apache.commons:commons-compress:1.23.0")
implementation("org.json:json:20230227")
compileOnly("org.projectlombok:lombok:1.18.26")
annotationProcessor("org.projectlombok:lombok:1.18.26")

testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.3")
testImplementation("org.mockito:mockito-core:5.3.1")
testImplementation("org.mockito:mockito-junit-jupiter:5.3.1")
implementation("org.json:json:20230618")
compileOnly("org.projectlombok:lombok:1.18.28")
annotationProcessor("org.projectlombok:lombok:1.18.28")

testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.0")
testImplementation("org.mockito:mockito-core:5.4.0")
testImplementation("org.mockito:mockito-junit-jupiter:5.4.0")
testImplementation("org.junit-pioneer:junit-pioneer:2.0.1")
testImplementation("org.assertj:assertj-core:3.24.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.3")
testCompileOnly("org.projectlombok:lombok:1.18.26")
testAnnotationProcessor("org.projectlombok:lombok:1.18.26")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0")
testCompileOnly("org.projectlombok:lombok:1.18.28")
testAnnotationProcessor("org.projectlombok:lombok:1.18.28")

intTestImplementation("com.github.tomakehurst:wiremock:2.27.2")
}
Expand All @@ -77,6 +78,10 @@ tasks.named<Wrapper>("wrapper") {
tasks.withType<Test> {
useJUnitPlatform()
outputs.upToDateWhen { false }
jvmArgs(
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
"--add-opens", "java.base/java.util=ALL-UNNAMED"
)
}

tasks.register<Test>("integrationTest") {
Expand Down
2 changes: 1 addition & 1 deletion plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fgpArtifactId=frontend-jdk11
fgpGroup=org.siouan
fgpVersion=7.0.0
fgpVersion=7.1.0
fgpDisplayName=Frontend Gradle plugin
fgpDescription=Build Javascript applications with Node, NPM, PNPM, Yarn: distribution management and package manager activation (Corepack), built-in tasks, additional task types.
fgpImplementationClass=org.siouan.frontendgradleplugin.FrontendGradlePlugin
Expand Down
Loading

0 comments on commit 1a308a3

Please sign in to comment.