Skip to content

Commit 1e89757

Browse files
committed
fix: use .env by lazy
1 parent abf0bf0 commit 1e89757

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build.gradle.kts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import org.jetbrains.changelog.Changelog
22
import org.jetbrains.changelog.markdownToHTML
33
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
44
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5-
import java.nio.charset.Charset
65
import java.util.*
76

87
plugins {
@@ -18,9 +17,11 @@ plugins {
1817
group = providers.gradleProperty("pluginGroup").get()
1918
version = providers.gradleProperty("pluginVersion").get()
2019

21-
val envProperties = Properties()
22-
envProperties.load(file(".env").reader(Charset.forName("UTF-8")))
23-
20+
val envProperties by lazy {
21+
Properties().apply {
22+
load(file(".env").inputStream())
23+
}
24+
}
2425
// Set the JVM language level used to build the project.
2526
kotlin {
2627
jvmToolchain(21)

0 commit comments

Comments
 (0)