Skip to content

Commit

Permalink
build: initialized JDK 21 build
Browse files Browse the repository at this point in the history
  • Loading branch information
v1nc3n4 committed Jun 14, 2024
1 parent 13ec65a commit d2eb93a
Show file tree
Hide file tree
Showing 60 changed files with 164 additions and 141 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 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. 8.1.0 JDK 17]
- OS: [e.g. Ubuntu 22.04.4, Windows 11 Pro, Mac OS X]
- JDK: [e.g. Adoptium Temurin JDK 21 64 bits]
- Gradle: [e.g. Gradle 8.8]
- Frontend Gradle plugin: [e.g. 8.1.0 JDK 21]

Settings in `build.gradle[.kts]` file:
```groovy
Expand Down
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ Hi,
Explain what you would like the plugin do: ...

**Target environment**

- OS: [e.g. Ubuntu 18.04.1, Windows 10 Pro, Mac OS X]
- JDK: [e.g. Oracle JDK 11 64 bits]
- Gradle: [e.g. Gradle 6.3]

- OS: [e.g. Ubuntu 22.04.4, Windows 11 Pro, Mac OS X]
- JDK: [e.g. Adoptium Temurin JDK 21 64 bits]
- Gradle: [e.g. Gradle 8.8]
- Frontend Gradle plugin: [e.g. 8.1.0 JDK 21]

Settings in `build.gradle[.kts]` file:
```groovy
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:
with:
fetch-depth: 1

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
java-version: '21'
architecture: x64

- name: Cache Gradle's cache and wrapper
Expand Down Expand Up @@ -89,4 +89,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew :plugin:sonar --console=plain -Dorg.gradle.jvmargs=-Xmx512m
run: ./gradlew :plugin:sonar --console=plain -Dorg.gradle.jvmargs=-Xmx512m -Dsonar.verbose=true
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ gradlew pluginUnderTestMetadata
## Continuous integration

The project relies on [GitHub Actions][github-actions] to integrate continuously every changes (pull requests) in the
repository. The configuration actually allows to build and test the plugin with Adoptium Temurin JDK 17 64 bits, on the
repository. The configuration actually allows to build and test the plugin with Adoptium Temurin JDK 21 64 bits, on the
environments below:

- Linux Ubuntu 22.04.4
- Mac OS 14.5
- Windows Server 2022

Ubuntu is the reference O/S, used to analyze the source code with SonarCloud. Developments are frequently done on a
Windows 10 Professionnal workstation with Adoptium Temurin JDK 17 64 bits and [IntelliJ IDEA][intellij-idea].
Windows 10 Professionnal workstation with Adoptium Temurin JDK 21 64 bits and [IntelliJ IDEA][intellij-idea].

[apache-commons-compress]: <https://commons.apache.org/proper/commons-compress/> (Apache Commons Compress)
[apache-http-components]: <https://hc.apache.org/> (Apache HttpComponents)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<a href="https://github.com/siouan/frontend-gradle-plugin/releases/tag/v8.1.0"><img src="https://img.shields.io/badge/Latest%20release-8.1.0-blue.svg" alt="Latest release 8.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=8.1-jdk17" alt="Build status"/></a>
<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=8.1-jdk21" alt="Build status"/></a>
<a href="https://sonarcloud.io/project/overview?id=siouan_frontend-gradle-plugin"><img src="https://sonarcloud.io/api/project_badges/measure?project=siouan_frontend-gradle-plugin&metric=alert_status" alt="Quality gate status"/></a>
<a href="https://sonarcloud.io/summary/overall?id=siouan_frontend-gradle-plugin"><img src="https://sonarcloud.io/api/project_badges/measure?project=siouan_frontend-gradle-plugin&metric=coverage" alt="Code coverage"/></a>
<a href="https://sonarcloud.io/summary/overall?id=siouan_frontend-gradle-plugin"><img src="https://sonarcloud.io/api/project_badges/measure?project=siouan_frontend-gradle-plugin&metric=reliability_rating" alt="Reliability"/></a>
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-jdk17")
id("org.siouan.frontend-jdk21")
}

//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-jdk17") version "8.1.0"
id("org.siouan.frontend-jdk21") version "8.1.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("org.siouan.frontend-jdk17")
id("org.siouan.frontend-jdk21")
}

frontend {
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-jdk17") version "8.1.0"
id("org.siouan.frontend-jdk21") version "8.1.0"
}
}

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

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

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-jdk17")
id("org.siouan.frontend-jdk21")
}

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-jdk17")
id("org.siouan.frontend-jdk21")
}

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-jdk17")
id("org.siouan.frontend-jdk21")
}

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-jdk17")
id("org.siouan.frontend-jdk21")
}

