mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 10:29:58 +02:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user