Add experimental Java 17 option to Initializr#4600
Merged
shai-almog merged 3 commits intomasterfrom Mar 9, 2026
Merged
Conversation
Cloudflare Preview
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
hellocodenameoneexample and related Maven build files were updated to Java 17, so the Initializr should offer a Java 17 project option while keeping the stable default unchanged.Description
ProjectOptions.JavaVersionenum withJAVA_8andJAVA_17_EXPERIMENTAL, defaulting toJAVA_8, and carried the selection throughProjectOptions. (ProjectOptions.java)Initializr.java)GeneratorModelto apply Java-17-specific changes whenJAVA_17_EXPERIMENTALis selected: it setscodename1.arg.java.version=17incommon/codenameone_settings.propertiesand rewritescommon/pom.xmlcompiler<source>/<target>from1.8to17. (GeneratorModel.java)GeneratorModelMatrixTestto add avalidateExperimentalJava17Generationcheck and updated helper assertions to verify both default Java 8 outputs and the experimental Java 17 outputs. (GeneratorModelMatrixTest.java)Testing
cd scripts/initializr && mvn -pl common test -DskipTests=false, which failed due to a missing reactor artifact when building the module in isolation (initializr-ZipSupportnot found). (failure)cd scripts/initializr && mvn -pl common -am test -DskipTests=false, which progressed but failed in this environment during theinstall-codenameonestep withjava.net.SocketException: Network is unreachablewhile attempting to downloadUpdateCodenameOne.jar; test execution could not complete here. (blocked by network/environment)GeneratorModelMatrixTestnow validates the experimental Java 17 generation behavior, but CI/local run is required to confirm green test results due to the environment limitations above.Codex Task