-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
37 lines (31 loc) · 1.17 KB
/
build.gradle.kts
File metadata and controls
37 lines (31 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.io.FileInputStream
import java.util.Properties
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.graph) apply false
id("vkid.manifest.placeholders") version "1.1.0" apply true
}
val properties = Properties()
val file = rootProject.file("local.properties")
properties.load(FileInputStream(file))
vkidManifestPlaceholders {
val clientId = getVkClientId()
val secretId = getVkClientSecret()
init(
clientId = clientId,
clientSecret = secretId,
)
}
extra.apply {
set("movieApiKey", getKinopoiskAPIKey())
set("yandexAuthKey", getYandexAuthKey())
}
private fun getKinopoiskAPIKey() = properties.getProperty("MOVIE_API_KEY", "")
private fun getYandexAuthKey() = properties.getProperty("YANDEX_AUTH", "")
private fun getVkClientId() = properties.getProperty("VK_CLIENT_ID", "")
private fun getVkClientSecret() = properties.getProperty("VK_CLIENT_SECRET", "")