Repository navigation
Dart sources debuggable as Dart; Flutter support in the Gradle plugin - #6132
Conversation
The Dart transpiler marks every statement with its Dart line and stores a line table in each generated class; DartLineMapper (build-engine) rewrites the compiled classes after javac so their line numbers, source file and a JSR-45 source map point at the .dart file. A Java debugger steps through the Dart source and stack traces name main.dart:12 on every target. The transcode-flutter goal's logic moves into FlutterProjectBuilder in build-engine, which the Maven goal and a new Gradle transcodeFlutter task both run. convert-to-gradle leaves the runtime to the plugin. gradle-flutter-test.sh builds one Flutter app both ways and compares them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plugin packs, Firebase federated sign-in Library-scoped stubs (dartlib_*.dart) so dart:developer's log does not shadow dart:math's; RandomAccessFile; the importer skips web-only branches, transpiles desktop-only plugins and writes a JSON report with the transitive cause of every unsupported package. Plugin packs for timezone, app_settings, install referrer, geocoding, file_picker, audioplayers, mixpanel, web auth, image compress, image_picker platform, webview, video player/thumbnail/compress, camera, emoji picker and svg. firebase_auth exchanges Google/Apple/OAuth credentials through signInWithIdp; google_sign_in over GoogleConnect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-scoped stubs - FirebaseUI auth screens, Google/Apple providers, google_sign_in, federated firebase_auth credentials; App Check; firebase_ai over the AI Logic REST API. - Stub files can declare `// cn1:package`, so two packages exporting one name resolve per importing library, and an app's own class is never shadowed. - @Unapplied stub parameters warn (W0002); stub packs declare import coverage. - en/es/he Material and Cupertino localizations; RTL mirroring of rows, wraps, directional alignment, stacks, text, list tiles, app bars and arrow icons. - cached_network_image placeholder/progress/error widgets, polyline and circle taps, ui.Image prefix, ByteData.buffer, depth for dio, url_launcher, image_picker, messaging, notifications and maps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e, header reloads Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Gradle support moved copyAssets/removeStaleAssets from TranscodeFlutterMojo into FlutterProjectBuilder; the plugin's test still called the mojo and failed test compilation in every job that builds the plugin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flutter vs Codename OneSame application, built both ways: Flutter's AOT compile of the gallery, and the identical Dart source transpiled to Java on Codename One. Lower is better for every metric, so a ratio above 1.00x means Codename One is ahead by that factor. android9 interleaved rounds; host load 0.45, 1.89, 1.63
Compute -- the VM workloads (
Gate: within tolerance against
ios9 interleaved rounds; host load 30.3, 28.62, 21.7
Compute -- the VM workloads ( Not measured: iOS compute is not measured: a device build needs signed hardware, and on the simulator Flutter runs its JIT debug engine rather than AOT code. The macOS row runs the same ParparVM and Dart AOT compilers on the same Apple silicon. Gate: within tolerance against
javascript9 interleaved rounds; host load 2.16, 1.34, 0.6
Compute -- the VM workloads (
Gate: within tolerance against
linux9 interleaved rounds; host load 0.34, 2.76, 2.25
Compute -- the VM workloads (
Gate: within tolerance against
macos9 interleaved rounds; host load 3.89, 15.96, 16.45
Compute -- the VM workloads (
Gate: within tolerance against
windows9 interleaved rounds
Compute -- the VM workloads (
Gate: within tolerance against
Codename One wins 26 of 26 measured metrics across 6 platform(s). |
…snippet self-contained The import-report JSON, the stub-pack Dart and the stub-pack Java were inline blocks; they now live in docs/demos (the Java as a compiled class) and are included by tag. The UIManager javadoc snippet named an undefined resourceFile and was baselined under an old hash since #6106 changed it; it now compiles in the Playground and its baseline entry is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native fidelity (Android, Material 3)54 pairs compared -- median 95.6%, worst 91.3% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
Cloudflare Preview
|
Native fidelity (iOS Modern, Metal)68 pairs compared -- median 95.0%, worst 83.5% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Native fidelity (ios-27-metal)68 pairs compared -- median 94.6%, worst 74.5% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
|
Compared 231 screenshots: 231 matched. |
|
Compared 210 screenshots: 210 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: Intel64 Family 6 Model 207 Stepping 2, GenuineIntel (baseline 1 improvement past the baseline (not a failure; rebaseline to lock it in):
Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
A change that moves performance ON PURPOSE records the new baseline in Result: no regression (improved past the baseline: consider rebaselining) |
|
Compared 195 screenshots: 195 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
|
Compared 210 screenshots: 210 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
|
Compared 210 screenshots: 210 matched. ParparVM vs HotSpot (JDK 25): Linux arm64Runner CPU: Neoverse-N2 (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
…urface dart:io RandomAccessFile, UiImage/ByteBuffer, the Material/Cupertino l10n tables and RTL mirroring are linked into every Flutter app, so the gallery's executable grows 3-11% across linux, windows and javascript. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>




















































































































































































































































































































































































Dart -> Java debug line mapping
Follows the approach #6128 takes for Python.
JavaEmitterwrites a//@dart:<line> <file>mark before every lowered statement and=>body.DartLineTableturns the marks into a$cn1DartLinesconstant, placed before the type's closing brace so no line moves.DartLineMapper(build-engine) runs after javac, fromremap-compaton Maven andRemapCompatActionon Gradle, only whensrc/main/flutterexists. It:.dartfile;partfiles get their own ranges, and any range past the u2 limit is dropped;Foo$Barstays its own class.Flutter in the Gradle plugin
transcode-flutterlogic moves unchanged intoFlutterProjectBuilder(build-engine). The Mojo now delegates to it.transcodeFluttertask for any project withsrc/main/flutter:codenameone-flutter-runtimeitself;build/cn1-flutter/resources, which is part of the main output, never compileJava's output directory;cn1.flutter.packageis read from the Gradle or system property;convert-to-gradleleaves the runtime to the plugin.Tests
DartLineTableTestandDartLineMapperTestcover parts, chunking, nested classes,$names, u2 overflow and constant-pool cleanup. The two transpiler goldens are regenerated; they change only by the marks and the table.New
gradle-flutter-test.sh(step ingradle-smoke.yml, which now also builds the JDK 17 Flutter runtime). It builds one Flutter app with Maven and with Gradle and checks:main.dartand carry the SMAP, with no table left;src/main/flutterremoves what it produced.It passes locally.
🤖 Generated with Claude Code