-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
55 lines (51 loc) · 1.54 KB
/
settings.gradle.kts
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
import java.util.Properties
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
mavenLocal()
maven {
val ghUsername = System.getenv("GH_USERNAME") ?: getLocalProperty("GH_USERNAME")
val ghPassword = System.getenv("GH_TOKEN") ?: getLocalProperty("GH_TOKEN")
url = uri("https://maven.pkg.github.com/$ghUsername/REPOSITORY")
credentials {
username = ghUsername
password = ghPassword
}
}
}
versionCatalogs {
create("mobilex") {
from("vn.core.libs:versions:1.0.2")
}
}
}
fun getLocalProperty(propertyName: String): String {
val localProperties = Properties().apply {
val localPropertiesFile = File(rootDir, "local.properties")
if (localPropertiesFile.exists()) {
load(localPropertiesFile.inputStream())
}
}
return localProperties.getProperty(propertyName) ?: run {
throw NoSuchFieldException("Not defined property: $propertyName")
}
}
rootProject.name = "android-components"
include(":libx")
include(":libx:mdc")
include(":libx:composex")