diff --git a/CHANGELOG.md b/CHANGELOG.md index 45060095ac8..825a91e6955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,2 @@ +- Marks Java 11 and below as deprecated. Support will be dropped in Firebase CLI v15. Please upgrade to Java version 21 or above to continue using the emulators. - Fix Functions MCP log tool to normalize sort order and surface Cloud Logging error details (#9247) diff --git a/src/emulator/commandUtils.ts b/src/emulator/commandUtils.ts index 0c59fe1628f..43cd9a72b05 100644 --- a/src/emulator/commandUtils.ts +++ b/src/emulator/commandUtils.ts @@ -587,7 +587,7 @@ export async function checkJavaMajorVersion(): Promise { }); } -export const MIN_SUPPORTED_JAVA_MAJOR_VERSION = 11; +export const MIN_SUPPORTED_JAVA_MAJOR_VERSION = 21; export const JAVA_DEPRECATION_WARNING = - "firebase-tools no longer supports Java versions before 11. " + - "Please install a JDK at version 11 or above to get a compatible runtime."; + "firebase-tools will drop support for Java version < 21 soon in firebase-tools@15. " + + "Please install a JDK at version 21 or above to get a compatible runtime."; diff --git a/src/emulator/controller.ts b/src/emulator/controller.ts index 71eb122d9e9..88004d71783 100755 --- a/src/emulator/controller.ts +++ b/src/emulator/controller.ts @@ -295,10 +295,11 @@ export async function startAll( `No emulators to start, run ${clc.bold("firebase init emulators")} to get started.`, ); } + const deprecationNotices: string[] = []; if (targets.some(requiresJava)) { if ((await commandUtils.checkJavaMajorVersion()) < MIN_SUPPORTED_JAVA_MAJOR_VERSION) { utils.logLabeledError("emulators", JAVA_DEPRECATION_WARNING, "warn"); - throw new FirebaseError(JAVA_DEPRECATION_WARNING); + deprecationNotices.push(JAVA_DEPRECATION_WARNING); } } if (options.logVerbosity) { @@ -1039,7 +1040,7 @@ export async function startAll( is_demo_project: String(isDemoProject), }); - return { deprecationNotices: [] }; + return { deprecationNotices }; } function getListenConfig(