Migrate example project and build tooling to Java 17; add compatibility stubs and version parsing#4592
Closed
shai-almog wants to merge 2 commits intomasterfrom
Closed
Conversation
…tk1sta Signed-off-by: Shai Almog <67850168+shai-almog@users.noreply.github.com>
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Author
Android screenshot updatesCompared 32 screenshots: 31 matched, 1 error.
Native Android coverage
|
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
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
hellocodenameoneproject and CI/workspace scripts to use Java 17 as the compile and test target.Description
hellocodenameonepom and module pom files to set<maven.compiler.source>and<maven.compiler.target>to17, and bumped projectjava.versionand test java versions to17.mvnw,mvnw.cmd,run.*,build.*,build.bat,mvnwhelpers) and ensuredJAVA_HOMEis set to a JDK 17 when available, and updatedbuild-ios-app.shto run Maven usingJAVA17_HOMEwhile logging versions.Java17LanguageFeaturesTestin the example common test sources to validate Java 17 language features compile in the test classpath.parseJavaVersionhelper inCN1BuildMojoandInstallCn1libsMojoto safely parse human-readable Java version strings and avoidNumberFormatExceptionwhen comparing library/project java versions.java.lang.invoke.StringConcatFactoryin two locations to provide compatibility placeholders used by string concatenation handling.Testing
./mvnw package -DskipTestsand the script completed successfully.mvn testfor thehellocodenameone/commontest module to verifyJava17LanguageFeaturesTestcompiles and runs, and the test passed.java -versionchecks by runningmvnw/wrapper bootstrap locally and confirmingJAVA_HOMEselection logic prefers a JDK 17 installation.Codex Task