Skip to content

Commit d56e60e

Browse files
committed
Fix CI setups
1 parent 6ad8fd7 commit d56e60e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

gradle-conventions/src/main/kotlin/util/other/localProperties.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import org.gradle.kotlin.dsl.provideDelegate
1010
import java.util.Properties
1111
import java.util.concurrent.atomic.AtomicReference
1212
import kotlin.io.path.Path
13+
import kotlin.io.path.exists
1314
import kotlin.io.path.inputStream
1415

1516
private val ref = AtomicReference<Properties>()
@@ -19,7 +20,13 @@ fun Project.localProperties(): Properties {
1920
ref.compareAndSet(null, Properties().apply {
2021
val globalRootDir: String by extra
2122

22-
load(Path(globalRootDir, "local.properties").inputStream())
23+
val filepath = Path(globalRootDir, "local.properties")
24+
25+
if (!filepath.exists()) {
26+
return@apply
27+
}
28+
29+
load(filepath.inputStream())
2330
})
2431
}
2532

0 commit comments

Comments
 (0)