From eb8498168d4167accafc96d5f6cd54b9d7b9d342 Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Sun, 2 Aug 2026 10:29:45 +0200 Subject: [PATCH] fix(shared): avoid java accessor shadowing when reading app.properties In a Gradle Kotlin DSL script `java` resolves to the Java plugin extension accessor, so `java.util.Properties` failed script compilation with "Unresolved reference 'util'", breaking the shared/Linux/Windows KMP jobs. Import java.util.Properties and use it unqualified, matching the root build. --- shared/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index e240401..63d9f05 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -14,6 +14,7 @@ import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.TaskAction import org.gradle.jvm.tasks.Jar import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import java.util.Properties abstract class VerifyHostCargoTaskSelection : DefaultTask() { @get:Input @@ -112,7 +113,7 @@ val generateDiagnosticsBuildConfig by tasks.registering { // App-wide public constants (privacy policy URL, …) from the shared app.properties, // so Apple and KMP read one source of truth instead of hardcoding values. -val appProperties = java.util.Properties().apply { +val appProperties = Properties().apply { rootProject.file("app.properties").inputStream().use(::load) } val privacyPolicyUrl: String = appProperties.getProperty("PRIVACY_POLICY_URL")?.trim().orEmpty()