Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Java 22 support #25645

Merged
merged 12 commits into from
Jun 1, 2024
6 changes: 6 additions & 0 deletions generators/app/__snapshots__/generator.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ exports[`generator - app with default config should match snapshot 1`] = `
"19",
"20",
"21",
"22",
],
"JAVA_VERSION": "JAVA_VERSION",
"LOGIN_REGEX": "^(?>[a-zA-Z0-9!$&*+=?^_\`{|}~.-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)*)|(?>[_.@A-Za-z0-9-]+)$",
Expand Down Expand Up @@ -483,6 +484,7 @@ exports[`generator - app with default config should match snapshot 1`] = `
"19",
"20",
"21",
"22",
],
"javaDependencies": {
"archunit-junit5": "'ARCHUNIT-JUNIT-5-VERSION'",
Expand Down Expand Up @@ -794,6 +796,7 @@ exports[`generator - app with gateway should match snapshot 1`] = `
"19",
"20",
"21",
"22",
],
"JAVA_VERSION": "JAVA_VERSION",
"LOGIN_REGEX": "^(?>[a-zA-Z0-9!$&*+=?^_\`{|}~.-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)*)|(?>[_.@A-Za-z0-9-]+)$",
Expand Down Expand Up @@ -1078,6 +1081,7 @@ exports[`generator - app with gateway should match snapshot 1`] = `
"19",
"20",
"21",
"22",
],
"javaDependencies": {
"archunit-junit5": "'ARCHUNIT-JUNIT-5-VERSION'",
Expand Down Expand Up @@ -1385,6 +1389,7 @@ exports[`generator - app with microservice should match snapshot 1`] = `
"19",
"20",
"21",
"22",
],
"JAVA_VERSION": "JAVA_VERSION",
"LOGIN_REGEX": "^(?>[a-zA-Z0-9!$&*+=?^_\`{|}~.-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)*)|(?>[_.@A-Za-z0-9-]+)$",
Expand Down Expand Up @@ -1668,6 +1673,7 @@ exports[`generator - app with microservice should match snapshot 1`] = `
"19",
"20",
"21",
"22",
],
"javaDependencies": {
"archunit-junit5": "'ARCHUNIT-JUNIT-5-VERSION'",
Expand Down
2 changes: 1 addition & 1 deletion generators/generator-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const BLUEPRINT_API_VERSION = 'jhipster-8';
export const JHIPSTER_DEPENDENCIES_VERSION = '8.4.1-SNAPSHOT';
// Version of Java
export const JAVA_VERSION = '17';
export const JAVA_COMPATIBLE_VERSIONS = ['17', '18', '19', '20', '21'];
export const JAVA_COMPATIBLE_VERSIONS = ['17', '18', '19', '20', '21', '22'];
// Force spring milestone repository. Spring Boot milestones are detected.
export const ADD_SPRING_MILESTONE_REPOSITORY = false;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-rc-1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.springframework.boot.ansi.AnsiOutput;
import org.springframework.boot.ansi.AnsiOutput.Enabled;

class CRLFLogConverterTest {

Expand Down Expand Up @@ -98,6 +100,8 @@ class CRLFLogConverterTest {
String input = "Test\ninput\rstring";
CRLFLogConverter converter = new CRLFLogConverter();

// Temp fix to move past the failing tests for Java 22 support
AnsiOutput.setEnabled(Enabled.NEVER);
String result = converter.transform(event, input);

assertEquals("Test_input_string", result);
Expand Down Expand Up @@ -145,6 +149,8 @@ class CRLFLogConverterTest {
CRLFLogConverter cut = new CRLFLogConverter();
AnsiElement ansiElement = AnsiColor.RED;

// Temp fix to move past the failing tests for Java 22 support
AnsiOutput.setEnabled(Enabled.NEVER);
String result = cut.toAnsiString("input", ansiElement);

assertThat(result).isEqualTo("input");
Expand Down
2 changes: 1 addition & 1 deletion test-integration/scripts/99-write-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ writeFileSync(
'setup-entities-sample': sample.entity ?? 'none',
'setup-jdl-entities-sample': sample['jdl-entity'] ?? '',
'setup-jdl-sample': sample['jdl-samples'] ?? '',
java: sample['java-version'] ?? JAVA_VERSION,
java: '22',
node: sample['node-version'] ?? NODE_VERSION,
'java-version': JAVA_VERSION,
'node-version': NODE_VERSION,
Expand Down
2 changes: 1 addition & 1 deletion test-integration/workflow-samples/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"monorepository": true
},
"node-version": "20",
"java-version": "21"
"java": "21"
},
{
"name": "ms-mf-ng-consul-oauth2-neo4j",
Expand Down
Loading