[JS] [tests] Look for properties in local.properties
This commit is contained in:
committed by
Space Team
parent
1417c8961b
commit
d16bbb1145
@@ -6,6 +6,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinUsages
|
||||
import org.jetbrains.kotlin.gradle.targets.js.d8.D8RootPlugin
|
||||
import org.jetbrains.kotlin.ideaExt.idea
|
||||
import org.apache.tools.ant.filters.FixCrLfFilter
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
@@ -327,10 +328,18 @@ fun Test.setUpBoxTests() {
|
||||
systemProperty("overwrite.output", project.providers.gradleProperty("overwrite.output")
|
||||
.forUseAtConfigurationTime().orNull ?: "false")
|
||||
|
||||
val prefixForPpropertiesToForward = "fd."
|
||||
for ((key, value) in properties) {
|
||||
if (key.startsWith(prefixForPpropertiesToForward)) {
|
||||
systemProperty(key.substring(prefixForPpropertiesToForward.length), value!!)
|
||||
val localProperties = Properties().apply {
|
||||
project.file("local.properties").takeIf { it.isFile }?.inputStream()?.use {
|
||||
load(it)
|
||||
}
|
||||
}
|
||||
|
||||
val allProperties = localProperties + properties
|
||||
|
||||
val prefixForPropertiesToForward = "fd."
|
||||
for ((key, value) in allProperties) {
|
||||
if (key is String && key.startsWith(prefixForPropertiesToForward)) {
|
||||
systemProperty(key.substring(prefixForPropertiesToForward.length), value!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user