Skip to content

Multipeer replicator and Android/Apple-only Enterprise Edition APIs - #72

Open
jeffdgr8 wants to merge 2 commits into
cbl-4.1-testsfrom
multipeer
Open

Multipeer replicator and Android/Apple-only Enterprise Edition APIs#72
jeffdgr8 wants to merge 2 commits into
cbl-4.1-testsfrom
multipeer

Conversation

@jeffdgr8

Copy link
Copy Markdown
Owner

Adds an androidApple intermediate source set shared by the Android and Apple targets, for Enterprise Edition APIs that exist only in the Android and Objective-C SDKs (absent from the C SDK and Java desktop):

  • The Multipeer Replicator family (CBL 3.3, GA 4.0, transport selection 4.1): MultipeerReplicator, configurations, authenticators, PeerInfo, peer status/replication events, and MultipeerTransport
  • TLSIdentity.createdSignedIdentityInsecure (CA-signed identities for test environments)

Shapes follow Kotbase conventions: constructors + properties instead of Java Builders, CoroutineContext/CoroutineScope listener overloads, ByteArray certificates, doc comments from the Java SDK. Android-only members (getMissingPermissions(Context)) live on the Android actuals.

Ports the 22 tests of the iOS MultipeerReplicatorTest suite; 3 run everywhere, 19 ignored pending real peer-to-peer networking (disabled upstream by default too).

Also resolves compilation warnings across the project (missing @Throws on actuals, dead null-handling after 4.1 nullability changes, Kotlin 2.4 false-positive interop cast warnings).

EE tests: 957 JVM / 1,019 macosX64, zero failures.

🤖 Generated with Claude Code

jeffdgr8 and others added 2 commits July 10, 2026 18:07
- Add @throws(CouchbaseLiteException) to the QueryBuilder.createQuery
  actuals (jvmCommon, apple, linuxMingw) to match the expect
  declaration
- Drop the now-dead Elvis throw in Document.toJSON on JVM: the 4.1
  Java SDK returns non-null and throws internally
- Drop the now-redundant toJSON()!! assertions in DocumentTest
- Suppress UNSAFE_CAST_RELYING_ON_NULL on the Apple Number->NSNumber
  bridging casts and the dispatch-queue null-attribute cast: the
  Kotlin 2.4 frontend flags these, but the Kotlin/Native backend
  performs the interop conversion at runtime (the macOS tests
  exercise these paths)

The remaining macosX64/Kotlin-Native-host deprecation warnings are
JetBrains sunsetting the Intel Apple targets and cannot be resolved
without dropping the macosX64 target.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds an androidApple intermediate source set shared by the Android
and Apple targets, for Couchbase Lite EE APIs that exist only in the
Android and Objective-C SDKs (absent from the C SDK and Java
desktop):

- The Multipeer Replicator family (CBL 3.3, GA 4.0, transport
  selection 4.1): MultipeerReplicator, MultipeerReplicatorConfiguration,
  MultipeerCollectionConfiguration, MultipeerAuthenticator,
  MultipeerCertificateAuthenticator, MultipeerReplicatorStatus,
  PeerInfo (with PeerId), PeerDiscoveryStatus, PeerReplicatorStatus,
  PeerDocumentReplication, and MultipeerTransport
- TLSIdentity.createdSignedIdentityInsecure (CA-signed identities
  for test environments)

Shapes follow Kotbase conventions: configurations use constructors
with mutable properties and chaining setters in place of the Java
Builders, listeners get CoroutineContext and CoroutineScope
overloads, certificates are ByteArray, and doc comments come from
the Java SDK. Android-only members (getNecessaryPermissions,
getMissingPermissions(Context)) live on the Android actuals.

Ports the 22 tests of the iOS MultipeerReplicatorTest suite to the
shared androidAppleTest source set; 3 run everywhere (configuration,
validation, transport status), 19 are ignored pending real
peer-to-peer networking, as upstream disables them by default.

EE tests: 957 JVM / 1019 macosX64, zero failures; all targets
compile; apiCheck passes with the regenerated EE klib dump.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant