initializr: default to Java 17, drop Experimental label, bundle Claude Code skill#4946
Merged
Merged
Conversation
…e Code skill Switch new initializr projects to Java 17 by default and rename the JavaVersion enum from JAVA_17_EXPERIMENTAL to JAVA_17 (label "Java 17" instead of "Java 17 (Experimental)"). Java 8 remains selectable as "Java 8 (Legacy)". Every generated project now ships a Codename One authoring skill under .claude/skills/codename-one/ so Claude Code (and any other agent that respects the skills convention) inherits CN1 conventions for CSS, UI, testing, screenshots, mobile adaptability, Swing comparison, and an HTML/CSS cheat sheet. The skill markdown lives in source form under common/src/main/resources/skill/** and is repackaged into skill.zip at build time because CN1's classloader rejects nested resource directories. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… 17 projects Java 8 is now labelled "Java 8" (no "(Legacy)" suffix). The Codename One authoring skill is only bundled when Java 17 is selected, since the skill's guidance (var, records, text blocks, pattern matching) only applies to Java 17+. Java 8 mentions removed from the skill content. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Cloudflare Preview
|
… document dark-mode CSS Build-and-run reference: - Drop the redundant `--add-exports` paragraph (already covered by the JDK table) and the corresponding "common build errors" entry — not applicable to Java 17+ projects. - Drop the "Pointing the project at a local Codename One snapshot" section; irrelevant for end users generated by the initializr. - Document `-Dautomated=true` and `cn1:set-user-token` for CI / LLM-driven unattended cloud builds. - Add Xcode prerequisites (macOS, Xcode version, command-line tools, CocoaPods, signing) for the local `ios-source` build path. - Clarify that `codename1.arg.java.version=17` keeps routing the cloud build to the JDK 17 toolchain regardless of the local JDK. - Replace the "copy from framework checkout" hint with a direct download link for `CodeNameOneBuildClient.jar`. - Add developer-guide / JavaDoc / Maven manual reference links. New `references/build-hints.md` index: curated table of the most useful `codename1.arg.*` keys grouped by platform (iOS, Android, push, Windows, web, universal), with pointers to the authoritative Developer Guide and the in-simulator Build Hints menu. CSS reference: stop claiming CN1 has "no `@media` queries". The CSS compiler honors `@media (prefers-color-scheme: dark)` and rewrites its rules into `$Dark<UIID>` variants. Mention this in css.md (with example), html-css-cheatsheet.md, and mobile-adaptability.md, and clarify the `Display.setDarkMode(Boolean)` runtime override. Test: GeneratorModelMatrixTest.validateClaudeSkillBundled now also asserts `references/build-hints.md` is shipped into Java 17 projects. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AndroidGradleBuilder.getGradleJavaHome now falls back to System.getProperty("java.home")
when JAVA17_HOME / java17.home are not set AND the current JVM is already Java 17
or later. Maven is increasingly run on JDK 17+ today, so requiring a separate
JAVA17_HOME duplicates the path the plugin already has access to. JAVA17_HOME
still works as an explicit override for users on an older Maven JDK.
Skill refresh based on review:
- New references/build-and-run.md with an explicit "local vs cloud" target
matrix. Local: simulator + cn1:test. Cloud: native iOS / Android / desktop
installers / JavaScript bundle. Local iOS as ios-source documented.
- Drop the JAVA17_HOME row from the JDK table now that the plugin reuses the
current JVM. Mention the env var only as the override for older-Maven setups.
- Clarify CI/CD framing: cn1:test runs locally with no credentials and is the
right loop for testing; -Dautomated=true + cn1:set-user-token is specifically
the path for unattended cloud builds of native artifacts. Note that the
automated mode requires a Codename One Enterprise subscription.
- Highlight the CN1 resource flat-namespace constraint at the layout
invariants spot (the runtime classloader does not load nested directories).
- Fix every /manual/ URL to the canonical /developer-guide/.
New references/java-api-subset.md:
- How to discover what is supported by inspecting the java-runtime jar
(`unzip -l` / `javap -p`) plus the codenameone-core jar.
- The cn1:compliance-check goal and how to read its violations.
- IO: Storage, FileSystemStorage, Util.read*, resource flat-namespace
pattern with ZipInputStream.
- Networking: ConnectionRequest, NetworkManager, Rest builder; why
HttpClient / URLConnection / OkHttp are not options.
- Concurrency: Display.callSerially / callSeriallyAndWait / startThread.
- Logging, crypto, Database (SQLite), and date/time gotchas.
SKILL.md updated to reference the new files; the inline Java API caveats
now point readers at references/java-api-subset.md for the authoritative
list. GeneratorModelMatrixTest.validateClaudeSkillBundled now asserts the
new file is bundled.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Author
|
Compared 16 screenshots: 16 matched. |
Collaborator
Author
|
Compared 106 screenshots: 106 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Collaborator
Author
|
Compared 106 screenshots: 106 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
…ng docs CSS reference (`references/css.md`): - Document the modern theme accent color as the fastest way to recolor an app. - Drop the "Initializr's CSS overlays" section -- not relevant once the project has been generated; this skill targets the agent running against the resulting code, not the initializr UI. - Add an explicit "no negative values" rule (no negative margins / padding). - Add a `Container` UIID caveat: never style it; default must remain transparent / 0 padding / 0 margin / no border. Style a child UIID instead. - Document the CN1 box model: border is painted INSIDE the padding region, so every non-trivial border needs padding to match or text gets clipped by the curve. - Recommend `RoundBorder` / `RoundRectBorder` over 9-piece image borders; spell out the limitations of 9-piece (rasterized, blurry across density, memory cost, screenshot-test instability) so contributors avoid them. - Add the full list of `native:Main*` / `native:Italic*` font aliases and how they map to Roboto on Android and San Francisco on iOS. Add a `@font-face` example for custom TTF loading. UI components (`references/ui-components.md`): - De-emphasise `ComboBox` (poor touch UX) and replace `<select>` mapping in the HTML cheat-sheet with `Picker`. - Add the "Container is structural, don't style it" caveat in component form too. - Add a single-axis scrolling section: never use `setScrollable`, never nest scrollables, Forms scroll Y by default unless they use BorderLayout. - Add a "Margin and padding from Java" section explaining that `setMargin(...)` / `setPadding(...)` default to **device pixels** and you must call `setMarginUnit(Style.UNIT_TYPE_DIPS, ...)` first to get density-independent (mm) sizing. - Drop the stale "Append Custom CSS panel" pointer. Build and run (`references/build-and-run.md`): - Add a "Framebuffer requirement on headless Linux runners" subsection: `xvfb-run -a ./mvnw -pl common cn1:test` is required on `ubuntu-latest` GitHub Actions; macOS/Windows runners work directly. HTML/CSS cheat sheet (`references/html-css-cheatsheet.md`): - Add `isPortrait()`, orientation listeners, and `BorderLayout` landscape- swap to the "media queries / responsive" section. - New "Porting Android (XML + Kotlin/Java) to Codename One" major section: view mapping table, XML-to-Java conversion example, Android idioms that don't translate (Context, Handler, LiveData, Retrofit, Room, R.string, ...), and resource layout mapping. Java API subset (`references/java-api-subset.md`): - Fix the deep-resource guidance: `java.util.zip` is **not** in the CN1 runtime, so the ZipInputStream pattern requires the `cn1-zip` cn1lib. Document the alternative built-in path: drop an HTML tree under `common/src/main/resources/html/` and load it with `BrowserComponent.setURLHierarchy(...)` (the plugin packages it as `/html.tar` and the runtime extracts to FileSystemStorage on first use). - Add `Class.getName()` / `Class.forName()` row: works at compile time but CN1 obfuscates class names by default in cross-builds, so never persist or dispatch by class-name strings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The deep-resource pattern in references/java-api-subset.md previously guessed at a `cn1-zip` Maven artifact. The actual cn1lib is named `ZipSupport` (distributed as a `ZipSupport.cn1lib` binary, not currently on Maven Central — installed by dropping the file into the project's `cn1libs/` directory), and the import package is `net.sf.zipme`, not `java.util.zip`. Document the real install path and the correct imports. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Compared 104 screenshots: 104 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
…shot/cn1lib refs, agent tools
This commit addresses a wide range of reviewer feedback in one batch.
## Vendor-neutral skill location
The canonical skill content moves from `.claude/skills/codename-one/` to
`.agent-skills/codename-one/`. Generated projects ship:
- `.agent-skills/codename-one/SKILL.md` + references + tools — canonical.
- `AGENTS.md` at the project root — short pointer following the emerging
AGENTS.md convention.
- `.claude/skills/codename-one/SKILL.md` — a thin Claude Code stub with the
same frontmatter so the skill still triggers in /skills, redirecting to
the canonical content.
The GeneratorModel test asserts all three exist.
## CSS reference rewrite (`references/css.md`)
- Custom TTF fonts: clarified that they are **packaged with the app
binary**, NOT embedded inside `theme.res`.
- New "Theme constants" section with a list pulled from the developer
guide (useLargerTextScaleBool, rtlBool, globalToobarBool, scroll/
dialog/menu/media constants, ...).
- Dropped "Live preview while editing" — not relevant to an agent.
- Dropped "Compiling CSS programmatically" — replaced with a test-style
approach: build the component, attach to a Form, read effective
`Style` values; iterate `UIManager.getThemeProps().keySet()` to confirm
the theme actually contains the entry.
- Dropped the false "Colors look wrong on Android only" pitfall.
- New "Java side of styling" section explaining:
- `setUIID` as the only theming hook
- `getStyle()` is read-only (returns the style for the current state)
- `getAllStyles()` is write-only (fan-out setter to all four states)
- Animation guidance rewritten: prefer `Form.animateLayout(...)`,
`CommonTransitions` / `MorphTransition`, and `Component.animate()`
override over CSS or painter-driven approaches.
## UI components (`references/ui-components.md`)
- New "Sticky headers" section using
`com.codename1.components.StickyHeaderContainer`.
- New "Hero images" section: use a `Toolbar` background + optional
shrink-on-scroll, NOT a custom LayeredLayout.
- New "Floating Action Button + LayeredPane" section covering
`FloatingActionButton.createFAB(char).bindFabToContainer(...)` and
the Form's `getLayeredPane()` for overlay components.
- New "Animation — three right tools" section (animateLayout,
CommonTransitions/MorphTransition, animate() + registerAnimated).
- Material icons table now showcases the concise convenience APIs:
`Label.setMaterialIcon(char)`, `Button(String, char)`,
`Toolbar.addMaterialCommandTo*`, `FloatingActionButton.createFAB(char)`.
The verbose `new Label(FontImage.createMaterial(...))` pattern is
flagged as unnecessary.
## HTML/CSS cheat sheet (`references/html-css-cheatsheet.md`)
- "Sticky header" -> StickyHeaderContainer or BorderLayout.NORTH.
- "Hero section" -> Toolbar background, not LayeredLayout.
- "Flex space-between (header left + action right)" -> use Toolbar
title + right-bar commands; only roll a custom BorderLayout for
sub-headers in the body.
- "Card list with chevrons" code uses `Label.setMaterialIcon` instead
of the verbose FontImage.createMaterial form.
- "What you cannot do" table updated:
- `position: absolute` -> distinguish full-screen overlays (use
Form.getLayeredPane()/FloatingActionButton) from in-container
(LayeredLayout).
- `position: sticky` -> StickyHeaderContainer for in-scroller pinning.
- `:hover` -> note that desktop/JavaScript ports expose pointer-hover
listeners.
- `display: none` -> animateLayout for animated removal.
- `filter: blur()` -> Display.gaussianBlurImage(srcImage, radius).
- `gradient` -> Style.setBackgroundType + gradient color setters,
referenced from BACKGROUND_GRADIENT_LINEAR_* / RADIAL constants.
- Android conversion section split out to its own reference (below).
## New `references/android-to-cn1.md`
Dedicated guide that pulls the Android porting content out of the HTML
cheat sheet. Covers view mapping, XML-to-Java translation, threading
(explicit `callSerially` reference), Android idioms that don't translate
(Context, Handler, LiveData, Retrofit, Room, R.string, Activity
lifecycle), Android resources -> CN1 layout, and a Kotlin note.
## Swing comparison (`references/swing-comparison.md`)
Updated to acknowledge that **MigLayout** and **GroupLayout** are part of
the Codename One API:
- `com.codename1.ui.layouts.mig.MigLayout` — Mig string-grammar
constraint layout, ported into CN1.
- `com.codename1.ui.layouts.GroupLayout` — NetBeans-Matisse-friendly
group layout, ported into CN1.
## New `references/snapshot-builds.md`
Edge-case workflow for compiling against a Codename One SNAPSHOT from
git: clone, `setup-workspace.sh`, `mvn install -Plocal-dev-javase`, point
the app at the SNAPSHOT version, iterate, and revert. Documents
JAVA17_HOME caveat (now reused from JAVA_HOME, see the earlier
AndroidGradleBuilder fix).
## New `references/native-interfaces.md`
Full guide to authoring native interfaces:
- Declare a `NativeInterface` subclass in `common/`.
- `mvn cn1:generate-native-interfaces` to emit per-platform stubs.
- Run the target first to inspect the stub before implementing.
- Implementation examples for iOS (Objective-C, with ARC caveat),
Android (Java, with permissions/Gradle dep hints), JavaScript (TeaVM
module pattern), desktop simulator, and Windows (UWP/C#).
- Callback pattern via a separate static helper class (`callSerially`
to marshal back to the EDT).
- Common pitfalls.
## New `references/cn1libs.md`
How to create, package, and consume Codename One libraries. Covers both
the modern Maven cn1lib format (with `<type>pom</type>` aggregator and
classifier jars) and the legacy `.cn1lib` binary distribution
(`mvn cn1:cn1lib`, dropped into `cn1libs/` directory). Includes the
archetype command (`mvn cn1:generate-cn1lib-project`), CSS UIID
namespacing rules, and a versioning/SNAPSHOT workflow note.
## New `references/debugging.md`
JDB-attach workflow for an LLM-driven agent:
- `mvn -pl common cn1:debug -Djpda.address=8000` starts the simulator
suspended on JDWP (verified to work via the debug-simulator profile in
`javase/pom.xml`).
- `jdb -attach 8000` to connect.
- Command reference (stop in/at, cont/step/next, where, locals, print,
set, monitor, catch).
- Non-interactive recipe via here-doc piped into jdb for headless agent
use.
- Common pitfalls and "when jdb isn't enough" pointers.
## New `tools/` directory with Java 17 single-file utilities
Runnable via `java tools/<Name>.java <args>`:
- `tools/IsApiSupported.java` — checks whether a fully-qualified class
name (or class#method) is present in the codename-one `java-runtime`
jar in `~/.m2`. Output: `YES` / `NO`.
- `tools/IsCssValid.java` — runs the CN1 CSSThemeCompiler against a
`theme.css` file via reflection (auto-discovers
`codenameone-core` + `java-runtime` jars from `~/.m2`). Output:
`VALID` / `INVALID <error>`.
- `tools/README.md` — usage notes and the convention for adding more
tools (single file, one question, exit codes 0/1/2).
The `GeneratorModelMatrixTest.validateClaudeSkillBundled` test now also
asserts the new references, the tools, the AGENTS.md root pointer, and
the Claude stub frontmatter+redirect text are bundled into Java 17
projects.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…g + animation + dark-mode docs
## Code
- `GeneratorModel`: Java 17 generated projects now drop the legacy `win/`
source tree (UWP/Windows native module) at zip extraction time and strip
the matching `<profile><id>win</id>...</profile>` block from the root pom.
Java 8 (legacy) projects still ship the win/ module.
- `StubGenerator`: only emit the C# native-interface stub when a `win/`
module is present under the destination project. Java 17 projects without
`win/` no longer end up with dangling `.cs` files outside any source set.
## Skill content corrections
`references/java-api-subset.md`:
- Removed the false "java.lang.reflect.* works in the simulator" claim —
reflection is forbidden everywhere (not in the bootclasspath, won't
compile) and there is no special simulator allowance.
- Removed "java.util.logging.* / java.util.regex are partially supported"
rows — neither is in the subset.
- Added an explicit "What's broadly supported" section listing the
java.lang / java.io / java.util / java.text / java.time / java.util.zip
(via ZipSupport cn1lib) / java.util.function / java.util.stream packages.
- `Storage` is no longer described as a key/value store: it's a simplified
app-private filesystem. `Preferences` is the actual key/value store.
Externalization is a general mechanism that Storage *supports* via
writeObject/readObject, not a Storage-specific feature.
- `FileSystemStorage` re-framed: hierarchy + cross-app interaction.
- `Resources` clarified: reads from theme.res, NOT a classloader.
- Added a "Loading classpath resources" subsection so the distinction
between `Display.getResourceAsStream` and `Resources` is clear.
- `Class.forName(String)` guidance corrected: use a class **literal**
(`MyService.class`); never serialize/dispatch by class-name strings;
proguardKeep is not the right tool.
- Dropped "WebServiceProxy and RAD" — not applicable to a non-CodeRAD
project.
- Dropped the standalone Crypto section — `MessageDigestUtil` ships as a
cn1lib, not in the base subset.
- Added the URL/URLConnection portability shim (inner classes of
`com.codename1.io.URL`).
- Added a Database portability caveat: iOS and Android SQLite versions
differ; recommend `Storage` for simple persistence.
- Added a new "Multi-images" section explaining density-correct asset
bundling.
- Concurrency: `new Thread(...).start()` no longer claimed to leak — it's
functional, just lacks `Display.startThread`'s autorelease setup.
`references/css.md`:
- Dark mode is now correctly described as **inherited automatically** from
the OS, not opt-in. `setDarkMode(Boolean)` is the runtime override.
- New "Multi-images" subsection mirroring the java-api-subset entry.
- Style API rewritten around the four explicit state getters
(getUnselectedStyle / getSelectedStyle / getPressedStyle /
getDisabledStyle) which map 1:1 to the CSS `.selected` / `.pressed` /
`.disabled` selectors. `getStyle()` is explicitly flagged as
paint()-only, never to be used outside a custom paint method.
- "Selected = focused, and focus doesn't render in touch mode" noted.
- Test pattern updated to read explicit state styles, not `getStyle()`.
`references/ui-components.md`:
- New TextComponent section — Material-Design floating-label input with
`label() / descriptionMessage() / errorMessage() / action(char) /
actionClick(ActionListener) / onTopMode(boolean)` fluent API.
Recommended as the default for new forms.
- Animation section heavily expanded:
- animateLayout / animateHierarchy / animateLayoutAndWait
- Container#replace / replaceAndWait for in-place layout swaps with a
transition
- revalidate() for instant re-flow + warning that it collides with
animations
- animateUnlayout for animated removal
- setTransitionOutAnimator is now noted as the typical override, with
the default coming from formTransitionIn / formTransitionOut theme
constants supplied by the native theme. setTransitionInAnimator
re-labelled as the less-common form
- AnimationManager exposed for sequencing and chained callbacks
- Painters drawing-only note retained and tightened.
`references/native-interfaces.md`:
- Opening note: the GPS example is illustrative; CN1 already has a
portable `com.codename1.location` API and a `cn1-google-maps` cn1lib.
Native interfaces should be reached for last, not first.
- Stub-listing example no longer mentions `win/`. Added a footnote that
Java 17 projects drop the win/ module.
- Removed the standalone "Windows (UWP, C#)" implementation subsection.
- iOS plist guidance rewritten: use dedicated `ios.NS<Key>=<value>` build
hints (e.g. `ios.NSCameraUsageDescription`,
`ios.NSLocationWhenInUseUsageDescription`, etc.). `ios.plistInject` is
now positioned as the escape hatch for keys without a dedicated hint.
`references/build-hints.md`:
- Removed the Windows/UWP build-hint table.
- Replaced the single `ios.plistInject` row with explicit `ios.NS*`
privacy-description rows, plus a new "iOS privacy strings" subsection
with a comprehensive example block and a link to Apple's CocoaKeys
reference.
`references/swing-comparison.md`:
- Corrected: CN1 `Graphics` **does** support affine transforms
(`isAffineSupported()`, `setTransform(Transform)`, `getTransform()` plus
the convenience helpers translate/scale/rotate/rotateRadians/resetAffine).
Previous text claimed otherwise.
`references/mobile-adaptability.md`:
- Rotation lock corrected: prefer `Display.getInstance().lockOrientation(boolean)`
/ `unlockOrientation()` at runtime. The legacy
`codename1.arg.ios.orientation` / `codename1.arg.android.screenOrientation`
build hints are discouraged.
## Tests
- `validateClaudeSkillBundled` now also asserts `win/`-prefixed entries
are absent and the `<id>win</id>` profile is absent from the root pom
in Java 17 projects.
- `validateLegacyJava8Generation` now asserts the converse: Java 8 (legacy)
projects still ship `win/pom.xml` and the win profile in the root pom,
and do NOT bundle the agent skill / Claude stub / AGENTS.md.
- All four existing test suites still pass; the pre-existing
`InitializrThemeInteractionTest` UI failure (present on master) is
unrelated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…s, drop Windows mentions
## Multi-images rewritten
Both `references/css.md` and `references/java-api-subset.md` previously
described multi-images using iOS 1x/2x/3x terminology and claimed the
CSS compiler auto-generates them from a plain `url('/foo.png')`. Both
were wrong.
The corrected story:
- Codename One uses **density buckets** mapped to the Android-style
`Display.DENSITY_*` constants — `DENSITY_VERY_LOW` (~88 ppi),
`DENSITY_LOW` (~120 ppi, Android ldpi), `DENSITY_MEDIUM` (~160 ppi,
iPhone 3GS / iPad / Android mdpi), `DENSITY_HIGH` (~240 ppi, Android
hdpi), `DENSITY_VERY_HIGH` (~320 ppi, iPhone 4 era / Android xhdpi),
`DENSITY_HD` (~540 ppi, iPhone 6+ / Android xxhdpi), `DENSITY_560`
(~750 ppi, Android xxxhdpi), `DENSITY_2HD` (~1000 ppi),
`DENSITY_4K` (~1250 ppi).
- Multi-images are **authored in the Codename One Designer** (resource
editor), not auto-derived from CSS — drop the source image at its
native density, tick the lower-density buckets to auto-generate, and
the designer writes the variants as a single named multi-image
entry in `theme.res`.
- At runtime, fetch the matching variant from the cached global
resources: `Resources.getGlobalResources().getImage("name")`.
- Dropped the `EncodedImage.createMulti(...)` programmatic edge case —
not applicable to normal app development.
## `getStyle()` semantics corrected
`references/css.md` previously claimed `getStyle()` returns colors
"regardless of whether the component is selected, pressed, or
disabled" — exactly the opposite of how it works. The correct semantics
are now documented: `getStyle()` returns the style for the *currently
active* state, which is why it's the right tool inside a custom
`paint(Graphics g)` implementation (where the paint call itself is
scoped to one state). Outside of `paint()`, code should still use the
explicit state getters (`getUnselectedStyle()` etc.) to avoid
flakiness from focus/press state drift.
## Prefer cached `Resources.getGlobalResources()` over `openLayered`
`Resources.openLayered("/theme")` re-reads the theme resource from the
classpath every call. The app's `Lifecycle` already loads the theme on
startup, so `Resources.getGlobalResources()` returns the in-RAM copy
without disk I/O. SKILL.md's Lifecycle example and
java-api-subset.md's resource-loading snippet now use the cached
getter and note the distinction.
## Drop Windows-port mentions
The Windows / UWP native module is dropped from new Java 17 projects,
so leaving references in the skill misleads readers. Removed:
- "Windows" from the build-hints summary line in SKILL.md.
- The `└── win/ # UWP wrapper (optional)`
line from the SKILL.md project-layout diagram.
- The leftover "Generated Java 17 projects no longer ship a `win/`
module — the legacy UWP target is dropped..." parenthetical from
references/native-interfaces.md — the skill is Java 17–only, so it
doesn't need to explain the absence.
- "C#" from the cn1libs.md description of per-platform native code
(now lists ObjC for iOS, Java/Kotlin for Android, JS for the web,
Java for the desktop simulator).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
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.
Summary
JavaVersion.JAVA_17_EXPERIMENTAL→JAVA_17with label "Java 17"; Java 8 stays selectable as "Java 8 (Legacy)".ProjectOptions.defaults()and the constructor null-fallback both flip toJAVA_17, and the Initializr radio panel starts on Java 17..claude/skills/codename-one/. The skill includes a top-levelSKILL.mdplus seven references covering build-and-run, UI components, CSS capabilities and limitations, Swing comparison, an HTML/CSS cheat sheet, testing and screenshots, and mobile adaptability. Files are authored in plain Markdown undercommon/src/main/resources/skill/**and repackaged intoskill.zipat build time (CN1's classloader rejects nested resource directories, so the on-disk hierarchy is excluded from the JAR and only the zip is shipped).GeneratorModel.addClaudeSkillEntriesstreams entries out and pipes them through the existing template-token replacement soMyAppName/com.example.myappplaceholders inside the skill become the project's real names.GeneratorModelMatrixTestnow runs Java 17 expectations on the default path, gains an explicitvalidateLegacyJava8Generation, and a newvalidateClaudeSkillBundledconfirms all eight skill files land under.claude/skills/codename-one/with frontmatter intact and tokens rewritten. The pre-existing too-broadassertNoTemplatePlaceholderscheck onjavase/pom.xmlwas tightened to match the exact dependency block thatnormalizeJavasePomremoves, instead of anyindexOfhit (it was firing on legitimate nested<scope>provided</scope>blocks in the build-server activation profile).Test plan
mvn -pl common test-compile cn1:test—GeneratorModelMatrixTestandGeneratorModelIntegrationBuildTestpass; the only remaining failure (InitializrThemeInteractionTest"Unable to find preview hello button") reproduces on a clean master checkout and is unrelated to this work.mvn -pl common package -DskipTests— verifiedinitializr-common-1.0-SNAPSHOT.jarcontainsskill.zip(31 KB) and no nestedskill/directory in the JAR.skill.zip: 8 entries,SKILL.mdplus 7 files underreferences/..claude/skills/codename-one/SKILL.mdwith the user's main class name substituted into samples.mvn -pl common cn1:runto confirm the Java 17 build path still works end-to-end.🤖 Generated with Claude Code