frontend {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk17") version "8.1.0"
id("org.siouan.frontend-jdk21") version "8.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-jdk17")
id("org.siouan.frontend-jdk21")
}

frontend {
Expand Down
2 changes: 1 addition & 1 deletion examples/npm-application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

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

frontend {
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-jdk17") version "8.1.0"
id("org.siouan.frontend-jdk21") version "8.1.0"
}
}
2 changes: 1 addition & 1 deletion examples/pnpm-application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

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

frontend {
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-jdk17") version "8.1.0"
id("org.siouan.frontend-jdk21") version "8.1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

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

frontend {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk17") version "8.1.0"
id("org.siouan.frontend-jdk21") version "8.1.0"
}
}
2 changes: 1 addition & 1 deletion examples/yarn-application-with-pnp-linker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.io.path.Path
import org.siouan.frontendgradleplugin.infrastructure.gradle.InstallFrontendTask

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

frontend {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
plugins {
id("org.siouan.frontend-jdk17") version "8.1.0"
id("org.siouan.frontend-jdk21") version "8.1.0"
}
}
5 changes: 2 additions & 3 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description = fgpDescription

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
Expand Down Expand Up @@ -106,7 +106,7 @@ sonarqube {
property("sonar.organization", "siouan")
property("sonar.projectKey", "siouan_frontend-gradle-plugin")
property("sonar.projectName", "frontend-gradle-plugin")
property("sonar.projectVersion", "${fgpVersion}-jdk17")
property("sonar.projectVersion", "${fgpVersion}-jdk21")

property("sonar.links.homepage", "https://github.com/siouan/frontend-gradle-plugin")
property("sonar.links.ci", "https://github.com/siouan/frontend-gradle-plugin/actions")
Expand All @@ -120,7 +120,6 @@ sonarqube {
property("sonar.java.test.binaries", "build/classes/java/test,build/classes/java/integrationTest")
property("sonar.junit.reportPaths", "build/test-results/test/,build/test-results/integrationTest/")
property("sonar.jacoco.xmlReportPaths", "build/reports/jacoco/report.xml")
property("sonar.verbose", true)

// Irrelevant duplications detected on task inputs
property(
Expand Down
2 changes: 1 addition & 1 deletion plugin/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ dependencies {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(21)
}
}
2 changes: 1 addition & 1 deletion plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fgpArtifactId=frontend-jdk17
fgpArtifactId=frontend-jdk21
fgpGroup=org.siouan
fgpVersion=8.1.0
fgpDisplayName=Frontend Gradle plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static org.siouan.frontendgradleplugin.test.PluginTaskOutcome.SUCCESS;
import static org.siouan.frontendgradleplugin.test.PluginTaskOutcome.UP_TO_DATE;
import static org.siouan.frontendgradleplugin.test.Resources.getResourcePath;
import static org.siouan.frontendgradleplugin.test.Resources.getResourceUrl;

import java.io.IOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -42,7 +41,7 @@ void setUp() throws IOException {
void should_skip_task_when_package_json_file_does_not_exist() throws IOException {
final FrontendMapBuilder frontendMapBuilder = new FrontendMapBuilder()
.nodeVersion("20.14.0")
.nodeDistributionUrl(getResourceUrl("node-v20.14.0.zip"))
.nodeDistributionUrl(getResourcePath("node-v20.14.0.zip"))
.assembleScript("run assemble")
.packageJsonDirectory(packageJsonDirectoryPath);
createBuildFile(projectDirectoryPath, frontendMapBuilder.toMap());
Expand All @@ -61,7 +60,7 @@ void should_skip_task_when_script_is_not_defined() throws IOException {
Files.copy(getResourcePath("package-any-manager.json"), packageJsonDirectoryPath.resolve("package.json"));
final FrontendMapBuilder frontendMapBuilder = new FrontendMapBuilder()
.nodeVersion("20.14.0")
.nodeDistributionUrl(getResourceUrl("node-v20.14.0.zip"))
.nodeDistributionUrl(getResourcePath("node-v20.14.0.zip"))
.packageJsonDirectory(packageJsonDirectoryPath);
createBuildFile(projectDirectoryPath, frontendMapBuilder.toMap());

Expand All @@ -79,7 +78,7 @@ void should_skip_task_when_running_gradle_task_and_script_is_not_defined() throw
Files.copy(getResourcePath("package-any-manager.json"), packageJsonDirectoryPath.resolve("package.json"));
final FrontendMapBuilder frontendMapBuilder = new FrontendMapBuilder()
.nodeVersion("20.14.0")
.nodeDistributionUrl(getResourceUrl("node-v20.14.0.zip"))
.nodeDistributionUrl(getResourcePath("node-v20.14.0.zip"))
.packageJsonDirectory(packageJsonDirectoryPath);
createBuildFile(projectDirectoryPath, frontendMapBuilder.toMap());

Expand All @@ -97,7 +96,7 @@ void should_assemble_frontend() throws IOException {
Files.copy(getResourcePath("package-any-manager.json"), packageJsonDirectoryPath.resolve("package.json"));
final FrontendMapBuilder frontendMapBuilder = new FrontendMapBuilder()
.nodeVersion("20.14.0")
.nodeDistributionUrl(getResourceUrl("node-v20.14.0.zip"))
.nodeDistributionUrl(getResourcePath("node-v20.14.0.zip"))
.packageJsonDirectory(packageJsonDirectoryPath)
.assembleScript("run assemble");
createBuildFile(projectDirectoryPath, frontendMapBuilder.toMap());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import static org.siouan.frontendgradleplugin.test.PluginTaskOutcome.SUCCESS;

import java.io.IOException;
import java.net.URL;
import java.net.URI;
import java.nio.file.Path;

import com.github.tomakehurst.wiremock.WireMockServer;
Expand Down Expand Up @@ -168,7 +168,7 @@ void should_install_node_when_authentication_succeeds_on_proxy_server() throws I
private FrontendMapBuilder configureNodeServerAndPluginWithDirectConnection(final String distributionServerPassword)
throws IOException {
return configureServerAndPlugin(
new URL("http", DISTRIBUTION_SERVER_HOST, DISTRIBUTION_SERVER_PORT, "/").toString(),
URI.create("http://" + DISTRIBUTION_SERVER_HOST + ':' + DISTRIBUTION_SERVER_PORT + "/").toString(),
NODE_DISTRIBUTION_URL_PATH_PATTERN, DISTRIBUTION_SERVER_USERNAME, distributionServerPassword, null, null,
null, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static org.siouan.frontendgradleplugin.test.PluginTaskOutcome.SUCCESS;
import static org.siouan.frontendgradleplugin.test.PluginTaskOutcome.UP_TO_DATE;
import static org.siouan.frontendgradleplugin.test.Resources.getResourcePath;
import static org.siouan.frontendgradleplugin.test.Resources.getResourceUrl;

import java.io.IOException;
import java.nio.file.Files;
Expand All @@ -34,7 +33,7 @@ class CheckFrontendTaskFuncTest {
void should_skip_task_when_package_json_file_does_not_exist() throws IOException {
final FrontendMapBuilder frontendMapBuilder = new FrontendMapBuilder()
.nodeVersion("20.14.0")
.nodeDistributionUrl(getResourceUrl("node-v20.14.0.zip"))
.nodeDistributionUrl(getResourcePath("node-v20.14.0.zip"))
.checkScript("run check");
createBuildFile(projectDirectoryPath, frontendMapBuilder.toMap());

Expand All @@ -52,7 +51,7 @@ void should_skip_task_when_script_is_not_defined() throws IOException {
Files.copy(getResourcePath("package-any-manager.json"), projectDirectoryPath.resolve("package.json"));
final FrontendMapBuilder frontendMapBuilder = new FrontendMapBuilder()
.nodeVersion("20.14.0")
.nodeDistributionUrl(getResourceUrl("node-v20.14.0.zip"));
.nodeDistributionUrl(getResourcePath("node-v20.14.0.zip"));
createBuildFile(projectDirectoryPath, frontendMapBuilder.toMap());

final BuildResult result1 = runGradle(projectDirectoryPath, CHECK_TASK_NAME);
Expand All @@ -69,7 +68,7 @@ void should_skip_task_when_running_gradle_task_and_script_is_not_defined() throw
Files.copy(getResourcePath("package-any-manager.json"), projectDirectoryPath.resolve("package.json"));
final FrontendMapBuilder frontendMapBuilder = new FrontendMapBuilder()
.nodeVersion("20.14.0")
.nodeDistributionUrl(getResourceUrl("node-v20.14.0.zip"));
.nodeDistributionUrl(getResourcePath("node-v20.14.0.zip"));
createBuildFile(projectDirectoryPath, frontendMapBuilder.toMap());

final BuildResult result1 = runGradle(projectDirectoryPath, GRADLE_CHECK_TASK_NAME);
Expand All @@ -86,7 +85,7 @@ void should_check_frontend() throws IOException {
Files.copy(getResourcePath("package-any-manager.json"), projectDirectoryPath.resolve("package.json"));
final FrontendMapBuilder frontendMapBuilder = new FrontendMapBuilder()
.nodeVersion("20.14.0")
.nodeDistributionUrl(getResourceUrl("node-v20.14.0.zip"))
.nodeDistributionUrl(getResourcePath("node-v20.14.0.zip"))
.checkScript("run check");
createBuildFile(projectDirectoryPath, frontendMapBuilder.toMap());

Expand Down
Loading

0 comments on commit d2eb93a

Please sign in to comment.