Skip to content

Add deep cross-platform calendar integration#5413

Open
shai-almog wants to merge 8 commits into
masterfrom
calendar-integration
Open

Add deep cross-platform calendar integration#5413
shai-almog wants to merge 8 commits into
masterfrom
calendar-integration

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Summary

  • add a capability-based calendar API for calendars, events, tasks, recurrence, attendees, alarms, free/busy, attachments, conferencing, paging, and typed failures
  • add Google Calendar/Tasks, Microsoft Graph/To Do, CalDAV, and RFC 5545 import/export integrations
  • add Android Calendar Provider and Apple EventKit local sources, plus an isolated simulator source and honest unavailable fallbacks
  • add opt-in offline mutation storage with explicit conflict resolution
  • add native permission/privacy generation for Android, Apple, macOS sandboxing, and explicit Windows restricted-capability opt-in
  • document platform coverage, OAuth ownership, permissions, and the pull-based notification contract

Notification contract

The cross-platform guarantee is local change listeners plus provider delta/sync tokens. Listeners run on the Codename One EDT, RESET requests a re-query, and the API does not promise or register provider webhooks.

Developer impact

Applications can detect granular capabilities instead of branching on platform names. Online providers work across ports without adding device-calendar permissions. OAuth credentials and persistence remain application-owned.

Validation

  • CalendarIntegrationTest: 7 passed
  • MacNativeBuilderEntitlementsTest and WindowsNativeBuilderArchTest: 10 passed
  • calendar-package SpotBugs: zero findings
  • Android, iOS, and JavaSE Java compilation
  • HelloCodenameOne common compilation
  • developer-guide Asciidoctor build
  • BuildDaemon Java 8 Maven compile in the companion PR

The full Java 8 core suite reached 158 passing tests before the macOS VM aborted in the unrelated RoundBorderGradientStrokeResourceTest; there were no assertion failures before the VM abort.

Companion builder PR

