-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
81 lines (74 loc) · 2.89 KB
/
build.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import java.util.Properties
/**
* Note: To configure GitHub credentials, you have to do one of the following:
* <ul>
* <li>Add `githubUsername` and `githubAccessToken` to Global Gradle Properties</li>
* <li>Set `GITHUB_USERNAME` and `GITHUB_ACCESS_TOKEN` in your environment variables</li>
* <li>Create a `github.properties` file in your project folder with the following content:</li>
* </ul>
*
* <pre>
* githubUsername="YOUR_GITHUB_USERNAME"
* githubAccessToken="YOUR_GITHUB_ACCESS_TOKEN"
* </pre>
*/
val githubProperties = Properties().apply {
rootProject.file("github.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) }
}
val githubUsername: String = rootProject.findProperty("githubUsername") as String? // Global Gradle Properties
?: githubProperties.getProperty("githubUsername") // github.properties file
?: System.getenv("GITHUB_USERNAME") // Environment Variables
?: error("GitHub username not found")
val githubAccessToken: String = rootProject.findProperty("githubAccessToken") as String? // Global Gradle Properties
?: githubProperties.getProperty("githubAccessToken") // github.properties file
?: System.getenv("GITHUB_ACCESS_TOKEN") // Environment Variables
?: error("GitHub Access Token not found")
buildscript {
repositories {
google()
mavenCentral()
maven("https://jitpack.io")
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0")
classpath("com.android.tools.build:gradle:8.8.0")
classpath("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.1.0-1.0.29")
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1")
classpath("com.google.android.gms:oss-licenses-plugin:0.10.6")
}
}
allprojects {
repositories {
google()
mavenCentral()
maven("https://jitpack.io")
maven("https://maven.pkg.github.com/tribalfs/sesl-androidx") {
credentials {
username = githubUsername
password = githubAccessToken
}
}
maven("https://maven.pkg.github.com/tribalfs/sesl-material-components-android") {
credentials {
username = githubUsername
password = githubAccessToken
}
}
maven("https://maven.pkg.github.com/tribalfs/oneui-design") {
credentials {
username = githubUsername
password = githubAccessToken
}
}
maven("https://maven.pkg.github.com/lemkinator/common-utils") {
credentials {
username = githubUsername
password = githubAccessToken
}
}
}
}
plugins {
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
id("com.google.dagger.hilt.android") version "2.55" apply false
}