CodeName OneShai Almog6 min readintermediate
Build Hints That Fail Before the Build Server
Summary
Codename One moved 87 common build hints into Java annotations, so misspelled keys or wrong value types cause compile‑time errors instead of silent build‑server ignores. The annotations are processed back into the existing string protocol, keeping backward compatibility while improving validation and IDE support.
- Common build hints are now expressed as Java annotations, letting javac catch misspellings and type errors at compile time.
- The annotation processor converts annotations back to the original key/value format, preserving compatibility with existing build servers.
- Migration is automated via `mvn cn1:migrate-build-hints`; hints without annotations remain in `codenameone_settings.properties`.
- Unset annotation attributes emit no hint, deferring to server defaults; `Toggle` enum preserves three‑state semantics instead of a boolean default.
Mobile developers using Codename One and build‑system maintainers should care because compile‑time validation prevents silent misconfigurations that can cause runtime issues.
6/10