https://github.com/codenameone/BuildDaemon/pull/153

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 146 screenshots: 146 matched.
Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 69ms / native 4ms = 17.2x speedup
SIMD float-mul (64K x300) java 67ms / native 4ms = 16.7x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 267.000 ms
Base64 CN1 decode 164.000 ms
Base64 SIMD encode 145.000 ms
Base64 encode ratio (SIMD/CN1) 0.543x (45.7% faster)
Base64 SIMD decode 148.000 ms
Base64 decode ratio (SIMD/CN1) 0.902x (9.8% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 26.000 ms
Image createMask (SIMD on) 22.000 ms
Image createMask ratio (SIMD on/off) 0.846x (15.4% faster)
Image applyMask (SIMD off) 68.000 ms
Image applyMask (SIMD on) 67.000 ms
Image applyMask ratio (SIMD on/off) 0.985x (1.5% faster)
Image modifyAlpha (SIMD off) 65.000 ms
Image modifyAlpha (SIMD on) 62.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.954x (4.6% faster)
Image modifyAlpha removeColor (SIMD off) 63.000 ms
Image modifyAlpha removeColor (SIMD on) 34.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.540x (46.0% faster)

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 146 screenshots: 146 matched.
Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 45ms / native 3ms = 15.0x speedup
SIMD float-mul (64K x300) java 46ms / native 3ms = 15.3x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 157.000 ms
Base64 CN1 decode 114.000 ms
Base64 SIMD encode 72.000 ms
Base64 encode ratio (SIMD/CN1) 0.459x (54.1% faster)
Base64 SIMD decode 65.000 ms
Base64 decode ratio (SIMD/CN1) 0.570x (43.0% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 27.000 ms
Image createMask (SIMD on) 21.000 ms
Image createMask ratio (SIMD on/off) 0.778x (22.2% faster)
Image applyMask (SIMD off) 45.000 ms
Image applyMask (SIMD on) 39.000 ms
Image applyMask ratio (SIMD on/off) 0.867x (13.3% faster)
Image modifyAlpha (SIMD off) 40.000 ms
Image modifyAlpha (SIMD on) 36.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.900x (10.0% faster)
Image modifyAlpha removeColor (SIMD off) 44.000 ms
Image modifyAlpha removeColor (SIMD on) 31.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.705x (29.5% faster)

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 151 screenshots: 151 matched.

Native Android coverage

  • 📊 Line coverage: 11.47% (12087/105337 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.28% (60040/583996), branch 5.32% (2842/53395), complexity 5.06% (2829/55894), method 7.56% (2171/28715), class 12.00% (491/4093)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 11.47% (12087/105337 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.28% (60040/583996), branch 5.32% (2842/53395), complexity 5.06% (2829/55894), method 7.56% (2171/28715), class 12.00% (491/4093)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 164ms / native 75ms = 2.1x speedup
SIMD float-mul (64K x300) java 72ms / native 53ms = 1.3x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 80.000 ms
Base64 CN1 decode 67.000 ms
Base64 native encode 290.000 ms
Base64 encode ratio (CN1/native) 0.276x (72.4% faster)
Base64 native decode 238.000 ms
Base64 decode ratio (CN1/native) 0.282x (71.8% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 181 screenshots: 181 matched.
✅ JavaScript-port screenshot tests passed.

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 146 screenshots: 146 matched.
Native Windows port (arm64 / Apple Silicon - Arm): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, NEON SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 55ms / native 3ms = 18.3x speedup
SIMD float-mul (64K x300) java 56ms / native 4ms = 14.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 245.000 ms
Base64 CN1 decode 126.000 ms
Base64 SIMD encode 64.000 ms
Base64 encode ratio (SIMD/CN1) 0.261x (73.9% faster)
Base64 SIMD decode 60.000 ms
Base64 decode ratio (SIMD/CN1) 0.476x (52.4% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 12.000 ms
Image createMask (SIMD on) 9.000 ms
Image createMask ratio (SIMD on/off) 0.750x (25.0% faster)
Image applyMask (SIMD off) 25.000 ms
Image applyMask (SIMD on) 19.000 ms
Image applyMask ratio (SIMD on/off) 0.760x (24.0% faster)
Image modifyAlpha (SIMD off) 16.000 ms
Image modifyAlpha (SIMD on) 12.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.750x (25.0% faster)
Image modifyAlpha removeColor (SIMD off) 19.000 ms
Image modifyAlpha removeColor (SIMD on) 14.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.737x (26.3% faster)

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 147 screenshots: 147 matched.
Native Linux port (x64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub x64 runner. Baseline: scripts/linux/screenshots.

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 147 screenshots: 147 matched.
Native Linux port (arm64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub arm64 runner. Baseline: scripts/linux/screenshots-arm.

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 12 screenshots: 12 matched.
✅ JavaSE simulator integration screenshots matched stored baselines.

@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 148 screenshots: 148 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 179 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 58ms / native 2ms = 29.0x speedup
SIMD float-mul (64K x300) java 57ms / native 2ms = 28.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 147.000 ms
Base64 CN1 decode 109.000 ms
Base64 native encode 591.000 ms
Base64 encode ratio (CN1/native) 0.249x (75.1% faster)
Base64 native decode 218.000 ms
Base64 decode ratio (CN1/native) 0.500x (50.0% faster)
Base64 SIMD encode 44.000 ms
Base64 encode ratio (SIMD/CN1) 0.299x (70.1% faster)
Base64 SIMD decode 41.000 ms
Base64 decode ratio (SIMD/CN1) 0.376x (62.4% faster)
Base64 encode ratio (SIMD/native) 0.074x (92.6% faster)
Base64 decode ratio (SIMD/native) 0.188x (81.2% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 6.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.167x (83.3% faster)
Image applyMask (SIMD off) 38.000 ms
Image applyMask (SIMD on) 37.000 ms
Image applyMask ratio (SIMD on/off) 0.974x (2.6% faster)
Image modifyAlpha (SIMD off) 31.000 ms
Image modifyAlpha (SIMD on) 26.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.839x (16.1% faster)
Image modifyAlpha removeColor (SIMD off) 31.000 ms
Image modifyAlpha removeColor (SIMD on) 40.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.290x (29.0% slower)

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 143 screenshots: 143 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 412 seconds

Build and Run Timing

Metric Duration
Simulator Boot 58000 ms
Simulator Boot (Run) 1000 ms
App Install 16000 ms
App Launch 4000 ms
Test Execution 949000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 290ms / native 4ms = 72.5x speedup
SIMD float-mul (64K x300) java 277ms / native 12ms = 23.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 167.000 ms
Base64 CN1 decode 126.000 ms
Base64 native encode 937.000 ms
Base64 encode ratio (CN1/native) 0.178x (82.2% faster)
Base64 native decode 360.000 ms
Base64 decode ratio (CN1/native) 0.350x (65.0% faster)
Base64 SIMD encode 51.000 ms
Base64 encode ratio (SIMD/CN1) 0.305x (69.5% faster)
Base64 SIMD decode 44.000 ms
Base64 decode ratio (SIMD/CN1) 0.349x (65.1% faster)
Base64 encode ratio (SIMD/native) 0.054x (94.6% faster)
Base64 decode ratio (SIMD/native) 0.122x (87.8% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.286x (71.4% faster)
Image applyMask (SIMD off) 51.000 ms
Image applyMask (SIMD on) 93.000 ms
Image applyMask ratio (SIMD on/off) 1.824x (82.4% slower)
Image modifyAlpha (SIMD off) 47.000 ms
Image modifyAlpha (SIMD on) 39.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.830x (17.0% faster)
Image modifyAlpha removeColor (SIMD off) 40.000 ms
Image modifyAlpha removeColor (SIMD on) 33.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.825x (17.5% faster)

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 149 screenshots: 149 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 323 seconds

Build and Run Timing

Metric Duration
Simulator Boot 74000 ms
Simulator Boot (Run) 0 ms
App Install 12000 ms
App Launch 3000 ms
Test Execution 606000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 53ms / native 2ms = 26.5x speedup
SIMD float-mul (64K x300) java 54ms / native 3ms = 18.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 196.000 ms
Base64 CN1 decode 134.000 ms
Base64 native encode 275.000 ms
Base64 encode ratio (CN1/native) 0.713x (28.7% faster)
Base64 native decode 405.000 ms
Base64 decode ratio (CN1/native) 0.331x (66.9% faster)
Base64 SIMD encode 62.000 ms
Base64 encode ratio (SIMD/CN1) 0.316x (68.4% faster)
Base64 SIMD decode 42.000 ms
Base64 decode ratio (SIMD/CN1) 0.313x (68.7% faster)
Base64 encode ratio (SIMD/native) 0.225x (77.5% faster)
Base64 decode ratio (SIMD/native) 0.104x (89.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 6.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 39.000 ms
Image applyMask (SIMD on) 28.000 ms
Image applyMask ratio (SIMD on/off) 0.718x (28.2% faster)
Image modifyAlpha (SIMD off) 30.000 ms
Image modifyAlpha (SIMD on) 27.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.900x (10.0% faster)
Image modifyAlpha removeColor (SIMD off) 32.000 ms
Image modifyAlpha removeColor (SIMD on) 29.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.906x (9.4% faster)

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 144 screenshots: 144 matched.
✅ Native Apple TV (tvOS, Metal) screenshot tests passed.

@shai-almog

shai-almog commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 217 screenshots: 217 matched.
✅ Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.

@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ByteCodeTranslator: 0 findings (no issues)
    • android: 0 findings (no issues)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 0 findings (no issues)
  • PMD: 0 findings (no issues) [Report archive]
  • Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

Copilot AI review requested due to automatic review settings July 21, 2026 15:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new com.codename1.calendar package to provide a capability-based, cross-platform calendar abstraction (local device calendars plus app-owned online providers), including portable RFC 5545 import/export, change notifications (pull-based + local listeners), and an opt-in offline mutation queue with explicit conflict handling.

Changes:

  • Adds core calendar domain model, capabilities/authorization contract, provider HTTP/auth scaffolding, and offline sync/cache primitives under CodenameOne/src/com/codename1/calendar/.
  • Implements local calendar sources for Android (Calendar Provider), iOS/Mac Catalyst (EventKit), and a deterministic simulator-only in-memory JavaSE source; wires these into ports via getLocalCalendarSource().
  • Adds tests (core unit tests + HelloCodenameOne CN1SS smoke) and updates builders/docs for required permissions, privacy strings, and restricted capabilities.

Reviewed changes

Copilot reviewed 85 out of 85 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/hellocodenameone/conformance/test_port_status.py Updates conformance expectations and registers the new calendar feature/test.
scripts/hellocodenameone/common/src/main/kotlin/com/codenameone/examples/hellocodenameone/HelloCodenameOne.kt Adds license header (and aligns file with project header conventions).
scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.java Registers the new CN1SS CalendarApiTest in the device runner suite.
scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/CalendarApiTest.java Adds a portable calendar API smoke test for CN1SS.
Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java Exposes a simulator-only LocalCalendarSource implementation for JavaSE.
Ports/JavaSE/src/com/codename1/impl/javase/JavaSECalendarSource.java Adds deterministic in-memory local calendar source for the simulator.
Ports/iOSPort/src/com/codename1/impl/ios/IOSNative.java Adds native method surface for EventKit-backed calendar operations.
Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java Wires iOS LocalCalendarSource into the port implementation.
Ports/iOSPort/src/com/codename1/impl/ios/IOSCalendarSource.java Implements EventKit-backed local calendar source (events + reminders).
Ports/iOSPort/nativeSources/IOSNative.m Implements EventKit bridge and build-flag gating for calendar natives.
Ports/CLDC11/src/java/time/format/DateTimeFormatter.java Adjusts parsing paths to use existing ISO formatter parse methods.
Ports/CLDC11/src/java/time/Duration.java Adds Duration.parse() support needed by calendar/time handling.
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Wires Android LocalCalendarSource into the port implementation.
Ports/Android/src/com/codename1/impl/android/AndroidCalendarSource.java Implements Android Calendar Provider local source (events + details).
maven/core-unittests/src/test/java/com/codename1/calendar/CalendarIntegrationTest.java Adds unit coverage for model codecs, iCalendar round-trips, providers, and sync engine.
maven/core-unittests/spotbugs-exclude.xml Adds SpotBugs excludes for calendar package callback patterns.
maven/codenameone-maven-plugin/src/test/java/com/codename1/builders/WindowsNativeBuilderArchTest.java Adds test enforcing explicit opt-in for Windows restricted calendar capability.
maven/codenameone-maven-plugin/src/test/java/com/codename1/builders/MacNativeBuilderEntitlementsTest.java Adds test ensuring macOS calendar entitlement is emitted when privacy hints are present.
maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/WindowsNativeBuilder.java Adds explicit opt-in for MSIX restricted appointments capability.
maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/MacNativeBuilder.java Adds macOS sandbox calendar entitlement emission driven by privacy hints/entitlement override.
maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/IPhoneBuilder.java Detects calendar usage, injects iOS privacy strings, and enables EventKit native compilation.
maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java Auto-adds Android calendar permissions when LocalCalendarSource is referenced.
docs/website/data/port_status.json Registers the new “calendar-integration” feature for port status reporting.
docs/website/data/port_status_reports/windows-x64.json Adds CalendarApiTest status entry to the Windows x64 report.
docs/website/data/port_status_reports/windows-arm64.json Adds CalendarApiTest status entry to the Windows arm64 report.
docs/website/data/port_status_reports/watchos.json Adds CalendarApiTest status entry to the watchOS report.
docs/website/data/port_status_reports/tvos.json Adds CalendarApiTest status entry to the tvOS report.
docs/website/data/port_status_reports/mac-native.json Adds CalendarApiTest status entry to the mac-native report.
docs/website/data/port_status_reports/linux-x64.json Adds CalendarApiTest status entry to the Linux x64 report.
docs/website/data/port_status_reports/linux-arm64.json Adds CalendarApiTest status entry to the Linux arm64 report.
docs/website/data/port_status_reports/javascript.json Adds CalendarApiTest status entry to the JavaScript report.
docs/website/data/port_status_reports/ios-metal.json Adds CalendarApiTest status entry to the iOS Metal report.
docs/website/data/port_status_reports/ios-gl.json Adds CalendarApiTest status entry to the iOS GL report.
docs/website/data/port_status_reports/android.json Adds CalendarApiTest status entry to the Android report.
docs/developer-guide/developer-guide.asciidoc Adds the new Calendar Integration chapter to the developer guide TOC.
docs/developer-guide/Calendar-Integration.asciidoc Documents the calendar API contract, platform coverage, permissions, and offline sync model.
docs/demos/common/src/main/java/com/codenameone/developerguide/calendar/CalendarIntegrationSnippets.java Adds includable code snippets for the developer guide.
CodenameOne/src/com/codename1/ui/Display.java Exposes getLocalCalendarSource() as a port delegation surface.
CodenameOne/src/com/codename1/impl/CodenameOneImplementation.java Adds getLocalCalendarSource() port hook (default null).
CodenameOne/src/com/codename1/calendar/package-info.java Adds package-level overview for the new calendar API.
CodenameOne/src/com/codename1/calendar/CalendarAccess.java Defines authorization access levels (events read/write/full, tasks full).
CodenameOne/src/com/codename1/calendar/CalendarAuthorizationStatus.java Defines authorization states (denied/write-only/full/etc.).
CodenameOne/src/com/codename1/calendar/CalendarAuthToken.java Defines bearer token + expiry helpers for providers.
CodenameOne/src/com/codename1/calendar/CalendarTokenProvider.java Defines app-owned token provider contract.
CodenameOne/src/com/codename1/calendar/CalendarHttpRequest.java Defines provider request envelope for injected transports.
CodenameOne/src/com/codename1/calendar/CalendarHttpResponse.java Defines provider response envelope + headers.
CodenameOne/src/com/codename1/calendar/CalendarHttpTransport.java Defines transport interface for provider IO.
CodenameOne/src/com/codename1/calendar/DefaultCalendarHttpTransport.java Implements transport using CN1 ConnectionRequest/NetworkManager.
CodenameOne/src/com/codename1/calendar/OidcCalendarTokenProvider.java Adapts OidcClient/OidcTokens into CalendarTokenProvider.
CodenameOne/src/com/codename1/calendar/OAuthCalendarSource.java Adds shared OAuth/HTTP behavior including 401 refresh retry logic.
CodenameOne/src/com/codename1/calendar/CalendarError.java Adds portable calendar error categories.
CodenameOne/src/com/codename1/calendar/CalendarException.java Adds typed exception carrying CalendarError and optional response code.
CodenameOne/src/com/codename1/calendar/CalendarCapability.java Defines granular capability flags for sources/collections.
CodenameOne/src/com/codename1/calendar/CalendarCapabilities.java Immutable capability set wrapper.
CodenameOne/src/com/codename1/calendar/CalendarMutationScope.java Defines recurring mutation scopes (this instance/future/all).
CodenameOne/src/com/codename1/calendar/CalendarChangeListener.java Defines listener contract for local change events.
CodenameOne/src/com/codename1/calendar/CalendarChange.java Defines portable change payload (entity + change type + ids).
CodenameOne/src/com/codename1/calendar/CalendarPage.java Defines page envelope (items + next token + sync token).
CodenameOne/src/com/codename1/calendar/CalendarQuery.java Defines portable query parameters (range, tokens, paging, etc.).
CodenameOne/src/com/codename1/calendar/CalendarDateTime.java Defines “timed vs all-day” date/time wrapper using java.time.
CodenameOne/src/com/codename1/calendar/CalendarDateUtil.java Adds helper parsing/formatting utilities for portable date handling.
CodenameOne/src/com/codename1/calendar/FreeBusyInterval.java Adds busy-interval model.
CodenameOne/src/com/codename1/calendar/CalendarAlarm.java Adds alarm model (relative duration or absolute instant).
CodenameOne/src/com/codename1/calendar/CalendarAttendee.java Adds attendee model with role/response semantics.
CodenameOne/src/com/codename1/calendar/CalendarAttachment.java Adds attachment model for provider integrations.
CodenameOne/src/com/codename1/calendar/CalendarConference.java Adds conferencing metadata model.
CodenameOne/src/com/codename1/calendar/CalendarRecurrenceRule.java Adds portable recurrence rule model.
CodenameOne/src/com/codename1/calendar/CalendarInfo.java Adds calendar/task-list collection model.
CodenameOne/src/com/codename1/calendar/CalendarEvent.java Adds portable calendar event model.
CodenameOne/src/com/codename1/calendar/CalendarTask.java Adds portable task/reminder model.
CodenameOne/src/com/codename1/calendar/CalendarModelCodec.java Adds lossless map encoding/decoding for caching/fixtures.
CodenameOne/src/com/codename1/calendar/CalendarConflict.java Adds conflict model for offline sync resolution.
CodenameOne/src/com/codename1/calendar/CalendarSyncResult.java Adds sync result model (applied/remaining/conflicts).
CodenameOne/src/com/codename1/calendar/CalendarCache.java Adds persistence seam for offline sync state.
CodenameOne/src/com/codename1/calendar/MemoryCalendarCache.java Adds in-memory CalendarCache implementation.
CodenameOne/src/com/codename1/calendar/StorageCalendarCache.java Adds Storage-backed persistent CalendarCache implementation.
CodenameOne/src/com/codename1/calendar/CalendarSyncEngine.java Adds opt-in offline mutation queue with conflict pausing/resolution.
CodenameOne/src/com/codename1/calendar/CalendarSource.java Adds base source contract and EDT-dispatching change notifications.
CodenameOne/src/com/codename1/calendar/LocalCalendarSource.java Adds standard “device local” source entry point with fallback behavior.
CodenameOne/src/com/codename1/calendar/CalendarManager.java Adds registry/entry point for local + app-registered provider sources.
CodenameOne/src/com/codename1/calendar/CalDavAuthentication.java Adds CalDAV auth strategies (Basic/Bearer/Digest).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// and AddressBookUI is absent. The native methods that use them are guarded to
// no-ops on those slices.
#if !TARGET_OS_WATCH && !TARGET_OS_TV
#if defined(CN1_USE_CALENDAR) && !TARGET_OS_WATCH && !TARGET_OS_TV
Comment on lines +70 to +73
int numberStart = position;
if (value.charAt(position) == '+' || value.charAt(position) == '-') {
position++;
}
Comment on lines +37 to +40
public final class CalendarApiTest extends BaseTest {
public boolean shouldTakeScreenshot(){return false;}
public boolean runTest(){try{CalendarEvent source=new CalendarEvent().setId("cn1-calendar-smoke").setTitle("Calendar smoke").setStart(CalendarDateTime.allDay(LocalDate.of(2026,7,19))).setEnd(CalendarDateTime.allDay(LocalDate.of(2026,7,20))).setRecurrence(new CalendarRecurrenceRule().setFrequency(CalendarRecurrenceRule.Frequency.YEARLY)).addAlarm(new CalendarAlarm().setTimeBefore(Duration.ofMinutes(15)));CalendarEvent decoded=ICalendarCodec.readEvent(ICalendarCodec.writeEvent(source));assertEqual("cn1-calendar-smoke",decoded.getId());assertTrue(decoded.getStart().isAllDay(),"All-day event lost its date-only semantics");assertEqual(LocalDate.of(2026,7,19),decoded.getStart().getDate());assertEqual(Duration.ofMinutes(15),decoded.getAlarms().get(0).getTimeBefore());assertEqual(CalendarRecurrenceRule.Frequency.YEARLY,decoded.getRecurrence().getFrequency());Instant instant=Instant.ofEpochMilli(1784455200000L);CalendarEvent timed=new CalendarEvent().setStart(CalendarDateTime.instant(instant,ZoneId.of("Asia/Jerusalem")));CalendarEvent timedDecoded=ICalendarCodec.readEvent(ICalendarCodec.writeEvent(timed));assertEqual(instant.toEpochMilli(),timedDecoded.getStart().getDateTime().toInstant().toEpochMilli());System.out.println("CN1SS:CALENDAR_DIAG capabilities="+LocalCalendarSource.getInstance().getCapabilities().asSet());done();return true;}catch(Throwable error){fail("Calendar API test failed: "+error);return false;}}
}
Comment on lines +46 to +47
/** Deterministic in-memory calendar used by the simulator and desktop run. */
final class JavaSECalendarSource extends LocalCalendarSource {
Copilot AI review requested due to automatic review settings July 22, 2026 02:37
@github-actions

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 406 total, 0 failed, 14 skipped

Benchmark Results

  • Execution Time: 16988 ms

  • Hotspots (Top 20 sampled methods):

    • 17.01% com.codename1.tools.translator.Parser.addToConstantPool (257 samples)
    • 11.05% java.util.ArrayList.indexOf (167 samples)
    • 3.64% java.lang.StringBuilder.append (55 samples)
    • 2.71% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (41 samples)
    • 2.45% java.lang.Object.hashCode (37 samples)
    • 2.18% com.codename1.tools.translator.BytecodeMethod.optimize (33 samples)
    • 1.92% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (29 samples)
    • 1.85% org.objectweb.asm.tree.analysis.Analyzer.analyze (28 samples)
    • 1.85% com.codename1.tools.translator.Parser.cn1EnsureSubclassIndex (28 samples)
    • 1.79% com.codename1.tools.translator.ByteCodeClass.fillVirtualMethodTable (27 samples)
    • 1.52% java.lang.String.equals (23 samples)
    • 1.52% java.util.HashMap.hash (23 samples)
    • 1.39% org.objectweb.asm.tree.analysis.Analyzer.findSubroutine (21 samples)
    • 1.26% com.codename1.tools.translator.BytecodeMethod.equals (19 samples)
    • 1.26% java.io.UnixFileSystem.getBooleanAttributes0 (19 samples)
    • 1.19% java.util.HashMap.put (18 samples)
    • 1.13% java.util.IdentityHashMap$KeySet.toArray (17 samples)
    • 1.06% java.lang.System.identityHashCode (16 samples)
    • 0.99% java.lang.StringCoding.encode (15 samples)
    • 0.93% com.codename1.tools.translator.BytecodeMethod.appendMethodC (14 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 90 out of 90 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

Ports/iOSPort/nativeSources/IOSNative.m:102

  • The preprocessor guard for importing MFMailComposeViewController is now tied to CN1_USE_CALENDAR, but the surrounding comment (and the rest of the file) indicates MessageUI availability should only depend on watchOS/tvOS. This looks like an accidental coupling to the calendar feature flag and makes the condition inconsistent with the MFMessageComposeViewController import below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants