Commerce SDK + Secrets API + developer-guide docs#5300
Conversation
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
Cloudflare Preview
|
|
Compared 139 screenshots: 139 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
|
Compared 136 screenshots: 136 matched. |
|
Compared 214 screenshots: 214 matched. |
Mac native screenshot updatesCompared 137 screenshots: 116 matched, 21 missing actuals.
Benchmark Results
|
|
Compared 134 screenshots: 134 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
|
Compared 138 screenshots: 138 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
Optional client facade over Purchase that adds cloud-side receipt validation and store-agnostic entitlement checks via the Codename One Commerce service. - isEntitled(entitlementId) with store-direct fallback (paying users never locked out when the cloud is unreachable or over the monthly cap). - refresh() posts receipts to /validate, folds returned entitlements into a cache; isDegraded() reflects over-cap/offline. - purchase/subscribe/unsubscribe delegate to Purchase; reads the build-stamped codename1.commerce.cloud.* properties; inert no-op when the build did not enable commerce. - Java 5 source-compatible (framework constraint); compiles against codenameone-core with JDK 8 at -source 1.5; ASCII-only for the ParparVM build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Covers entitlements-not-SKUs, CommerceManager client usage, the build_key auto-wiring, Apple/Google server-notification setup, the ordered/idempotent lifecycle webhooks, the validated-volume meter + graceful degradation, the console, and privacy. Registered in developer-guide.asciidoc after Analytics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…als) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds com.codename1.secrets.Secrets, a simple set/get/contains/delete/
keys API for app secrets (auth tokens, API keys) that never stores a
value as plaintext:
- SecretsStore SPI — a platform port / keychain cn1lib registers a
hardware-backed store (iOS Keychain, Android Keystore) via
Secrets.setStore; isHardwareBacked() reports which is active.
- DefaultSecretsStore — software fallback used when no hardware store
is registered (notably the simulator): AES-256-CBC + HMAC-SHA256
encrypt-then-MAC over Storage, CSPRNG master key in Preferences,
constant-time MAC compare. Written at the Java-5 API level so it
compiles for core / ParparVM; ASCII-only source.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New Secrets developer-guide chapter (registered in developer-guide.asciidoc): the secure-by-default API, the hardware-keychain SPI, the AES at-rest fallback, and the all-tier server-side secrets vault. Commerce chapter gains an Analytics section documenting the parity dashboard: MRR/ARR/ARPU/churn, cohort retention, realized LTV, forecast, and store/product breakdowns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The repo's validate-java25-markdown-docs gate forbids classic /** **/ Javadoc markers under CodenameOne/ and Ports/CLDC11/. Convert the new Secrets API and CommerceManager doc comments to /// markdown style and add com/codename1/secrets/package-info.java (build-javadocs requires a package-info for every documented package). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fix the 11 Vale findings in the new Secrets/Commerce chapters (contractions, redundant adverbs, needless hyphens) so the developer-guide quality gate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the hand-rolled AES-256-CBC + HMAC-SHA256 software fallback with authenticated AES-256-GCM through com.codename1.security.Cipher (which runs on the platform's native crypto provider and is portable across the simulator/Android/iOS). GCM provides confidentiality + integrity in one pass, so the separate HMAC is gone. Fixes the two CodeQL high-severity java/weak-cryptographic-algorithm alerts (CBC + PKCS#5 padding-oracle) and the SpotBugs DM_DEFAULT_ENCODING finding (the unreachable getBytes() fallback now throws instead). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the Secrets chapter to describe the AES-256-GCM software fallback, and clear the 5 LanguageTool findings in the Secrets/Commerce chapters (British spelling, verb-as-noun, "backoff" typo, sentence-start casing in list items). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- RCN_REDUNDANT_NULLCHECK (CommerceManager.validateReceipt): drop the redundant `resp == null` check; Rest.getAsJsonMap() never returns null. - REC_CATCH_EXCEPTION (DefaultSecretsStore.get): catch UnsupportedEncodingException and RuntimeException explicitly instead of the broad Exception (Java-5 source, so no multi-catch). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b6505ba to
ea33749
Compare
Verified clean against the full core SpotBugs gate (effort=Max, threshold=Low) locally: - RV_ABSOLUTE_VALUE_OF_HASHCODE (getAppUserId): mask the sign bit with & 0x7fffffff instead of Math.abs(hashCode()) (which is negative for Integer.MIN_VALUE). - WMI_WRONG_MAP_ITERATOR x2 (getActiveEntitlements, applyEntitlements): iterate entrySet() instead of keySet()+get(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- CommerceManager: mark the class final (only private constructors) and iterate the receipt list with a foreach. - DefaultSecretsStore: add @OverRide to the six SecretsStore methods, convert the entry-scan and hex loops to foreach, and make the un-decodable-entry catch non-empty. Verified clean against the full core static-analysis gate (PMD + SpotBugs + 3638 unit tests) locally with -Plocal-dev-javase on JDK 8. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Client-side companion to the BuildCloud Commerce service
(codenameone/BuildCloud#78), plus a new secure secrets API.
Commerce SDK
com.codename1.payment.CommerceManager— facade on the payment APIthat talks to the BuildCloud Commerce service (reads build key /
package name; default endpoint on cloud.codenameone.com).
Secrets API (new, all tiers)
com.codename1.secrets.Secrets— secure-by-default key/value store(
set/get/contains/delete/keys/isHardwareBacked). Never writes avalue as plaintext.
SecretsStoreSPI — hardware keychain (iOS Keychain, AndroidKeystore) plugs in via
Secrets.setStore;DefaultSecretsStoreis anAES-256-CBC + HMAC-SHA256 encrypt-then-MAC software fallback over
Storage(used in the simulator). Java-5 / ParparVM-compatible,ASCII-only.
Docs (
docs/developer-guide)server-side vault), registered in
developer-guide.asciidoc.retention, realized LTV, forecast, store/product breakdowns).
Core compiles at
-source 1.5 -target 1.5; secrets package verifiedASCII-only for the ParparVM build.
🤖 Generated with Claude Code