feat(config): shared app.properties for app-wide constants

Add a single source of truth (root app.properties) for public app-wide
constants, injected at build time on both platforms instead of hardcoding.

- Apple: generate-appconfig.sh -> Generated/AppConfig.swift (wired into
  `make apple-app-config`), consumed as AppConfig.privacyPolicyURL.
- KMP: generateAppConfig task -> AppConfig.kt (mirrors DiagnosticsBuildConfig),
  consumed as AppConfig.PRIVACY_POLICY_URL.

Replaces the stale hardcoded privacy-policy URL on both sides with
https://vnidrop.sudosy.fr/privacy/.

Also fix the Apple release core build: disable release LTO in build-core.sh
(Cargo forbids lto in a build-override) to avoid the proc-macro
"mis-aligned LINKEDIT string pool" corruption, so release archives are
compact instead of shipping the debug core.

Update the app icon.

Tests: shell test for the generator (escaping, missing/duplicate key),
plus XCTest and jvmTest asserting the generated value matches app.properties.
This commit is contained in:
2026-08-01 19:54:37 +02:00
parent d52ac52cea
commit 232fb125d3
11 changed files with 308 additions and 66 deletions

View File

@@ -375,7 +375,7 @@ struct StorageSettings: View {
struct AboutSettings: View {
@ObservedObject var model: SettingsModel
private static let privacyPolicyURL = URL(string: "https://github.com/vnidrop/vnidrop")!
private static let privacyPolicyURL = AppConfig.privacyPolicyURL
var body: some View {
Section {

View File

@@ -1,62 +1,57 @@
{
"fill": {
"linear-gradient": [
"extended-gray:1.00000,1.00000",
"display-p3:0.55433,0.59923,0.92884,1.00000"
]
},
"groups": [
{
"blend-mode": "normal",
"blur-material": null,
"layers": [
{
"image-name": "Mask.svg",
"name": "Mask"
}
],
"lighting": "individual",
"refractivity": {
"depth": 0.5,
"enabled": true,
"strength": 0
},
"shadow": {
"kind": "neutral",
"opacity": 0.6
},
"specular": true,
"translucency": {
"enabled": true,
"value": 0.8
}
},
{
"layers": [
{
"image-name": "Drop.svg",
"name": "Drop"
},
{
"image-name": "U.svg",
"name": "U"
}
],
"lighting": "combined",
"shadow": {
"kind": "neutral",
"opacity": 0.6
},
"translucency": {
"enabled": true,
"value": 0.4
}
}
],
"supported-platforms": {
"circles": [
"watchOS"
],
"squares": "shared"
}
}
"fill" : {
"linear-gradient" : [
"extended-gray:1.00000,1.00000",
"srgb:0.84942,0.81480,0.95401,1.00000"
]
},
"groups" : [
{
"blend-mode" : "normal",
"blur-material" : null,
"layers" : [
{
"image-name" : "Mask.svg",
"name" : "Mask"
}
],
"lighting" : "individual",
"shadow" : {
"kind" : "neutral",
"opacity" : 0.6
},
"specular" : true,
"translucency" : {
"enabled" : true,
"value" : 0.8
}
},
{
"layers" : [
{
"image-name" : "Drop.svg",
"name" : "Drop"
},
{
"image-name" : "U.svg",
"name" : "U"
}
],
"lighting" : "combined",
"shadow" : {
"kind" : "layer-color",
"opacity" : 0.8
},
"translucency" : {
"enabled" : true,
"value" : 0.4
}
}
],
"supported-platforms" : {
"circles" : [
"watchOS"
],
"squares" : "shared"
}
}