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.
This commit is contained in:
2026-08-02 10:29:45 +02:00
parent ac6e837560
commit eb8498168d

View File

@@ -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()