nonProxyHosts = Set.of();
- final URL resourceUrl = new URL(HTTPS_RESOURCE_URL);
+ final URL resourceUrl = URI.create(HTTPS_RESOURCE_URL).toURL();
when(isNonProxyHost.execute(IsNonProxyHostCommand
.builder()
.nonProxyHosts(nonProxyHosts)
diff --git a/plugin/src/test/java/org/siouan/frontendgradleplugin/domain/installer/ValidateNodeDistributionTest.java b/plugin/src/test/java/org/siouan/frontendgradleplugin/domain/installer/ValidateNodeDistributionTest.java
index d69b97a4..beb3d051 100644
--- a/plugin/src/test/java/org/siouan/frontendgradleplugin/domain/installer/ValidateNodeDistributionTest.java
+++ b/plugin/src/test/java/org/siouan/frontendgradleplugin/domain/installer/ValidateNodeDistributionTest.java
@@ -12,6 +12,8 @@
import java.io.IOException;
import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Path;
import java.util.Optional;
@@ -42,8 +44,8 @@ class ValidateNodeDistributionTest {
static {
try {
- DISTRIBUTION_URL = new URL(DISTRIBUTION_BASE_URL + "node-v9.2.4-win-x64.zip");
- CHECKSUM_URL = new URL(DISTRIBUTION_BASE_URL + SHASUMS_FILE_NAME);
+ DISTRIBUTION_URL = URI.create(DISTRIBUTION_BASE_URL + "node-v9.2.4-win-x64.zip").toURL();
+ CHECKSUM_URL = URI.create(DISTRIBUTION_BASE_URL + SHASUMS_FILE_NAME).toURL();
} catch (final MalformedURLException e) {
throw new RuntimeException(e);
}
@@ -239,7 +241,7 @@ void should_fail_when_distribution_file_hash_is_incorrect() throws IOException,
@Test
void should_return_when_distribution_file_is_valid()
throws IOException, NodeDistributionShasumNotFoundException, InvalidNodeDistributionException,
- ResourceDownloadException {
+ ResourceDownloadException, URISyntaxException {
when(buildTemporaryFileName.execute(SHASUMS_FILE_NAME)).thenReturn(TMP_SHASUMS_FILE_NAME);
final Path downloadedShasumFilepath = temporaryDirectoryPath.resolve(SHASUMS_FILE_NAME);
final String expectedHash = "0123456789abcdef";
diff --git a/plugin/src/test/java/org/siouan/frontendgradleplugin/infrastructure/archiver/TarArchiverTest.java b/plugin/src/test/java/org/siouan/frontendgradleplugin/infrastructure/archiver/TarArchiverTest.java
index b1775733..03483ec3 100644
--- a/plugin/src/test/java/org/siouan/frontendgradleplugin/infrastructure/archiver/TarArchiverTest.java
+++ b/plugin/src/test/java/org/siouan/frontendgradleplugin/infrastructure/archiver/TarArchiverTest.java
@@ -7,8 +7,8 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
-import static org.siouan.frontendgradleplugin.test.Resources.getResourcePath;
import static org.siouan.frontendgradleplugin.domain.PlatformFixture.LOCAL_PLATFORM;
+import static org.siouan.frontendgradleplugin.test.Resources.getResourcePath;
import java.io.IOException;
import java.io.InputStream;
@@ -56,7 +56,12 @@ void should_fail_initializing_context_when_tar_archive_does_not_exist() throws I
.targetDirectoryPath(targetDirectoryPath)
.build();
- assertThatThrownBy(() -> archiver.initializeContext(settings)).isInstanceOf(IOException.class);
+ assertThatThrownBy(() -> {
+ try (@SuppressWarnings("unused") final TarArchiverContext tarArchiverContext = archiver.initializeContext(
+ settings)) {
+ // Do nothing since context initialization is expected to fail.
+ }
+ }).isInstanceOf(IOException.class);
verifyNoMoreInteractions(fileManager);
}
@@ -74,9 +79,12 @@ void should_fail_initializing_context_when_uncompressing_error_occurs() throws I
.build();
final IOException expectedException = new IOException();
- assertThatThrownBy(
- () -> new TarArchiverWithFailure(fileManager, expectedException).initializeContext(settings)).isEqualTo(
- expectedException);
+ assertThatThrownBy(() -> {
+ try (@SuppressWarnings("unused") final TarArchiverContext tarArchiverContext = new TarArchiverWithFailure(
+ fileManager, expectedException).initializeContext(settings)) {
+ // Do nothing since context initialization is expected to fail.
+ }
+ }).isEqualTo(expectedException);
verify(inputStream).close();
verifyNoMoreInteractions(inputStream, fileManager);
diff --git a/plugin/src/test/java/org/siouan/frontendgradleplugin/infrastructure/archiver/ZipEntryTest.java b/plugin/src/test/java/org/siouan/frontendgradleplugin/infrastructure/archiver/ZipEntryTest.java
index 2312d8e9..1a2faa15 100644
--- a/plugin/src/test/java/org/siouan/frontendgradleplugin/infrastructure/archiver/ZipEntryTest.java
+++ b/plugin/src/test/java/org/siouan/frontendgradleplugin/infrastructure/archiver/ZipEntryTest.java
@@ -39,7 +39,7 @@ void should_map_entry_to_directory_archive_entry(final String entryName, final i
final ZipEntry entry = new ZipEntry(lowLevelEntry);
- assertThat(entry.getLowLevelEntry()).isEqualTo(lowLevelEntry);
+ assertThat(entry.lowLevelEntry()).isEqualTo(lowLevelEntry);
assertThat(entry.getName()).isEqualTo(entryName);
assertThat(entry.getUnixMode()).isEqualTo(unixMode);
assertThat(entry.isDirectory()).isEqualTo(directory);
diff --git a/site/build.gradle.kts b/site/build.gradle.kts
index e7e48879..ad4c2af9 100644
--- a/site/build.gradle.kts
+++ b/site/build.gradle.kts
@@ -4,12 +4,12 @@ buildscript {
}
dependencies {
- classpath("org.siouan", "frontend-jdk17", "8.1.0")
+ classpath("org.siouan", "frontend-jdk21", "8.1.0")
}
}
plugins {
- id("org.siouan.frontend-jdk17")
+ id("org.siouan.frontend-jdk21")
}
frontend {
diff --git a/site/src/components/property/property.vue b/site/src/components/property/property.vue
index 2bea5388..a461f515 100644
--- a/site/src/components/property/property.vue
+++ b/site/src/components/property/property.vue
@@ -70,7 +70,7 @@ const jdkHref = computed(() => {
if (props.type) {
const matches = QUALIFIED_JDK_CLASS_NAME_REGEXP.exec(props.type);
if (matches && matches.groups?.fqcn) {
- return `https://docs.oracle.com/en/java/javase/17/docs/api/java.base/${matches.groups.fqcn.replace(/\./g, '/')}.html`;
+ return `https://docs.oracle.com/en/java/javase/21/docs/api/java.base/${matches.groups.fqcn.replace(/\./g, '/')}.html`;
}
}
return null;
diff --git a/site/src/components/task/install-corepack-task.vue b/site/src/components/task/install-corepack-task.vue
index 438fd393..dfdd7035 100644
--- a/site/src/components/task/install-corepack-task.vue
+++ b/site/src/components/task/install-corepack-task.vue
@@ -31,8 +31,8 @@
As the task touches the install directory, please pay attention when using a shared
distribution ( is true), because this task will impact other projects using . This may be an
- expected behavior, or lead to an undesirable side-effect.
+ >true), because this task will impact other projects using . This may be
+ desirable or not depending on your situation.
The task takes advantage of Requirements
The following tools must be installed to use the plugin:
+ -
+ JDK 21 build:
+ 8.5+
+
-
JDK 17 build:
8.5+
@@ -42,6 +46,8 @@
plugins {
+ // For JDK 21+
+ id 'org.siouan.frontend-jdk21' version '8.1.0'
// For JDK 17+
id 'org.siouan.frontend-jdk17' version '8.1.0'
// For JDK 11+
@@ -50,6 +56,8 @@
plugins {
+ // For JDK 21+
+ id("org.siouan.frontend-jdk21") version "8.1.0"
// For JDK 17+
id("org.siouan.frontend-jdk17") version "8.1.0"
// For JDK 11+
@@ -73,6 +81,8 @@
url 'https://plugins.gradle.org/m2/'
}
dependencies {
+ // For JDK 21+
+ classpath 'org.siouan:frontend-gradle-plugin-jdk21:8.1.0'
// For JDK 17+
classpath 'org.siouan:frontend-gradle-plugin-jdk17:8.1.0'
// For JDK 11+
@@ -80,6 +90,8 @@
}
}
+// For JDK 21+
+apply plugin: 'org.siouan.frontend-jdk21'
// For JDK 17+
apply plugin: 'org.siouan.frontend-jdk17'
// For JDK 11+
@@ -91,6 +103,8 @@ apply plugin: 'org.siouan.frontend-jdk11'
url = uri("https://plugins.gradle.org/m2/")
}
dependencies {
+ // For JDK 21+
+ classpath("org.siouan:frontend-gradle-plugin-jdk21:8.1.0")
// For JDK 17+
classpath("org.siouan:frontend-gradle-plugin-jdk17:8.1.0")
// For JDK 11+
@@ -98,6 +112,8 @@ apply plugin: 'org.siouan.frontend-jdk11'
}
}
+// For JDK 21+
+apply(plugin = "org.siouan.frontend-jdk21")
// For JDK 17+
apply(plugin = "org.siouan.frontend-jdk17")
// For JDK 11+