Phase 1 milestone M1a (Development Plan §6, desktop track): make the whole
data layer usable from a non-Android build, without touching what the
Android app compiles.
:core:data splits its sources:
src/main/kotlin platform-neutral — entities, repository, field
crypto, NoteCryptoService. Compiled by BOTH
:core:data and :core:data-jvm. Must not import
android.*
src/androidMain/kotlin Android-only seam implementations.
Two seams were required, both identified by the Phase-0 spike:
ObjectBoxStore Context on Android, a directory on desktop. Same
FQN in sibling modules that are never on one
classpath — which is also what keeps
objectbox-android and objectbox-java (they ship
the same io.objectbox.* classes) apart.
ImageOrientationNormalizer EXIF rotation needs a bitmap decoder; the
implementation moved verbatim out of
NoteRepositoryImpl, which is now platform-free.
The parameter is required, not defaulted, so a
platform that forgets it fails the build.
New :core:data-jvm compiles those shared sources against objectbox-java /
objectbox-linux with its own codegen. `:core:data-jvm:smoke` runs the real
NoteRepositoryImpl (save + hashtags + attachment round-trip + close/reopen)
on the JVM: PASS, with the generator reporting "ID model file unchanged" —
one schema, two generated runtimes.
Also: .gitignore excluded **/objectbox-models/, so the schema contract was
never committed and a fresh clone regenerated UIDs. default.json is now
tracked; the rest of that directory stays ignored. This matters more now
that two modules generate from it.
Verified: :core:data-jvm:smoke PASS, assembleDebug green.
195 lines
4.7 KiB
JSON
195 lines
4.7 KiB
JSON
{
|
|
"_note1": "KEEP THIS FILE! Check it into a version control system (VCS) like git.",
|
|
"_note2": "ObjectBox manages crucial IDs for your object model. See docs for details.",
|
|
"_note3": "If you have VCS merge conflicts, you must resolve them according to ObjectBox docs.",
|
|
"entities": [
|
|
{
|
|
"id": "1:2086366869756073512",
|
|
"lastPropertyId": "11:3900643584337280163",
|
|
"name": "NoteEntity",
|
|
"properties": [
|
|
{
|
|
"id": "1:504738300062779212",
|
|
"name": "id",
|
|
"type": 6,
|
|
"flags": 1
|
|
},
|
|
{
|
|
"id": "2:934725261850395537",
|
|
"name": "content",
|
|
"type": 9
|
|
},
|
|
{
|
|
"id": "3:7787800412489145126",
|
|
"name": "createdAt",
|
|
"indexId": "1:2377104061956606005",
|
|
"type": 6,
|
|
"flags": 8
|
|
},
|
|
{
|
|
"id": "4:7214601561419742071",
|
|
"name": "updatedAt",
|
|
"type": 6
|
|
},
|
|
{
|
|
"id": "5:8997711518431222149",
|
|
"name": "isFavorite",
|
|
"indexId": "2:2889322420050596277",
|
|
"type": 1,
|
|
"flags": 8
|
|
},
|
|
{
|
|
"id": "6:2157877161769308588",
|
|
"name": "colorKey",
|
|
"type": 3
|
|
},
|
|
{
|
|
"id": "7:9124062984393699059",
|
|
"name": "cipherVersion",
|
|
"type": 5
|
|
},
|
|
{
|
|
"id": "8:505259681403080579",
|
|
"name": "contentBlob",
|
|
"type": 23
|
|
},
|
|
{
|
|
"id": "9:2838488564098834737",
|
|
"name": "isTrashed",
|
|
"indexId": "7:9172152715891628247",
|
|
"type": 1,
|
|
"flags": 8
|
|
},
|
|
{
|
|
"id": "10:5547426387212371555",
|
|
"name": "typeKey",
|
|
"type": 3
|
|
},
|
|
{
|
|
"id": "11:3900643584337280163",
|
|
"name": "isDraft",
|
|
"indexId": "8:9185376899648223266",
|
|
"type": 1,
|
|
"flags": 8
|
|
}
|
|
],
|
|
"relations": []
|
|
},
|
|
{
|
|
"id": "2:2528940840759116824",
|
|
"lastPropertyId": "2:6290673541624313354",
|
|
"name": "HashtagEntity",
|
|
"properties": [
|
|
{
|
|
"id": "1:6991393863924167484",
|
|
"name": "id",
|
|
"type": 6,
|
|
"flags": 1
|
|
},
|
|
{
|
|
"id": "2:6290673541624313354",
|
|
"name": "name",
|
|
"indexId": "3:8935974229325273672",
|
|
"type": 9,
|
|
"flags": 2048
|
|
}
|
|
],
|
|
"relations": []
|
|
},
|
|
{
|
|
"id": "3:1814708994588042328",
|
|
"lastPropertyId": "3:4619895459374594011",
|
|
"name": "NoteHashtagCrossRef",
|
|
"properties": [
|
|
{
|
|
"id": "1:8394679598512920368",
|
|
"name": "id",
|
|
"type": 6,
|
|
"flags": 1
|
|
},
|
|
{
|
|
"id": "2:7132785913803437080",
|
|
"name": "noteId",
|
|
"indexId": "4:4609493987894622099",
|
|
"type": 6,
|
|
"flags": 8
|
|
},
|
|
{
|
|
"id": "3:4619895459374594011",
|
|
"name": "hashtagId",
|
|
"indexId": "5:4178528765644585892",
|
|
"type": 6,
|
|
"flags": 8
|
|
}
|
|
],
|
|
"relations": []
|
|
},
|
|
{
|
|
"id": "4:715630424595534313",
|
|
"lastPropertyId": "9:5604884960166980615",
|
|
"name": "NoteAttachmentEntity",
|
|
"properties": [
|
|
{
|
|
"id": "1:8895066388904375968",
|
|
"name": "id",
|
|
"type": 6,
|
|
"flags": 1
|
|
},
|
|
{
|
|
"id": "2:5099883303141941942",
|
|
"name": "noteId",
|
|
"indexId": "6:644263235201197567",
|
|
"type": 6,
|
|
"flags": 8
|
|
},
|
|
{
|
|
"id": "3:5923891227223085632",
|
|
"name": "mimeType",
|
|
"type": 9
|
|
},
|
|
{
|
|
"id": "4:5969004045087908818",
|
|
"name": "displayName",
|
|
"type": 9
|
|
},
|
|
{
|
|
"id": "5:1484939891319950467",
|
|
"name": "createdAt",
|
|
"type": 6
|
|
},
|
|
{
|
|
"id": "6:4541111239334797694",
|
|
"name": "sizeBytes",
|
|
"type": 6
|
|
},
|
|
{
|
|
"id": "7:5483350198068298485",
|
|
"name": "bytes",
|
|
"type": 23
|
|
},
|
|
{
|
|
"id": "8:6354828434115894982",
|
|
"name": "cipherVersion",
|
|
"type": 5
|
|
},
|
|
{
|
|
"id": "9:5604884960166980615",
|
|
"name": "bytesBlob",
|
|
"type": 23
|
|
}
|
|
],
|
|
"relations": []
|
|
}
|
|
],
|
|
"lastEntityId": "4:715630424595534313",
|
|
"lastIndexId": "8:9185376899648223266",
|
|
"lastRelationId": "0:0",
|
|
"lastSequenceId": "0:0",
|
|
"modelVersion": 5,
|
|
"modelVersionParserMinimum": 5,
|
|
"retiredEntityUids": [],
|
|
"retiredIndexUids": [],
|
|
"retiredPropertyUids": [],
|
|
"retiredRelationUids": [],
|
|
"version": 1
|
|
} |