Fix build failures from rebrand: restore pbxproj exceptions, fix Kotlin casing, move missed source dirs
- Restore 6 missing PBXFileSystemSynchronizedBuildFileExceptionSet entries and exceptions arrays on 5 root groups (lost during sed rename) - Rename extension WidgetIconView.swift to avoid stringsdata collision (original had different names: MyCribIconView vs CaseraIconView) - Rename CaseraExtension.entitlements → HoneyDueExtension.entitlements - Fix Kotlin object casing: honeyDueShareCodec → HoneyDueShareCodec, honeyDuePackageType → HoneyDuePackageType - Move missed Kotlin source dirs (jsMain, webMain, androidMain/com/casera) to com/tt/honeyDue - Rename remaining Casera widget files to HoneyDue - Rename CaseraTests.swift → HoneyDueTests.swift All 4 projects (Go API, iOS, Android, Web) now compile clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import kotlinx.serialization.json.Json
|
||||
* This keeps package JSON shape in one place while each platform owns
|
||||
* native share-sheet presentation details.
|
||||
*/
|
||||
object honeyDueShareCodec {
|
||||
object HoneyDueShareCodec {
|
||||
private val json = Json {
|
||||
prettyPrint = true
|
||||
ignoreUnknownKeys = true
|
||||
@@ -11,7 +11,7 @@ import kotlinx.serialization.json.jsonPrimitive
|
||||
/**
|
||||
* Package type identifiers for .honeydue files
|
||||
*/
|
||||
object honeyDuePackageType {
|
||||
object HoneyDuePackageType {
|
||||
const val CONTRACTOR = "contractor"
|
||||
const val RESIDENCE = "residence"
|
||||
}
|
||||
@@ -26,7 +26,7 @@ data class SharedContractor(
|
||||
val version: Int = 1,
|
||||
|
||||
/** Package type discriminator */
|
||||
val type: String = honeyDuePackageType.CONTRACTOR,
|
||||
val type: String = HoneyDuePackageType.CONTRACTOR,
|
||||
|
||||
val name: String,
|
||||
val company: String? = null,
|
||||
@@ -70,7 +70,7 @@ data class SharedResidence(
|
||||
val version: Int = 1,
|
||||
|
||||
/** Package type discriminator */
|
||||
val type: String = honeyDuePackageType.RESIDENCE,
|
||||
val type: String = HoneyDuePackageType.RESIDENCE,
|
||||
|
||||
/** The share code for joining the residence */
|
||||
@SerialName("share_code")
|
||||
@@ -101,11 +101,11 @@ data class SharedResidence(
|
||||
* Detect the type of a .honeydue package from its JSON content.
|
||||
* Returns null if the type cannot be determined.
|
||||
*/
|
||||
fun detecthoneyDuePackageType(jsonContent: String): String? {
|
||||
fun detectHoneyDuePackageType(jsonContent: String): String? {
|
||||
return try {
|
||||
val json = Json { ignoreUnknownKeys = true }
|
||||
val jsonObject = json.decodeFromString<JsonObject>(jsonContent)
|
||||
jsonObject["type"]?.jsonPrimitive?.content ?: honeyDuePackageType.CONTRACTOR // Default for backward compatibility
|
||||
jsonObject["type"]?.jsonPrimitive?.content ?: HoneyDuePackageType.CONTRACTOR // Default for backward compatibility
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
}
|
||||
@@ -118,7 +118,7 @@ fun detecthoneyDuePackageType(jsonContent: String): String? {
|
||||
fun Contractor.toSharedContractor(exportedBy: String? = null): SharedContractor {
|
||||
return SharedContractor(
|
||||
version = 1,
|
||||
type = honeyDuePackageType.CONTRACTOR,
|
||||
type = HoneyDuePackageType.CONTRACTOR,
|
||||
name = name,
|
||||
company = company,
|
||||
phone = phone,
|
||||
|
||||
Reference in New Issue
Block a user