-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
61 lines (49 loc) · 1.66 KB
/
build.gradle.kts
File metadata and controls
61 lines (49 loc) · 1.66 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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.google.gms.google.services) apply false
id("vkid.manifest.placeholders") version "1.1.0" apply true
id("com.google.devtools.ksp") version "2.0.21-1.0.25" apply false
}
val properties = Properties()
val file = rootProject.file("local.properties")
properties.load(FileInputStream(file))
vkidManifestPlaceholders {
init(
clientSecret = getVkSecretKey(),
clientId = getVkClientId()
)
}
extra.apply {
set("mapKitKey", getMapKitKey())
set("staticKey", getStaticKey())
set("yandexClientId", getYandexClientId())
set("googleClientId", getGoogleClientId())
}
private fun getMapKitKey(): String {
val properties = Properties()
val file = rootProject.file("local.properties")
properties.load(FileInputStream(file))
return properties.getProperty("MAPKIT_API_KEY", "")
}
private fun getStaticKey(): String {
val properties = Properties()
val file = rootProject.file("local.properties")
properties.load(FileInputStream(file))
return properties.getProperty("STATIC_API_KEY", "")
}
private fun getVkClientId(): String {
return properties.getProperty("VK_CLIENT_ID", "")
}
private fun getVkSecretKey(): String {
return properties.getProperty("VK_SECRET_KEY", "")
}
private fun getYandexClientId(): String {
return properties.getProperty("YANDEX_CLIENT_ID", "")
}
private fun getGoogleClientId(): String {
return properties.getProperty("GOOGLE_CLIENT_ID", "")
}